Question
4. A Basic File System. For this question about basic file systems, assume a simple disk model where each disk read of a block takes
4. A Basic File System.
For this question about basic file systems, assume a simple disk model where each disk read of a block takes D time units. Also assume the basic layout is like the very simple file system or the Fast File System.
a. Assume that all data and metadata are initially only on disk. Assume further that all inodes are in separate blocks, and that each directory is only one block in size. How long does it take to open the file /a/b/c/d.txt?
b. Assume after opening the file, we read the file in its entirety. It is a big file, containing 1036 blocks. The inode itself has room for 12 direct pointers and 1 indirect pointer. Disk addresses are 4 bytes long, and disk blocks are 4KB in size. After opening it, how long does it take to read the entire file?
c. Now assume a new inode structure is introduced, in which there is only one pointer: a double indirect pointer, which points to the double indirect block, which can point to 1024 indirect blocks, each of which can point to 1024 blocks. After opening the file, how long does it take to perform 50 random reads within a very large file?
d. How long does it take to close a file, approximately (assuming disk accesses are the dominant cost)?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started