1 / 19

Operating Systems CMPSCI 377 Lecture 18: Storage Systems

Operating Systems CMPSCI 377 Lecture 18: Storage Systems. Emery Berger University of Massachusetts, Amherst. Last Time: Improving I/O Performance. Approaches: Caching – reduces data transfer Large data transfers DMA. Today. Improving performance of storage systems (i.e., the disk)

alyssa
Download Presentation

Operating Systems CMPSCI 377 Lecture 18: Storage Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Operating SystemsCMPSCI 377Lecture 18: Storage Systems Emery Berger University of Massachusetts, Amherst

  2. Last Time:Improving I/O Performance • Approaches: • Caching – reduces data transfer • Large data transfers • DMA

  3. Today • Improving performance of storage systems (i.e., the disk) • Scheduling • Interleaving • Read-ahead • Tertiary storage

  4. Disk Operations • Disks are SLOW! • 1 disk seek = 40,000,000 cycles • Latency: • Seek – position head over track/cylinder • Rotational delay – time for sector to rotate underneath head • Bandwidth: • Transfer time – move bytes from disk to memory

  5. Calculating Disk Operations Time • Read/write n bytes: • Can’t reduce transfer time • Can we reduce latency? I/O time = seek + rotational delay + transfer(n)

  6. Reducing Latency • Minimize seek time & rotational latency: • Smaller disks • Faster disks • Sector size tradeoff • Scheduling • Layout

  7. Disk Head Scheduling • Change order of disk accesses • Reduce length & number of seeks • Algorithms • FCFS • SSTF • SCAN, C-SCAN • LOOK, C-LOOK

  8. FCFS I/O time = seek + rotational delay + transfer(n) • First-come, first-serve • Example: disk tracks – (65, 40, 18, 78) • assume head at track 50 • Total seek time? • 15+25+22+60 = 122 18 65 78 40 disk

  9. SSTF I/O time = seek + rotational delay + transfer(n) • Shortest-seek-time first (like SJF) • Example: disk tracks – (65, 40, 18, 78) • assume head at track 50 • Total seek time? • 10+22+47+13 = 92 • Is this optimal? 18 65 78 40 disk

  10. SCAN I/O time = seek + rotational delay + transfer(n) • Always move back and forth across diska.k.a. elevator • Example: disk tracks – (65, 40, 18, 78) • assume head at track 50, moving forwards • Total seek time? • 15+13+22+60+22=132 • When is this good? 18 65 78 40 disk

  11. C-SCAN I/O time = seek + rotational delay + transfer(n) • Circular SCAN:Go back to start of disk after reaching end • Example: disk tracks – (65, 40, 18, 78) • assume head at track 50, moving forwards • Total seek time? • 15+13+22+100+18+40=208 • Can be expensive, but more fair 18 65 78 40 disk

  12. LOOK variants • Instead of going to end of disk,go to last request in each direction • SCAN, C-SCAN ) LOOK, C-LOOK

  13. Exercises • 5000 cylinders, currently at 143, moving forwards(86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 ) • FCFS • SSTF • SCAN • LOOK • C-SCAN • C-LOOK • Find sequence & total seek time • First = 0, last = 4999

  14. Solutions • FCFS • 143, 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 – distance: 7,081   • SSTF • 143, 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774 – distance: 1,745  • SCAN • 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 130, 86 – distance: 9,769  • LOOK • 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 86 – distance: 3,319  • C-SCAN • 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 0, 86, 130 – distance: 9,813 • C-LOOK • 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 86, 130 – distance: 3,363

  15. Today • Improving performance of storage systems (i.e., the disk) • Scheduling • Interleaving • Read-ahead • Tertiary storage

  16. Disk Interleaving • Contiguous allocation • Requires OS response before disk spins past next block • Instead of physically contiguous allocation,interleave blocks • Relative to OS speed, rotational speed

  17. Read-Ahead • Reduce seeks by reading blocks from disk ahead of user’s request • Place in buffer on disk controller • Similar to pre-paging • Easier to predict future accesses on disk?

  18. Tertiary Storage • a.k.a. long-term storage • disks = secondary storage • used for archival data or backups • Examples: • tape drives • CD-R, DVD-R/W • Performance still somewhat important • not much OS can do

  19. Summary • OS can improve storage system performance • Scheduling • Interleaving • Read-ahead

More Related