- 2073 Bhadra · 6 marks
- Year not given
Structured I/O software; SCAN vs SSTF
Short answer
I/O software is layered: interrupt handlers, device drivers, device-independent software, and user-level I/O software. SSTF gives higher throughput under light load by choosing the nearest request, but can starve requests; SCAN has slightly lower average throughput but no starvation and steady response under heavy load. For the sample queue both gave 236 cylinders.
Briefly mention the structured I/O software with suitable diagram. Compare the throughput (overall performance) of SCAN with SSTF.
Structured I/O software
I/O software is organised in four layers, so that each layer does one job and hides details from the layer above (Tanenbaum).
User process (read, write, printf)
|
+-----------------------------+
| User-level I/O software | libraries, spooling
+-----------------------------+
| Device-independent OS soft. | naming, buffering,
| | protection, uniform I/F
+-----------------------------+
| Device drivers | device specific code
+-----------------------------+
| Interrupt handlers | wake blocked driver
+-----------------------------+
|
Hardware
- Interrupt handlers: save registers, service the interrupt, unblock the waiting driver, then return. They are kept short and hidden deep in the OS.
- Device drivers: device-specific code that issues commands to the controller registers, and blocks until the interrupt arrives. One driver per device type.
- Device-independent software: uniform interface to drivers, naming, protection, buffering, error reporting, allocating dedicated devices, device-independent block size.
- User-space I/O software: library procedures (e.g.
printf) and spooling systems (print spooler).
SCAN vs SSTF (throughput)
| Point | SSTF | SCAN (elevator) |
|---|---|---|
| Selection | Nearest request | Request in current sweep direction |
| Throughput | High under light/moderate load | Slightly lower on average, but good and steady under heavy load |
| Average seek | Usually lowest | A little higher (goes to the end of the disk) |
| Starvation | Possible for far requests | None; every request is served within one sweep |
| Response time variance | High | Low |
| Bias | Favours the central region | Favours middle cylinders mildly, but bounded wait |
For the queue 98, 183, 37, 122, 14, 124, 65, 67 with head at 53, SSTF gives 236 and SCAN (moving towards 0) also gives 236, but SCAN is preferred when load is heavy, as SSTF can starve requests and has unpredictable delay.
Conclusion: SSTF gives slightly better raw throughput for light load, whereas SCAN gives nearly the same throughput with fairness and predictable response time.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Structured I/O software with diagram · Operating System, chapter 6
- Interleaving; SSTF, SCAN, C-SCAN order · Operating System, chapter 6
- Disk scheduling: FCFS, SSTF, SCAN, LOOK, C-SCAN · Operating System, chapter 6
- Compare Z-buffer, A-buffer; scan-line · Computer Graphics, chapter 7
- Compare software models; propose a fourth model · Instrumentation II, chapter 9
- Structured vs unstructured, NoSQL taxonomy · Big Data Technologies, chapter 4
- Why system modeling; weakness of structured analysis · Software Engineering, chapter 2