File System Management Flashcards

1
Q

What are the essential requirements for long-term information storage in a file system?

A
  • Ability to store a large amount of information
  • Information must survive process termination
  • Concurrent access by multiple processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define “File” in the context of file systems

A

A file is an abstraction for a collection of blocks on disk, persistent, named, and provides convenient sequential or random access

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

What is the purpose of the Master Boot Record (MBR) in a file system layout?

A

The MBR (sector 0) contains information to allow the OS to boot from the disk

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

List the primary file operations

A
  • Create, make a new file
  • Delete, remove a file
  • Open/Close, manage file metadata in memory
  • Read/Write, handle data operations
  • Seek, change the current position for access
  • Rename, change the file’s name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the advantages of contiguous file allocation?

A
  • Easy implementation
  • Excellent read performance due to minimal seeking
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the main disadvantage of using linked list allocation for file systems?

A

Random access is very slow because accessing any specific block requires traversing the list sequentially

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

Explain the purpose of i-nodes in file systems

A

I-nodes store attributes and disk addresses for file blocks, requiring only i-nodes for open files to be in memory

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

What are the two types of file system backups?

A
  1. Full backup, copies the complete state of storage
  2. Incremental backup, records only files updated since the last backup
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do symbolic links differ from hard links in shared files?

A
  • Symbolic links, point to the pathname of the original file
  • Hard links, directly reference the same i-node as the original file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the trade-off in choosing the block size for disk space management?

A

Larger block sizes reduce overhead but increase internal fragmentation, while smaller block sizes require more overhead and links

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

How do you calculate Turn-around Time and Waiting Time in scheduling algorithms like FCFS, SJF, Round Robin, and Priority-based?

A
  • Turn-around Time = Completion Time - Arrival Time
  • Waiting Time = Turn-around Time - Burst Time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How are read and lseek system calls used in UNIX?

A
  • read(fd, buffer, count), reads count bytes from the file descriptor fd into buffer
  • lseek(fd, offset, whence), moves the file pointer by offset based on whence (SEEK_SET, SEEK_CUR, or SEEK_END)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of the magic number in an executable file’s header in UNIX?

A

The magic number identifies the file type and format. It is specific and not random

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

Differentiate between internal fragmentation and external fragmentation

A
  • Internal Fragmentation, unused space within allocated blocks
  • External Fragmentation, unused space outside allocated blocks due to scattered free memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Compare contiguous allocation, linked list allocation, and table/indexed allocation

A
  • Contiguous Allocation, fast access but prone to fragmentation
  • Linked List Allocation, eliminates fragmentation but slow random access
  • Table/Indexed Allocation, good random access, requires extra memory for indices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does a bitmap represent free-space management in file systems?

A
  • A bitmap uses bits to indicate block usage: 1 (free), 0 (allocated)
  • Writing a file updates free blocks to 0, deleting a file sets blocks back to 1
17
Q

What are the key design issues in selecting block size for a file system?

A
  • Large blocks, fewer disk accesses, more internal fragmentation
  • Small blocks, better utilisation, more metadata overhead
  • Compromise is based on file sizes and access patterns