file system performance Flashcards

1
Q

what is the role of kernel tables

A

the kernel maintains the caches of recently used inodes

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

what are the 4 types of caches used and what is their role

A

per-process open file table: tells us files that are open
system wide open file table
active inode table; recently used inodes
disk resident inodes and data: data in the disk blocks

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

where are inode values valid and what is the issue with this

A

only valid within the same file system so we have to remember the inode number and the system it belongs to

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

which caches are stored in the kernel

A

system wide open file table
active inode table

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

write through caches

A

every write is copied straight onto the physical mediuim but can still read from blocks in memory

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

what do buffers allow us to do

A

decouple byte and block reads
cache blocks to reduce disk activity
use read ahead to speed up access: read the next n blocks not just the one requested

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

how does buffering and block caches improve performance

A

we can read and write in the memory block rather than the underlying file system

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

delayed allocation/ allocate on flush

A

we allow files to grow in memory through the buffer

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

why do we use file system flush

A

all buffers need to be regularly synched to the disk even if non removable to protect against system failure and to speed up operations

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

what does the dirty flag mean

A

in the cache it means that the entry has a change in it
we remove the flag once we do the write

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

what does the sync command do on unix

A

forces the flush

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

why do we buffer pool

A

more efficient buffering

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

what are the three sections in the buffer pool

A

lru: least recently used
age
empty

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

lru (bufferpool)

A

a doubly linked list of all the blocks currently in memory/cache
as blocks are requested then theyre added and if we run out of space we find a block that isnt being used/ not used in a while and remove it then add the requested block

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

age (bufferpool)

A

blocks are read ahead and if accessed then they move into the lru
if not accessed within a certain time then its freed

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

empty (bufferpool)

A

unused blocks are copied here so we can quickly add data and push to the lru

17
Q

bufhash list

A

contains hashed values based on the file and block number which allows us to quickly find the corresponding blocks
returns a pointer and all blocks with the same value are in a chain together