Disk disk arm scheduling algorithms time required to

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Spooling Spooling Spooling is a form of asynchronous user-level I/O Spooling directory Spooling daemon To To print, put file in spooling directory where daemon will find and print it Why? Disk Disk Arm Scheduling Algorithms Time required to read/write a disk block determined by 3 factors 1. Seek time (to locate cylinder) - dominates 2. Rotational delay (to locate sector) 3. Actual transfer time Options: Options: FCFS, SSF, Elevator At 11 – read on 1, 36, 16, 34, 9, and 12 FCFS problems? Shortest Seek First (SSF) disk scheduling algorithm: 12, 9,16,1,34,36, Problems? Elevator Elevator At 11 – read on 1, 36, 16, 34, 9, and 12 The elevator algorithm for scheduling disk requests Keep moving in the direction you are going; when nothing ahead of you; turn around Perform better or worse than SSF? Disk Disk Issues Reliability Performance Performance latency bandwidth Disk Disk Hardware -- RAID -- Raid levels 0 through 1 – blocks are striped across drives Backup and parity drives are shaded Disk Disk Hardware -- RAID -- Raid levels 3 through 5 Backup and parity drives are shaded Stable Stable Storage Disk errors -> write during a crash, spontaneous bit error error errors detected by ECC Operations for stable storage using 2 identical disks (spontaneous error: 1 drive only) Stable writes Write 1 disk, then read it back, check ECC, do N times until until it works, get a spare if not Write 2, …. Stable Stable Storage: reads Stable reads read disk 1, if ECC, try N times, else read disk 2, … since can’t have 2 disk errors, will succeed Stable Stable Storage: crash recovery Spontaneous bit errors (in 1 drive) are no problem CPU crashes during stable writes Power Power Management Batteries are not following Moore’s law OS must decide what state to put devices in: on, off, hibernate, sleep Hibernate uses less power, but more expensive to turn on than from sleep OS can try to reduce power and/or application can as well – power/latency or power/fidelity tradeoff Power management: Power management: Display The use of independent zones for backlighting the display Don’t Don’t illuminate windows no longer in active focus Power Management: Power Management: Disks Disk spinning wastes power Spin-down, but re-spinning has a high latency Provide more OS info to the application e.g. e.g. OS tells application that it has put disk in hibernation mode, application can delay writes until disk is on Power Power Management: CPU Voltage scaling modern CPU have several clock speed modes run slower, consume less power multicore: larger # of slower processors IBM Blue Gene Cutting voltage by two • cuts clock speed by two (linear) • cuts power by four (square) Power Power Management: CPU Multimedia example Decode rate must be 40 ms per frame Suppose frame can be decoded in 20 ms (full clock rate) Suppose it costs x joules to run for 40 ms full power a) Run full speed for 20 ms, idle for 20 (? joules) b) Run at half speed for 40 ms (? joules) Power Power Management Smart programs can use less energy • may mean poorer user experience Examples • change from color output to black and white • speech recognition reduces vocabulary • less resolution or detail in an image Next Next Lecture File Systems: 7/16 Project #3 out 7/16 HW #3 due 7/12 Read Chap. 4 MOS...
View Full Document

Ask a homework question - tutors are online