CS Atlas GATE 2027
Operating Systems course
0 / 58 complete

Operating Systems/Phase 6 · File Systems & I/O

Chapter review LI-6.2 · Item 51 of 58

Chapter 6.2 Lock-in

Read at your own pace. Try the questions before opening the answers.

On this page

Phase 6Ch 6.2 Disks and I/O

ACompressed recap

Capacity = surfaces × tracks × sectors × bytes; access = seek + half-rotation latency + transfer; rotation = 60/RPM. Disk scheduling on the running queue (head 53): FCFS 640, SSTF 236, SCAN ↓ 236 / ↑ 331, LOOK ↑ 299 / ↓ 208, C-SCAN ↑ 382, C-LOOK ↑ 322. Programmed I/O busy-waits; interrupts cost per transfer; DMA one interrupt per block, cycle stealing; buffering, caching, spooling.

BMerged rule card

6.2.1 Disk structure and access time

  • Track, sector, cylinder; one head per surface.
  • Capacity = surfaces × tracks × sectors × bytes.
  • Access = seek + latency + transfer; rotation = 60/RPM s; average latency = half a rotation.
  • Transfer rate = bytes per track × rotations per second. Linear sector = (c × heads + h) × sectors + s.
  • SSD: no seek, no rotation.

6.2.2 Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK

  • FCFS: arrival order. SSTF: nearest next (starvation).
  • SCAN: sweep to the disk's end, reverse. LOOK: reverse at the last request.
  • C-SCAN: sweep to the end, jump to the other end, continue same direction. C-LOOK: jump from last request to the farthest one.
  • Running queue (head 53): FCFS 640, SSTF 236, SCAN ↓ 236 / ↑ 331, LOOK ↑ 299 / ↓ 208, C-SCAN ↑ 382, C-LOOK ↑ 322.

6.2.3 I/O techniques: programmed I/O, interrupts, DMA, buffering and spooling

  • Programmed I/O: CPU polls and moves data (busy waiting).
  • Interrupt I/O: CPU fraction = transfers/s × overhead per transfer.
  • DMA: one interrupt per block; cycle stealing fraction = words/s × memory cycle.
  • Buffer (in transit), double buffering, cache (copy for reuse), spool (queue of jobs for a non-sharable device).
  • Blocking, non-blocking, asynchronous I/O calls.

CInterleaved GATE-style questions

Q1 · NAT · 1 mark(s) — Latency

A disk spins at 6000 rpm. Average rotational latency in ms?

Numerical answer: ________

Q2 · NAT · 2 mark(s) — Capacity

4 platters with 2 surfaces each, 4096 tracks per surface, 64 sectors per track, 512 bytes per sector. Capacity in GB?

Numerical answer: ________

Q3 · NAT · 2 mark(s) — FCFS

Head at 100; requests 23, 89, 132, 42, 187 served FCFS. Total head movement?

Numerical answer: ________

Q4 · NAT · 2 mark(s) — SSTF

Head at 100; requests 23, 89, 132, 42, 187 (SSTF). Total head movement?

Numerical answer: ________

Q5 · NAT · 2 mark(s) — SCAN

Head at 100 moving towards 199 (cylinders 0–199); requests 23, 89, 132, 42, 187 (SCAN). Total head movement?

Numerical answer: ________

Q6 · MCQ · 1 mark(s) — C-SCAN

The main advantage of C-SCAN over SCAN is:

  1. (A) less total movement always
  2. (B) more uniform waiting time across cylinders
  3. (C) no need to know the head direction
  4. (D) it serves the nearest request first

Q7 · NAT · 1 mark(s) — Interrupts

A device sends 100,000 words per second, one interrupt per word, 2 µs per interrupt. Percentage of CPU time used?

Numerical answer: ________

Q8 · MCQ · 1 mark(s) — DMA

Cycle stealing refers to:

  1. (A) interrupts being lost
  2. (B) the disk skipping sectors
  3. (C) the DMA controller using memory cycles that delay the CPU
  4. (D) the CPU taking time slices from processes

DAnswer Vault

Try the questions first. Open when you are ready to check.

🔐 Open the Answer Vault

Q1 Answer: 5 · 1 mark(s)

10 ms per rotation / 2.

Re-read: Lesson 6.2.1 — Disk structure and access time

Q2 Answer: 1 · 2 mark(s)

8 × 2¹² × 2⁶ × 2⁹ = 2³⁰.

Re-read: Lesson 6.2.1 — Disk structure and access time

Q3 Answer: 421 · 2 mark(s)

77 + 66 + 43 + 90 + 145.

Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK

Q4 Answer: 273 · 2 mark(s)

100 → 89 → 132 → 187 → 42 → 23.

Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK

Q5 Answer: 275 · 2 mark(s)

99 up to 199, then 176 down to 23.

Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK

Q6 Answer: (B) · 1 mark(s)

Every cylinder is reached at regular intervals.

  • (A) is wrong: Not always less.
  • (C) is wrong: It sweeps one way.
  • (D) is wrong: That is SSTF.

Re-read: Lesson 6.2.2 — Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK

Q7 Answer: 20 · 1 mark(s)

0.2 s per second.

Re-read: Lesson 6.2.3 — I/O techniques: programmed I/O, interrupts, DMA, buffering and spooling

Q8 Answer: (C) · 1 mark(s)

Both share the memory bus.

  • (A) is wrong: No.
  • (B) is wrong: No.
  • (D) is wrong: That is pre-emption.

Re-read: Lesson 6.2.3 — I/O techniques: programmed I/O, interrupts, DMA, buffering and spooling

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.