chapter 40 - file system implementation Flashcards

1
Q

What are the two main aspects to understand in a file system?

A
  • Data structures (inodes, bitmaps, data blocks)
  • Access methods (system call handling like open, read, write)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does an inode store?

A

Metadata about a file: type, size, owner, permissions, timestamps, and pointers to data blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the role of the superblock in a file system?

A

stores metadata like the number of inodes, number of data blocks, and locations of inode/data regions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why do file systems use both direct and indirect pointers in inodes?

A

Direct pointers allow fast access for small files; indirect pointers enable support for large files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the inode number (i-number) do?

A

It indexes into the inode table to locate a file’s metadata

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What maps human-readable file names to inode numbers?

A

Directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why are bitmaps used in file systems?

A

To track which inodes and data blocks are in use or free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are files found on disk using inodes?

A

The inode number indexes into an inode table that contains the file’s metadata and data block pointers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the Open File Table (OFT) track?

A

File inode, access mode, current offset, and reference count

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens when write() needs to allocate a new block?

A

The file system updates the data bitmap, modifies the inode, and writes data to the allocated block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly