File System Flashcards

(43 cards)

1
Q

Data is stored on

A

Physical devices, eg disks

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

A file is a

A

Logical view of the data , perceived by the programmer

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

A file system creates

A

An interface between users and files

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

A file allocation method

A

Refers to how disk blocks are allocated & organized for files on the disk

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

Contiguous allocation

A

Each file occupies set of contiguous blocks

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

Pros of contiguous allocation

A

Best performance in most cases
Simple- only starting location (block #) and length (number of blocks) are required

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

Cons of contiguous allocation

A

Finding space for file
estimating a file size at creation, or growing it
External fragmentation
Compaction

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

Linked Allocation

A

Each file is a linked list of disk blocks: blocks may be scattered anywhere on the disk

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

Pros of linked allocation

A

Simple, only need starting address
Free-space management system- no waste of space
Defragmentation not necessary for file allocation

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

Cons of linked allocations

A

No random access, locating a block can take many disk seek & I/O
Extra space required for pointers
Clusters
Reliability: What if a pointers gets corrupted

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

File Allocation Table

A

Beginning of volume has table indexed by block number

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

Indexed Allocation

A

Brings all pointers together into the index block, to allow random access to file blocks

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

Pros of indexed allocation

A

Supports direct access
Prevents external fragmentation

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

Cons of indexed allocation

A

High pointer overhead -> wasted space

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

What is wrong with too big of index block

A

Waste of space for small files

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

What is wrong with too small of index block

A

Size of file will be limited

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

What type of file access type to use contiguous?

A

Great for sequential and random

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

What type of file access type to use Linked?

A

Good for sequential, not random

19
Q

What type of file access type to use Indexed

20
Q

Free-Space list

A

The system maintains it to record all free disk blocks

21
Q

Free-Space list implemented using

A

Linked List
Bit Vectors
Grouping
Counting

22
Q

What does a file system provide

A

Organized and efficient access to data on secondary storage

23
Q

File control block

A

metainformation about files

24
Q

Directories provide

A

A way for user to organize their files
A convenient file name space for both users and file systems

25
A directory is typically
just a file that happens to contain special metadata
26
Directory =
list of (name of file, file attributes)
27
Directory attributes include
Size, protection, location on disk, creation time, access time
28
The directory list is usually
unordered (effectively random)
29
Navigation through trees relies on
pathnames
30
absolute pathname start from
the root
31
relative pathnames start from
current working directory
32
.
current directory
33
..
parent directories
34
Pathname translation, how does it open directory?
Opens directory searches for next word and gets location of that
35
In opening directories, what is checked at each step
Permissions
36
Directory is a special file that containes
list of names of files and their inode numbers
37
"A file is in a directory"
Directory has a link to the inode of the file
38
"A directory contains a subdirectory"
Directory has a link to the inode of the subdirectory
39
"A directory has a parent directory"
Entry of the directory has a link to the inode of the parent directory
40
Inode
Structure maintaining all metadata about a file (or directory), except for name
41
Inode number
unique ID of inode
42
Hard Links
Creates another file with a link to the same underlying inode; an entry inside a directory with an inode
43
Soft link (symbolic link)
A link to another name in the file system