u/Lower_Mycologist4428

FAT16 question

Hello all, im currently a student taking an OS class where were tasked with creating a file system. I decided to choose FAT as my choice of free space tracking and management and wanted to verify my thinking if I really understand it due to not being able to find good enough resources. So the way I think of it is that a FAT is just a large array where FAT[i]=j and in memory this is how we keep track of our chain and which block to go to next to keep track of something in memory like a file. However since a FAT is just a large array it must be stored in memory(doing it in C). Is it true that the FAT table in memory can span many many blocks dependant on how many entries we can fit into one block.

tldr: Say we have 19,531 blocks, a block size is a standard 512 bytes, say we are using uint16 for each fat entry therefore our FAT would need 39,062 bytes. 39,062/512 is 77 blocks. Therefore block 2-77 must be set aside(reserved) for our FAT table, and inside all of those blocks lives our FAT array from fat[0] to fat[19,531]

reddit.com
u/Lower_Mycologist4428 — 2 days ago