Question: Write a function blockcount for the Shell class int Shell::blockcount(string file) which accepts a file name file and returns the number of blocks used by
Write a function blockcount for the Shell class
The root directory ROOT and file allocation table FAT will be needed for problems 1, 2 and 3. ROOT and FAT are tables defined as follows. The ROOT table has 6 entries and the FAT has 16 entries. The first column of the ROOT is the file name and the second column indicates the first block of the file. The only column of the FAT is the link. field which indicates the next block in the file. In the FAT, a 0 indicates the entry is the last block in the file. The first free block in the free list is given in FAT[0]. 1 F1 | 8 | 2 | F2 | 6 | 3 | F3 | 4 | 51 6 1 ROOT 0 | 16 | | T I | 10 2 | 0 | 3 | 4 | 4 | 5 5 | 0 60 7 | 3 | 8 | 91 9 11 10 | 0 11 | 12 12 | 0 | 13 | 14 | 13 15 | 14 | 16 15 | DIAGRAM 1 FAT 18080880 | I | A. B. D. FAT (Problem 2) E. 1 | F1 | 2 | F2 | 3 | F3 | ROOT (Problem 2) DIAGRAM 2
Step by Step Solution
3.36 Rating (165 Votes )
There are 3 Steps involved in it
Heres the implementation of the blockcount function for the Shell class cpp int Shellblockcountstrin... View full answer
Get step-by-step solutions from verified subject matter experts
