THINK FIRST·CODE LATER

← Operating Systems
Chapter 11 · Week 12

File Systems, Disks and Storage

Answered 0/30 Correct 0
Sign in to save progress across devices
Q1

In a Unix file system, what does a directory entry contain?

Q2

File a has a hard link b and a symbolic link c. You delete a. What happens?

Q3

Which allocation method makes random access to block i of a large file slow?

Q4

Blocks are 4 KiB and pointers are 4 bytes. How many blocks can a single indirect block address?

Q5

An inode has 12 direct pointers, 4 KiB blocks and 4-byte pointers. The inode is cached in memory. How many disk reads are needed to read the byte at offset 49,152?

Q6

Same inode (12 direct pointers, 4 KiB blocks, 4-byte pointers, single/double/triple indirect). What is the approximate maximum file size?

Q7

A 1 TiB disk uses 4 KiB blocks. How large is a free-space bitmap?

Q8

A program calls write() and gets a success result; one second later the power fails. With default Linux settings, is the data on disk?

Q9

Why do databases use group commit?

Q10

How does a journaling file system recover after a crash?

Q11

What makes snapshots almost free in copy-on-write file systems like ZFS and Btrfs?

Q12

A 7,200 RPM disk: what is the average rotational latency?

Q13

Average seek 9 ms, 7,200 RPM, negligible transfer time. About how many random I/Os per second can the disk do?

Q14

Head at cylinder 53; requests 98, 183, 37, 122, 14, 124, 65, 67. What is the total head movement with FCFS?

Q15

Same requests with SSTF (head at 53). In which order are they served?

Q16

What is the main weakness of SSTF?

Q17

Why do C-SCAN and C-LOOK exist, although they move the head more than SCAN and LOOK?

Q18

Which Linux I/O scheduler is typically best for a fast NVMe SSD, and why?

Q19

Why can't an SSD overwrite a flash page in place?

Q20

What does the TRIM command do?

Q21

Six 4 TB disks in RAID 5. What usable capacity do you get, and how many disk failures can it survive?

Q22

Why does a small random write cost 4 I/Os in RAID 5?

Q23

Why is RAID not a backup?

Q24

Compare 3-way replication with Reed–Solomon RS(6, 3) erasure coding for 600 TB of data. Which statement is correct?

Q25

EdgeCampus cameras produce 10 TB of video per day. Which data-placement strategy is most sensible?

Q26

What is write amplification in an SSD?

Q27

A process has a file open and another process deletes the file's only name with rm. What happens to the data?

Q28 Short answer

Head at cylinder 53, cylinders 0–199, requests 98, 183, 37, 122, 14, 124, 65, 67. Give the service order and total head movement for SCAN and LOOK (initially moving toward 0) and for C-SCAN and C-LOOK (moving toward 199, counting the return jump). Which would you choose for a busy HDD, and why?

Q29 Short answer

A file system with 1 KiB blocks, 4-byte pointers and an inode with 10 direct pointers plus single, double and triple indirect pointers. (a) Compute the maximum file size. (b) How many disk reads are needed (inode cached) to read byte 10,240 and byte 300,000? (c) Why do modern file systems use extents?

Q30 Short answer

EdgeCampus stores sensor data on an edge server with 8 HDDs of 8 TB (150 random IOPS each). The workload is 50 % reads and 50 % small random writes. Compare RAID 5, RAID 6 and RAID 10: usable capacity, failures tolerated and effective IOPS (effective = raw IOPS / (read fraction + write fraction × write penalty)). Recommend one and justify, then say what else is needed to protect the data.