1 / 23

Operating Systems {week 16b }

Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D. Operating Systems {week 16b }. Virtual filesystem. A virtual filesystem provides transparent access to different filesystem types on multiple device types and disk partitions. Virtual machines (i).

Download Presentation

Operating Systems {week 16b }

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. Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D. Operating Systems{week 16b}

  2. Virtual filesystem • A virtual filesystem provides transparent access to different filesystem types on multiple device types and disk partitions

  3. Virtual machines (i) • A virtual machine is a layered approach that logically combines the kernel operating system and hardware • Creates the illusionof multiple processes,each executing on itsown virtual processorwith its own virtualmemory http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9002552

  4. Virtual machines (ii) Virtual machine Non-virtual machine

  5. Virtual machines (iii) • Java programs execute on a native Java Virtual Machine (JVM)

  6. Virtual machines (iv) • Virtual machines provide complete protection of system resources • Each virtual machine is isolated fromall other virtual machines • which prohibits direct sharingof system resources • Virtual machines can be difficult to implementdue to the effort required to providean exact duplicate of each underlying machine

  7. I/O system • The Input/Output (I/O) System has two primary objectives: • Handle application I/O requests • Map logical address to physical disk or device address • Send response back to the application • Optimize I/O performance • Depends on request type and device type

  8. Disk drives & the disk controller • Disks and other devices operate in parallel to the CPU (but are much slower) • Typical diskdrive mechanism: • Arm seeks to theappropriate track • Disk rotates untilthe desired sectoris accessed

  9. Disk access time • Disk access time is the sumof the seek time and therotational latency • Cache surroundingsectors or entire trackto improve performance • Principle of locality (again!)

  10. I/O system structure

  11. I/O request

  12. I/O performance optimization (i) • Disk access times are orders of magnitude slower than CPU execution times • Improve I/O performance by: • Reducing the number of I/O requests • Implementing buffering • Implementing caching • Efficiently scheduling I/O requests do this at theapplication layer

  13. I/O performance optimization (ii) • Use buffering to makephysical I/O requestsas large as possible • This reduces thenumber of I/O requests • Space-time tradeoff • Misleads programmers? • Other disadvantages?

  14. I/O performance optimization (iii) • Use caching to keep retrieved datain fast memory for potentialfuture access • Eliminates one or moreI/O requests • Space-time tradeoff • Principle of locality (yet again!)

  15. Disk context switch • A disk context switch occurs when switching from one I/O request to another • Disk context switch time is substantially higherthan process context switch • Disk context switch time is substantially lowerthan disk read/write operation • The time to complete the nth I/O operation depends on where the (n-1)th operation finished

  16. Disk I/O scheduling maximize throughput, ensure fairness, etc. • Goal: optimize disk performance • Scheduling algorithm determines which pending disk I/O request to select next: • First-Come-First-Served (FCFS) • Shortest Seek Time First (SSTF) • Elevator (SCAN) and Circular SCAN (C-SCAN)

  17. First-come-first-served (FCFS) • Request reference string specifies requested tracks: 44, 20, 95, 4, 50, 52, 47, 61, 87, 25

  18. First-come-first-served (FCFS) • Request reference string specifies requested tracks: 98, 183, 37, 122, 14, 124, 65, 67

  19. Shortest seek time first (SSTF) • Request reference string specifies requested tracks: 44, 20, 95, 4, 50, 52, 47, 61, 87, 25

  20. Shortest seek time first (SSTF) • Request reference string specifies requested tracks: 98, 183, 37, 122, 14, 124, 65, 67

  21. Elevator (SCAN) • Request reference string specifies requested tracks: 44, 20, 95, 4, 50, 52, 47, 61, 87, 25 repeated end-to-end scans

  22. Elevator (SCAN) • Request reference string specifies requested tracks: 98, 183, 37, 122, 14, 124, 65, 67

  23. Circular SCAN and LOOK • Circular SCAN (C-SCAN) scans in one direction • When it reaches one end of the disk, it returnsto the beginning of the disk without servicingany requests on the return trip • LOOK (and C-LOOK) algorithms • Disk arm moves in one direction as long asthere are pending requests in that direction • Otherwise, it reverses direction immediately

More Related