Principle of FAT file system 3
t, we do not allow files stored contiguously. Catalog still only records began clusters and file size. So how do we do log files occupy those clusters to file mapping clusters is not easy, because the file name is not fixed. We change the thinking, the file can be used to map the cluster in front of the entire memory space left to record a few clusters of data in a relational data area and the cluster number. For the above example because the total space is not large, so the front of the 1Kb space to record this correspondence, assuming three files are stored, the spatial distribution of Figure 4.3.5, while tinkering directory, as shown in 4.3.6
The first cluster for data recorded in each cluster area is occupied, the time being called the file allocation table. Combined with the file allocation table and directory files can be completely read. We expect that the file allocation table made of a data sheet to record the corresponding form in Figure 4.3.7 cluster and data. 4.3.8 Referring to FIG significance to understand what the file allocation table. If the file a.txt our initial cluster a.txt specified directory entry is 2, then find the file allocation table records the second cluster, the registration of the above is 3, we can determine the next cluster is 3. Locate the file allocation table record third cluster, register above 4, we can determine the next cluster is 4 ...... until refers to the first 11 clusters, find the next point is FF, is the end. They did correct file has been read. We look at the third case mentioned above, is that in future will b.txt delete, deposited a size 60.3KB of d.txt. The use of cluster chain can be easily achieved. After the realization of the disk as shown in Figure 4.3.9 4.3.10 4.3.11
|