File System Flashcards

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

A

More complex

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
Q

A directory is typically

A

just a file that happens to contain special metadata

26
Q

Directory =

A

list of (name of file, file attributes)

27
Q

Directory attributes include

A

Size, protection, location on disk, creation time, access time

28
Q

The directory list is usually

A

unordered (effectively random)

29
Q

Navigation through trees relies on

A

pathnames

30
Q

absolute pathname start from

A

the root

31
Q

relative pathnames start from

A

current working directory

32
Q

.

A

current directory

33
Q

..

A

parent directories

34
Q

Pathname translation, how does it open directory?

A

Opens directory searches for next word and gets location of that

35
Q

In opening directories, what is checked at each step

A

Permissions

36
Q

Directory is a special file that containes

A

list of names of files and their inode numbers

37
Q

“A file is in a directory”

A

Directory has a link to the inode of the file

38
Q

“A directory contains a subdirectory”

A

Directory has a link to the inode of the subdirectory

39
Q

“A directory has a parent directory”

A

Entry of the directory has a link to the inode of the parent directory

40
Q

Inode

A

Structure maintaining all metadata about a file (or directory), except for name

41
Q

Inode number

A

unique ID of inode

42
Q

Hard Links

A

Creates another file with a link to the same underlying inode; an entry inside a directory with an inode

43
Q

Soft link (symbolic link)

A

A link to another name in the file system