Chapter 11 Flashcards
(33 cards)
Why does SSTF scheduling favor middle cylinders?
Middle cylinders are closer to more cylinders on average. Requests to middle cylinders have shorter average seek times than requests to edge cylinders. Creates bias toward center of disk.
Why is balancing file-system I/O important in multitasking?
Prevents bottlenecks on single disk/controller. Improves overall system throughput. Allows parallel I/O operations. Reduces waiting time for processes.
What are tradeoffs between rereading code pages vs using swap space?
Rereading from file: saves swap space but slower due to file system overhead. Swap space: faster access but consumes additional storage. Trade memory usage for speed.
Give two examples where RAID data loss occurs despite protection.
Power failure during write operation corrupting multiple disks. Controller failure affecting all disks in array. Multiple simultaneous disk failures exceeding RAID level protection.
How to calculate effective transfer rate?
Effective rate = total bytes / (access latency + transfer time). Transfer time = bytes / streaming rate. Access latency reduces effective rate for small transfers.
What is device utilization formula?
Utilization = effective transfer rate / streaming transfer rate. Shows how much of theoretical bandwidth is actually achieved.
What transfer size gives 25% utilization for 15ms latency 5MB/s disk?
Access time = transfer time for 25% utilization. 15ms = (bytes / 5MB/s) * 0.75. Minimum transfer ≈ 60KB for acceptable utilization.
When is disk considered random access vs sequential?
Random access: large transfers where access latency is small fraction of total time. Sequential: small transfers where access latency dominates.
Can RAID 1 achieve better read performance than RAID 0?
Yes - RAID 1 can read from either mirror choosing closer head position. RAID 0 must read from specific stripe location. Better seek optimization possible.
What are three advantages of HDDs?
Large capacity at low cost. Mature technology with proven reliability. Good for sequential access workloads like backup and archival.
What are three advantages of NVM devices?
No moving parts - more reliable. Much lower access latency. Better random access performance. Lower power consumption.
Why are disk scheduling algorithms unfair except FCFS?
SSTF SCAN C-SCAN can indefinitely postpone requests to distant cylinders. Requests at edges may starve while middle requests are served.
How to modify SCAN to ensure fairness?
Add maximum wait time limit. Use aging to boost priority of long-waiting requests. Implement deadline-based scheduling.
Why is fairness important in multi-user systems?
Prevents user starvation. Ensures predictable response times. Maintains system responsiveness for all users. Critical for interactive applications.
When should OS be unfair in serving I/O requests?
Real-time systems: critical deadlines take priority. System operations: metadata writes before data writes. Emergency: swap operations during memory pressure.
How does FCFS disk scheduling work?
Serve requests in arrival order. Simple but can cause long seek times. No optimization but guarantees fairness and no starvation.
How does SCAN disk scheduling work?
Move head in one direction serving all requests. When reach end reverse direction. Also called elevator algorithm. Reduces seek time vs FCFS.
How does C-SCAN work?
Move head in one direction then jump to beginning. More uniform wait times than SCAN. Treats disk as circular queue.
How many blocks accessed for RAID 5 single block write?
4 blocks total: read old data read old parity calculate new parity write new data write new parity.
How many blocks for RAID 5 seven continuous block write?
If 7 blocks span multiple parity groups: multiple read-modify-write operations. More efficient than 7 separate single-block writes.
Which files for RAID 1 vs RAID 5 placement?
RAID 1: frequently accessed files random I/O patterns critical data needing fast access. RAID 5: large sequential files archival data less critical applications.
How to calculate MTBF for disk farm?
Individual MTBF / number of drives. 1000 drives with 750000 hour MTBF = 750 hours between failures ≈ once per month.
What does 1 million hour MTBF mean for warranty?
MTBF ≈ 114 years suggests very reliable device. Warranty typically much shorter (3-5 years) than statistical lifetime.
Why does OS need accurate disk block information?
Can optimize file placement for sequential access. Reduce seek times by placing related files nearby. Schedule I/O to minimize head movement.