For the purposes of this example, let's say we have a new disk that has only a few files on it. This is shown in part a of Figure 5.4.
Now we have deleted File 2, as shown in part b of Figure 5.4.
Since the FAT file system always adds files to the end if there's enough room there, the space previously used by File 2 is not used at first. [Pro95] Let's say we add two more files, as shown in part c of Figure 5.4.
Now we have deleted File 4, as shown in part d of Figure 5.4.
Finally, we want to add a new file, File 6. Assume File 6 is too large to fit the unused space at the end, but it is small enough to fit the combined space of what used to be File 2 and File 4. So the file system will fragment File 6 into two fragments, File 6A and File 6B, and store them as shown in part e of Figure 5.4.
Note that fragmentation can occur for reasons other than lack of disk space at the end of a disk. It can also occur if a file grows. For example, if more data was added to File 3 to the disk in part f of Figure 5.4, the file system will have to put the additional data belonging to File 3 in a fragment right after File 5. [Pro95]