Phase 6
Phase 6 Checkpoint: 15 questions on file systems and I/O.
15 questions · 23 marks · 45 minutes. Negative marking on MCQ only: −1/3 mark for a wrong 1-mark MCQ, −2/3 for a wrong 2-mark MCQ. No negative marking for MSQ or NAT; MSQ has no partial credit.
Q1 · NAT · 1 mark(s) — Permissions
Octal value of rwxrw-r--?
Numerical answer: ________
Q2 · MCQ · 1 mark(s) — Hard links
A file has link count 3. Two of its names are deleted. The data is:
- (A) freed
- (B) turned into a symbolic link
- (C) moved to the root directory
- (D) still there (link count 1)
Q3 · MCQ · 1 mark(s) — Tables
The open count of a file is kept in:
- (A) the system-wide open-file table
- (B) the per-process open-file table
- (C) the boot block
- (D) the free-space bitmap
Q4 · NAT · 2 mark(s) — Inode
Inode with 12 direct pointers and one single, one double and one triple indirect pointer; blocks 1 KB; pointers 4 bytes. Maximum file size in GB (2 decimals)?
Numerical answer: ________
Q5 · NAT · 2 mark(s) — Inode reads
Inode with 12 direct pointers, 4 KB blocks, 4-byte pointers; inode in memory. Disk reads needed to read file block 2441?
Numerical answer: ________
Q6 · NAT · 2 mark(s) — FAT
A 1 TB disk uses 4 KB blocks. At least how many bits must a FAT entry have to number every block?
Numerical answer: ________
Q7 · MCQ · 1 mark(s) — Linked allocation
The main weakness of linked allocation without a FAT is:
- (A) it needs an index block
- (B) slow direct access
- (C) external fragmentation
- (D) files cannot grow
Q8 · NAT · 1 mark(s) — Rotation
A disk spins at 5400 rpm. Average rotational latency in ms (2 decimals)?
Numerical answer: ________
Q9 · NAT · 2 mark(s) — Access time
Average seek 5 ms, 6000 rpm, 100 sectors per track. Average time to read 10 consecutive sectors in ms?
Numerical answer: ________
Q10 · NAT · 2 mark(s) — FCFS
Running queue (98, 183, 37, 122, 14, 124, 65, 67), head 53, FCFS. Total head movement?
Numerical answer: ________
Q11 · NAT · 2 mark(s) — SCAN
Running queue, head 53, SCAN towards 0 first. Total head movement?
Numerical answer: ________
Q12 · NAT · 2 mark(s) — C-SCAN
Running queue, head 53, C-SCAN towards 199, counting the return jump. Total head movement?
Numerical answer: ________
Q13 · MCQ · 1 mark(s) — LOOK
LOOK differs from SCAN in that it:
- (A) moves in one direction only
- (B) serves the nearest request first
- (C) reverses at the last request instead of the disk's end
- (D) ignores new requests
Q14 · NAT · 2 mark(s) — DMA
A DMA device moves 8-byte words at 4,000,000 bytes per second, stealing one 50 ns memory cycle per word. Percentage of memory cycles lost by the CPU (2 decimals)?
Numerical answer: ________
Q15 · MCQ · 1 mark(s) — Buffering
Double buffering lets:
- (A) two processes print at once
- (B) data be cached forever
- (C) the disk avoid seeks
- (D) one buffer be filled while the other is processed
✓Answer Vault
Try the questions first. Open when you are ready to check.
🔐 Open the Answer Vault
Q1 Answer: 764 · 1 mark(s)
7, 6, 4.
Re-read: Lesson 6.1.1 — Files, directories and access methods
Q2 Answer: (D) · 1 mark(s)
Freed only at count 0.
- (A) is wrong: One name remains.
- (B) is wrong: No.
- (C) is wrong: No.
Re-read: Lesson 6.1.1 — Files, directories and access methods
Q3 Answer: (A) · 1 mark(s)
It counts opens across processes.
- (B) is wrong: That holds the file pointer.
- (C) is wrong: Unrelated.
- (D) is wrong: Unrelated.
Re-read: Lesson 6.1.1 — Files, directories and access methods
Q4 Answer: 16.06 to 16.07 · 2 mark(s)
k = 256; (12 + 256 + 65536 + 16777216) KB.
Re-read: Lesson 6.1.2 — Allocation methods: contiguous, linked (FAT), indexed (inodes); free space
Q5 Answer: 3 · 2 mark(s)
Double-indirect range (1036 onward).
Re-read: Lesson 6.1.2 — Allocation methods: contiguous, linked (FAT), indexed (inodes); free space
Q6 Answer: 28 · 2 mark(s)
2⁴⁰ / 2¹² = 2²⁸ blocks.
Re-read: Lesson 6.1.2 — Allocation methods: contiguous, linked (FAT), indexed (inodes); free space
Q7 Answer: (B) · 1 mark(s)
Must follow pointers.
- (A) is wrong: That is indexed allocation.
- (C) is wrong: None.
- (D) is wrong: Growth is easy.
Re-read: Lesson 6.1.2 — Allocation methods: contiguous, linked (FAT), indexed (inodes); free space
Q8 Answer: 5.55 to 5.56 · 1 mark(s)
11.11 ms per rotation / 2.
Re-read: Lesson 6.2.1 — Disk structure and access time
Q9 Answer: 11 · 2 mark(s)
5 + 5 + (10/100) × 10.
Re-read: Lesson 6.2.1 — Disk structure and access time
Q10 Answer: 640 · 2 mark(s)
Arrival order.
Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK
Q11 Answer: 236 · 2 mark(s)
53 down to 0, then 183 up.
Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK
Q12 Answer: 382 · 2 mark(s)
146 + 199 + 37.
Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK
Q13 Answer: (C) · 1 mark(s)
No trip to the edge.
- (A) is wrong: That is C-SCAN.
- (B) is wrong: That is SSTF.
- (D) is wrong: No.
Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK
Q14 Answer: 2.5 · 2 mark(s)
500,000 words × 50 ns = 0.025 s per second.
Re-read: Lesson 6.2.3 — I/O techniques: programmed I/O, interrupts, DMA, buffering and spooling
Q15 Answer: (D) · 1 mark(s)
Producer and consumer overlap.
- (A) is wrong: That is spooling's job.
- (B) is wrong: No.
- (C) is wrong: No.
Re-read: Lesson 6.2.3 — I/O techniques: programmed I/O, interrupts, DMA, buffering and spooling