Log-Strucutred File Systems Flashcards

1
Q

What are 3 motivations for log-structured file systems?

A
  • Growing memory size (performance determined by writes)
  • File systems perform many random operations (especially random writes with in-place update)
  • File systems were not RAID- aware (RAID setups incur many writes)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In a LFS, we turn writes _______

A

sequential

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

Writing single blocks _________ does not guarantee _______ writes

A

sequentially, efficient

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

An example of a inefficient sequential write is writing A1, then having to wait for ____ _______ to write A2

A

disk rotation

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

To increase write efficiency, we keep track of all updates in a ________ ______ AKA ______

A

memory buffer, segment

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

When the memory buffer has enough _______ write them to disk all at once

A

updates

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

What is the equation used to calculate how big the memory buffer should be?

A
D = (F/1-F) * R_peak * T_position
where 
F = % of R_peak
R_peak = disk transfer rate
T_position = positioning time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Inodes are ______ throughout the disk in a LFS

A

scattered

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

We can find scattered inodes by using an ______ _____

A

inode map

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

An inode map maps inode numbers to the address of the most ______ version inode

A

recent

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

To maintain the _______ _______ guarantee in a LFS, we place the inode map next to where it is updating all the other new information

A

sequential writes

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

To find the inode map spread across the disk, we maintain a fixed location on _____ to begin a file lookup

A

disk

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

A ________ _______ contains pointers to the latest pieces of the inode map

A

checkpoint region

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

The checkpoint region is only updated _____________

A

periodically

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

What are the four steps in reading a file from disk in a LFS?

A
  1. Read checkpoint region
  2. Read entire inode map and cache to memory
  3. Read the most recent inode
  4. Read a block from by using in/direct or doubly indirect pointers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The ________ structure of a LFS is identical to classic UNIX file systems

A

directory

17
Q

A directory is a file whose data blocks consist of _______ __________

A

directory information

18
Q

LFS produces ________ since new file versions are written to new locations while older versions are scattered all over disk

A

garbage

19
Q

The garbage produced by LFS must be ______/_______ to allow for space reuse

A

cleaned/collected

20
Q

What are 2 alternatives to handling garbage inodes and data blocks?

A
  1. Versioning

2. Garbage collection

21
Q

In versioning, the file system keeps old versions of inodes and data blocks so users can ________ and use ______ ______ __________

A

restore, old file versions

22
Q

In garbage collection, the file system keeps only the ______ version and _________ cleans old versions

A

latest, periodically

23
Q

In garbage collection, old data is deleted on a _________-__-_______ basis

A

segment-by-segment

24
Q

In garbage collection, why isn’t old data deleted on a block-by-block basis?

A

The cleaner will leave many free hole in random locations, making write non-sequential

25
Q

LFS handles garbage inodes and data blocks using the ______ ________ method

A

garbage collection

26
Q

What does a segment summary block do?

A

Records inode number and offset for each data block

27
Q

A segment summary block is located in each ______

A

segment

28
Q

A data block is live id the latest inode ______ the block

A

indicates

29
Q

Liveness can be determined using _______ ______

A

version number

30
Q

When are three time block are cleaned?

A
  1. Periodically
  2. During idle time
  3. When the disk is full
31
Q

A hot segment is a segment where blocks are frequently _____-________

A

over-written

32
Q

A cold segment is a segment that is relatively _____

A

stable

33
Q

____ segments should be cleaned sooner than ___ segments

A

cold, hot

34
Q

In LFS crash recovery, the CR points to the head and tail segment of the ___

A

log

35
Q

In LFS crash recovery, each log ________ points to the next

A

segment

36
Q

In LFS crash recovery, LFS can easily recover by reading the latest valid __

A

CR

37
Q

How do we ensure the atomicity of CR updates in LFS crash recovery?

A

Keep two CRs

38
Q

In LFS crash recovery, what is the CR update protocol?

A

timestamp -> CR -> timestamp

39
Q

In LFS crash recovery, when it rolls forward, we start from the ____ of the log and read segments, adopting updates as we go along

A

end