-
Notifications
You must be signed in to change notification settings - Fork 771
Filesystem: Review Questions
Lawrence Angrave edited this page Nov 27, 2015
·
3 revisions
Question numbers subject to change
Write a function that uses fseek and ftell to replace the middle character of a file with an 'X'
void xout(char* filename) {
FILE *f = fopen(filename, ____ );
}
## Q2
In an `ext` filesystem how many inodes are read from disk to access the first byte of the file `/dir1/subdirA/notes.txt` ? Assume the directory names and inode numbers in the root directory (but not the inodes themselves) are already in memory.
## Q3
In an `ext` filesystem what is the minimum number of disk blocks that must be read from disk to access the first byte of the file `/dir1/subdirA/notes.txt` ? Assume the directory names and inode numbers in the root directory and all inodes are already in memory.
## Q4
In an `ext2` filesystem with 32 bit addresses and 4KB disk blocks, an inodes that can store 10 direct disk block numbers. What is the minimum file size required to require an single indirection table? ii) a double direction table?
Legal and Licensing information: Unless otherwise specified, submitted content to the wiki must be original work (including text, java code, and media) and you provide this material under a Creative Commons License. If you are not the copyright holder, please give proper attribution and credit to existing content and ensure that you have license to include the materials.