journaling and file locking Flashcards

1
Q

how are journaling file systems fast

A

it decouples the file writes from the disk head movement
the flush operation can do in-order block/sector writes
the transaction log could be on a faster disk/media

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

how are journalling file systems resillient

A

the log can be replayed in event of system failure as transactins must be atomic and idempotent

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

idempotent

A

can be repeated a number of times and still have the same result

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

atomic

A

all or no subparts of the transaction must be complete

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

how does a Journaling file system work

A

the file system updates are written as transactions to a journal or log
the transactions are periodically flushed to a disk
entries are only removed from the log when confirmed written/flushed

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

how is a journaling file system circular

A

the log has a fixed size and reuses space by overwriting the oldest entries when its full

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

shared lock

A

can have as many as you want
cannot include any data with an exclusive lock

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

exclusive lock

A

only one transaction can hold the lock at a time
if a transaction requests a lock on a byte thats already locked then it fails

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

blocking lock request

A

hangs until the bytes are available (have no other locks on them)

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

non-blocking lock requests

A

immediately returns if the bytes are unavailable

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

which operation are shared locks used for

A

reading

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

which operation are exclusive locks used for

A

writing

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