OS Exam Dr Bennet File Systems Questions

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

40 Terms

1
New cards

What is the main abstraction goal of a file system?

To present reading, writing, and other file operations to the client.

2
New cards

Why is persistence a core goal of file systems?

Because changes must survive the processes that made them and persist across system reboots.

3
New cards

How is a file typically viewed at the logical level?

As a sequence of bytes.

4
New cards

Why do traditional file systems optimize for reduced head motion?

Because seek time—moving the disk head—is the slowest operation in mechanical drives.

5
New cards

What is the traditional minimum sector size on a disk?

512 bytes.

6
New cards

What is the major limitation of MBR partitioning?

It uses 32-bit disk offsets, limiting disks to 2 TB.

7
New cards

What advantage does GPT have over MBR?

It supports many partitions and very large disk sizes.

8
New cards

What are the three basic file layout approaches?

Contiguous, linked, and indexed.

9
New cards

Which allocation method gives great sequential performance but poor file growth?

Contiguous allocation.

10
New cards

Why are indexed structures like i-nodes beneficial?

They allow efficient random access without requiring contiguous storage.

11
New cards

In a directory tree, what do files and directories represent?

Files are leaves; directories are internal nodes.

12
New cards

What is a drawback of fixed-size directory entries?

They restrict file-name length.

13
New cards

How does a relative path differ from an absolute path?

A relative path is based on the current working directory; an absolute path starts at the root.

14
New cards

What is a hard link?

Another directory entry pointing to the same underlying file data/i-node.

15
New cards

What is the key difference between a soft link and a hard link?

A soft link stores a path name; a hard link points directly to the file’s data.

16
New cards

Why can crashes lead to file-system inconsistencies?

Because multiple writes are needed for one update; a crash can interrupt them.

17
New cards

What inconsistency might fsck or scandisk find?

Blocks marked as used but not referenced by any file.

18
New cards

How does journaling improve reliability?

It logs metadata changes before applying them, allowing clean recovery.

19
New cards

What is the trade-off of larger block sizes?

Better I/O performance but more internal fragmentation.

20
New cards

Which free-space method naturally groups free blocks together?

Bit maps.

21
New cards

Why is write-back caching fast?

It delays writes and batches them, reducing disk traffic.

22
New cards

What is the risk of write-back caching?

Data loss if a crash occurs before dirty blocks are written.

23
New cards

What does readahead try to predict?

Sequential access patterns so the next block is read early.

24
New cards

How do cylinder groups reduce seek time?

By keeping related blocks close together on disk.

25
New cards

Why are cylinder groups unnecessary on SSDs?

SSDs have no physical seek time.

26
New cards

What is the core idea of Copy-on-Write?

Shared pages remain read-only until a process writes, triggering a private copy.

27
New cards

What triggers a copy operation in COW?

A process writes to a shared, read-only page.

28
New cards

How does COW save memory?

By sharing unmodified pages among processes instead of duplicating them.

29
New cards

What structure does the OS update on a COW page fault?

The faulting process’s Page Table Entry (PTE).

30
New cards

Why does the file system use blocks instead of single-byte operations?

Blocks align with hardware efficiency and reduce overhead.

31
New cards

Why is GPT generally better than MBR for modern systems?

GPT supports far more partitions and massive disk sizes, while MBR is limited to 2 TB and only four primary partitions.

32
New cards

Why are indexed file structures usually preferred over linked allocation for random access?

Indexed structures allow direct access via index blocks, while linked allocation requires sequential traversal.

33
New cards

What advantage does contiguous allocation have over indexed allocation?

Contiguous allocation offers extremely fast sequential access with minimal overhead.

34
New cards

What disadvantage does contiguous allocation have compared to indexed allocation?

It cannot easily handle file growth and can lead to external fragmentation.

35
New cards

Why is journaling better than running fsck after a crash?

Journaling logs metadata changes ahead of time, enabling fast recovery, while fsck must scan the whole FS and is slow.

36
New cards

Why is a bitmap better than a linked list for recording free space?

A bitmap keeps free blocks naturally ordered and allows fast contiguous allocation; linked lists provide only LIFO access.

37
New cards

Why are fixed-size directory entries worse than variable-size entries in flexible systems?

Fixed-size entries limit name length and waste space, while variable-size entries accommodate diverse names more efficiently.

38
New cards

Why is write-back caching often preferred over write-through caching?

Write-back reduces disk I/O by batching updates, improving performance; write-through writes every change immediately, slowing performance.

39
New cards

Why is readahead more helpful on mechanical disks than on SSDs?

Mechanical disks suffer from seek/rotation delays, which readahead helps mask; SSDs have near-zero seek time, so the benefit is smaller.

40
New cards

Why is Copy-on-Write more efficient than duplicating all pages on process fork?

COW defers copying until a write actually occurs, saving memory and dramatically reducing overhead when most pages stay unchanged.