There are two parts in project 4:
- Indexed and Extensible Files
- Subdirectories
During the lecture we have seen that:
- the file systems is logically divided into units called blocks
- the disk is physically divided into units called sectors (that are always 512 bytes)
In Pintos (like in the original Unix file system), things are simple: 1 block = 1 sector = 512.
However, modern Operating systems define block size of 4 KB or 8 KB.
-
What is an inode?
-
Given an inode, how to find the blocks that hold the data?
-
How does the bounce buffer in
inode.c
in the functionsinode_read_at
andinode_write_at
work? -
What are bitmaps?
-
How do we set the nth bit in a bitmap?
-
How do we unset the nth bit in a bitmap?
-
How do we toggle the nth bit in a bitmap?
-
What is a bitmask?
-
In the orignal Pintos design, the file’s data is stored in contiguous data blocks (the inode stores the pointer to the first block and the total file size). What are the two majors drawbacks of this design?
-
According to the Pintos documentation, what is the solution to resolve the problems encountered in question 6?
-
Considering a design with only one double indirect block pointer? What is the largest file size that you could store?
-
Why having direct and single indirect blocks when a double indirect can store that much data?