File Systems Flashcards

1
Q

Attributes of a file

A

name, identifier
type
location
size
protection

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

Goals of file management

A
  • provide a convenient naming scheme for files
  • provide uniform I/O support for variety of storage device types
  • provide a standardized set of I/O interface functions
  • minimize/eliminate loss or corruption of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

typical file control block includes…

A
  • file permissions
  • file dates (create, access, write)
  • file owner, group, ACL
  • file size
  • file data blocks or pointers to file data blocks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does contiguous allocation work? also name advantages & disadvantages

A

A contiguous array of blocks is allocated for each newly created file. A file can’t become larger than the pre-allocated space. The FS only needs to store the start block and the size of each file.
+ It allows for sequential and direct access.
- Can’t grow beyond initially reserved size

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

How does chained allocation work? also name advantages & disadvantages

A

The FS stores a pointer to the first block of each file, but each block now contains a pointer to the next block that belongs to the same file.
+ no need to pre-allocate disk blocks for files
+ no external fragmentation
- only sequential access possible

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

What is the idea of linked listed allocation with a file allocation table (FAT)?

A

The FAT approach is very similar to the chained allocation approach but stores the list information in a separate data structure. The entire list has to be walked to find a byte in a file, but it doesn’t require disk accesses if FAT is cached.
- the size of the FAT doesn’t depend on the number or size of files, but on the size of the hard disk

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

How does indexed allocation work?

A

It groups the pointers to disk blocks occupied by a specific file together into a single data structure, the index block. There is one index block for each file. Once an index block is loaded to the main memory, it is easy to find a specific block of the file.

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

What are hard links?

A

Each directory entry is a hard link; they simply map a name to an inode. They are thus implemented through the file system. Having created a file f and a link l to it, f and l are indistinguishable. Both names f and l are hard links to the file represented by the inode both of them map to.

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

What are symbolic links?

A

Their content is interpreted by the VFS and consists only of the relative or absolute path to the pointed file. They are files of the type “symbolic link”.

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