Search code examples
filesystemsrandom-accessfat

File-Allocation Table (FAT) - How is Random-Access allowed?


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?


Solution

  • 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.