Question

Here comes a straight-forward question about random access when it comes to file systems using FAT.

I have seen different explanations of FAT with different kinds of pictures/animations showing different things. I don't understand how random access is possible without going through the file once. I thought of some kind of table that listed all the blocks that belong to a certain file, but it looks like the FAT is only mapping to the next block, meaning you still have to go through the FAT until you find the End-Of-File, then save these indexes in an array, and only then would you be able to perform random access.

My question is if what I wrote above is true. Is the whole random access only possible after first looking through the table to find all the blocks?

Was it helpful?

Solution 2

I think it only reduce the cost of random access compared with normal linked access, since only it only traverse the link of each file. Thus, it says that random access can be optimised by FAT.

OTHER TIPS

The File Allocation Table, FAT, used by DOS is a variation of linked allocation, where all the links are stored in a separate table at the beginning of the disk. The benefit of this approach is that the FAT table can be cached in memory, greatly improving random access speeds.

So it can be cached which makes it faster.

Ref: Abraham Silberschatz, Greg Gagne, and Peter Baer Galvin, "Operating System Concepts, Ninth Edition ", Chapter 12

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top