File Systems Flashcards

(33 cards)

1
Q

What is the primary purpose of long-term information storage?

A

To ensure information survives for long periods or permanently.

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

What are the requirements of long-term storage?

A
  • Must store large amounts of data
  • Multiple processes must access information concurrently
  • Stored information must survive process termination
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the different file types?

A
  • Regular files
  • Directories
  • Character Special Files
  • Block special files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define sequential access in file access methods.

A

Reading all bytes/records from the beginning without jumping around.

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

Define random access in file access methods.

A

Reading bytes/records in any order.

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

What are the essential file attributes associated with each file?

A

Name and associated data.

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

List some common file operations.

A
  • Create
  • Delete
  • Open
  • Close
  • Read
  • Write
  • Append
  • Seek
  • Rename
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the problem with using read()/write() system calls?

A

It is cumbersome.

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

What is a memory mapped file?

A

Storing the contents of a file in process virtual memory.

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

What do hierarchical directory systems allow users to do?

A

Group similar files together.

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

Define absolute path in directory systems.

A

Path from the root to the file.

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

Define relative path in directory systems.

A

Path from the current working directory to the file.

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

List some directory operations.

A
  • Create
  • Delete
  • Opendir
  • Closedir
  • Readdir
  • Rename
  • Link
  • Unlink
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the purpose of a partition table?

A

Stores information about all present partitions.

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

What does the Master Boot Record (MBR) store?

A

Boot program.

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

What is the function of the superblock in a file system?

A

Contains administrative information including the magic number and number of blocks.

17
Q

What are inodes?

A

a way to structure data so that you’re essentially keeping the address of the disk blocks or pointers to the data that the file data conta

		§ advantages - inode must be in memory only when corresponding file is open
		§ n = bytes, k = number of open files
		§ total memory occupied is k*n
18
Q

What is contiguous file allocation?

A

Storing each file as a contiguous run of disk blocks.

19
Q

What are the advantages of contiguous file allocation?

A
  • Easy to implement
  • Files can be read efficiently
20
Q

What are the disadvantages of contiguous file allocation?

A
  • Must know maximum file size at creation
  • External fragmentation
  • Internal fragmentation
21
Q

What is linked list allocation?

A

Storing file blocks in a linked list.

22
Q

What are the advantages of linked list allocation?

A

No space lost due to external fragmentation.

23
Q

What is a disadvantage of linked list allocation?

A

Random access is slow.

24
Q

What is the File Allocation Table (FAT)?

A

A table storing pointers to the next block in RAM.

25
What does an inode contain?
* File attributes * List of file block addresses
26
What is the purpose of a directory entry?
Map the name of the file onto the information needed to locate the data.
27
What is a soft link?
A file that references the path of another file.
28
What is a hard link?
An alias of the file that associates a name with a file.
29
What is journaling in file systems?
Creating a list of changes prior to modifying the file system.
30
What is the purpose of a Virtual File System (VFS)?
Provide an object-oriented way of implementing file systems. It is sthe universal translator for file system in the OS and provides a API and system call interface for applications to interact with files
31
What are the two approaches to disk space management in file systems?
* Linked list * Bitmap
32
What does the bitmap in disk space management represent?
Bit n is 1 if block n is free, 0 if used.
33
What does an inode store in terms of disk block addresses?
* Single indirect block * Double indirect block * Triple indirect block