File System Interface Flashcards

1
Q

What is a file?

A

Abstraction over physical device. File is a logical unit of storage with variable length.

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

What are attributes of a file?

A
  • Name
  • Identifier
  • Type
  • Location
  • Size
  • Protection
  • Time, date and user identification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What operations can be performed on files?

A

Read, write, repostion
- per-process file position pointer

Create, delete, truncation

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

How can we prepare a file for use?

A

File must be opened using a syscall. Directory structure is searched for a specified file.

File is added to the open file table and returns pointer to its entry on the table.

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

What are the open file tables?

A

System-wide open file table

Per-process open file table

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

What does the System-wide open file table show?

A

All currently open files, and what processes have them open

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

What does the per-process open file table show?

A
  • Files that a process has open
  • Entries point to the System-wide open file table entries.
  • Current FP value for the process.
  • Access mode (R/W)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What locks can be place on a file?

A

Shared lock (Reader lock)

Exclusive lock (Writer lock)

Controls access to shared files.

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

What do file types fo?

A

Can infer its use, however still appears as bytes to OS.

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

What access methods are there for files?

A
  • Sequential access

- Direct access

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

How does sequential access operate?

A

Read from or write to current position in file and advance the file pointer

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

How does direct access operate?

A

Interacts with the file on block level. Random access supported by disks.

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

How is storage structures?

A

Storage volumes: Device for storage.

File system may take up entire device.

Devices may be sub-divided into partitions: 1 device with multiple volumes.

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

How are directories structured?

A

Hierarchical naming, files and directories can be referenced by path name.

Relative, in current dir. Absolute, path from /

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

What are the attributes of an acyclic directory structures?

A

Can have multiple paths for same file/dir.

Space can only be reclaimed when last reference to file is deleted.

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

How do cycles affect general graph directories

A

Cycle detection required for traversal, reference counting no longer sufficient

17
Q

Why is File System Mounting important?

A

File system must be mounted by the OS before the files can be used.

OS constructs a single logical file system from all of the volumes.

18
Q

How does Linux configure file systems?

A

Specifies mountpoints, devices, file-systems and parameters in /etc/fstab

Used at boot time to configure the dir structure.