Operating Systems{week 15b}
Rensselaer Polytechnic InstituteCSCI-4210 – Operating SystemsDavid Goldschmidt, Ph.D.
Virtual filesystem
A virtual filesystem provides transparent access to different filesystem types on multiple device types and disk partitions
Virtual machines (i)
A virtual machine is a layered approach that logically combines the kernel operating system and hardware Creates the illusion
of multiple processes,each executing on itsown virtual processorwith its own virtualmemory
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9002552
Virtual machines (ii)
Non-virtual machine Virtual machine
Virtual machines (iii)
Java programs execute on a native Java Virtual Machine (JVM)
Virtual machines (iv)
Virtual machines provide complete protection of system resources Each virtual machine is isolated from
all other virtual machines▪ which prohibits direct sharing
of system resources Virtual machines can be difficult to
implementdue to the effort required to providean exact duplicate of each underlying machine
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
Disk drives & the disk controller Disks and other devices operate in
parallel to the CPU (but are much slower) Typical disk
drive mechanism: Arm seeks to the
appropriate track Disk rotates until
the desired sectoris accessed
Disk access time
Disk access time is the sumof the seek time and therotational latency Cache surrounding
sectors or entire trackto improve performance
Principle of locality (again!)
I/O system structure
I/O request
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
I/O performance optimization (ii) Use buffering to make
physical I/O requestsas large as possible This reduces the
number of I/O requests Space-time tradeoff Misleads programmers? Other disadvantages?
I/O performance optimization (iii) Use caching to keep retrieved data
in fast memory for potentialfuture access Eliminates one or more
I/O requests Space-time tradeoff Principle of locality
(yet again!)
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
Disk I/O scheduling
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)
maximize throughput,ensure fairness, etc.
First-come-first-served (FCFS) Request reference string specifies
requested tracks:44, 20, 95, 4, 50, 52, 47, 61, 87, 25
First-come-first-served (FCFS) Request reference string specifies
requested tracks:98, 183, 37, 122, 14, 124, 65, 67
Shortest seek time first (SSTF) Request reference string specifies
requested tracks:44, 20, 95, 4, 50, 52, 47, 61, 87, 25
Shortest seek time first (SSTF) Request reference string specifies
requested tracks:98, 183, 37, 122, 14, 124, 65, 67
Elevator (SCAN)
Request reference string specifies requested tracks:44, 20, 95, 4, 50, 52, 47, 61, 87, 25
repeated end-to-end scans
Elevator (SCAN)
Request reference string specifies requested tracks:98, 183, 37, 122, 14, 124, 65, 67
Circular SCAN and LOOK
Circular SCAN (C-SCAN) scans in one direction When it reaches one end of the disk, it returns
to 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 as
there are pending requests in that direction Otherwise, it reverses direction immediately
Top Related