file allocation Flashcards

1
Q

contiguous file allocation

A

the data that represents the file is stored together in one place in the file system
in the file, the next byte will also be the next byte on the storage medium

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

what are two benefits of contiguous file allocation

A

fast access: since all the blocks are adjacent you dont have to look for the next block
good for cd disks bluray etc as you map the entire file system before you write and when you do write each file is there in its entirety so you know how much it needs

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

what are two negatives of contiguous file allocation

A

you must know the size of each file before storing as you need to know how much space is needed before you start writing the next file
external fragmentation: you end up with unused blocks between files as you dont know how much space they need

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

what are the five types of file allocation

A

contiguous allocation
linked list allocation
indexed allocation
multi-level indexed allocation
combined allocatin

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

combined allocation

A

top level index block gives you access to data blocks for small files and for larger files the block points to another index level/block
small files =fast, large files = slower

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

multi-level indexed allocation

A

blocks with pointers pointing to blocks with pointers for however many levels you need for the size of the files

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

negative of multi-level indexed allocation

A

overhead with traversing
the more levels you have means more overhead which increases access time

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

positive of multi-level indexed allocation

A

can have larger files

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

how do extents work

A

the file system tries to allocate contiguous blocks but if you run out of space a new extent is created somewhere else on the disk

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

what is an extent

A

it describes a contiguous set of blocks on the disk that belong to a file and usually includes the starting block number and the length (number of blocks)

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

linked list allocation

A

takes each block for a file and create a chain/list

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

how does linked list allocation work

A

you have a directory entry with info including the start and end

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

in linked list why do we need to know the end of it just not the start

A

so we can append data to the end of the chain if needed

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

how does linked list allocation have storage overhead

A

the blocks dont have to be adjacent to eachother on the medium so theres a cost for moving between them as we need to store the pointer to the next block

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

how does linked list allocation avoid external fragmentation

A

due to blocks not being stored next to eachother so just point to the next block

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

what is a positive of linked list allocation

A

only has internal fragmentation
usually in the last block which is bounded by the size of the block and its lifetime

17
Q

what is a negative of linked list allocation

A

only offers sequential access: you must follow the chain from the start to find something

18
Q

indexed allocation

A

one of the blocks in the disk holds pointers to the blocks that represent data for that file

19
Q

how do we access data in indexed allocation

A

via the block number and the offset within the block

20
Q

what are two positives of indexed allocation

A

simple and fast
if you dont need to store the data then you can store a null pointer -> sparse files / files with holes

21
Q

what are sparse files/ files with holes

A

files that for some of the blocks are empty

22
Q

how are files represented in indexed allocation

A

each file is represented by an index block and each pointer points to a data block

23
Q

what is a negative of indexed allocation

A

the size of the block limits pointers therefore it limits the size of file that you can have