04/21/2004CSCI 315 Operating Systems Design1 Disk Scheduling.

Slides:



Advertisements
Similar presentations
Overview of Mass Storage Structure
Advertisements

Silberschatz, Galvin and Gagne Operating System Concepts Disk Scheduling Disk IO requests are for blocks, by number Block requests come in an.
Disks Disk Hardware (1) Disk parameters for the original IBM PC floppy disk and a Western Digital WD hard disk.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
OPERATING SYSTEMS CS3530 Summer 2014 OPERATING SYSTEMS CS3530 Summer 2014 Input/Output System Chapter 9.
Input/Output Management and Disk Scheduling
University of Pennsylvania 10/24/00CSE 3801 Disk Scheduling CSE 380 Lecture Note 11a Insup Lee.
04/18/2007CSCI 315 Operating Systems Design1 Mass Storage Structure Notice: The slides for this lecture have been largely based on those accompanying the.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
04/26/2010CSCI 315 Operating Systems Design1 Disk Scheduling and Management.
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
Based on the slides supporting the text
Disks.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
Disks CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
04/19/2004CSCI 315 Operating Systems Design1 Mass Storage Structure Notice: The slides for this lecture have been largely based on those accompanying the.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Disk and I/O Management
Device Management. So far… We have covered CPU and memory management Computing is not interesting without I/Os Device management: the OS component that.
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
1 Recitation 8 Disk & File System. 2 Disk Scheduling Disks are at least four orders of magnitude slower than main memory –The performance of disk I/O.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
Operating Systems CMPSC 473 I/O Management (4) December 09, Lecture 25 Instructor: Bhuvan Urgaonkar.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Disk & disk scheduling.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 12: Mass-Storage.
1Fall 2008, Chapter 12 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
CS 6502 Operating Systems Dr. J.. Garrido Device Management (Lecture 7b) CS5002 Operating Systems Dr. Jose M. Garrido.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.
Disks and Disk Scheduling Steve Muckle Monday, March 31st Spring 2003.
Chapter 12: Mass-Storage Systems
1.  Disk Structure Disk Structure  Disk Scheduling Disk Scheduling  FCFS FCFS  SSTF SSTF  SCAN SCAN  C-SCAN C-SCAN  C-LOOK C-LOOK  Selecting a.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Mass-Storage Systems Slide 1 Chapter 13 Mass-Storage Systems.
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
Device Management Mark Stanovich Operating Systems COP 4610.
Disk Average Seek Time. Multi-platter Disk platter Disk read/write arm read/write head.
Chapter 9 I/O System. 2 Input/Output System I/O Major objectives are: Take an application I/O request and send it to the physical device. Then, take whatever.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
1 Chapter 13 Mass-Storage Structure. 2 Disk Structure Disk drives are addressed as large 1- dimensional arrays of logical blocks, where the logical block.
M ASS S TORAGE S TRUCTURES Lecture: Operating System Concepts Lecturer: Pooja Sharma Computer Science Department, Punjabi University, Patiala.
Presentation-4 Group-A1 Professor Mohamed Khalil Anita Kanuganti Hemanth Rao.
Part IV I/O System Chapter 12: Mass Storage Structure.
Device Management Andy Wang Operating Systems COP 4610 / CGS 5765.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 11: File System Implementation.
Chapter 10: Mass-Storage Systems
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Chapter 12: Mass-Storage Structure
Operating System I/O System Monday, August 11, 2008.
Disk Scheduling Algorithms
Mass-Storage Structure
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Chapter 14 Based on the slides supporting the text
Moving-head Disk Machanism
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Overview Continuation from Monday (File system implementation)
Disks and scheduling algorithms
Disks and Disk Scheduling
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

04/21/2004CSCI 315 Operating Systems Design1 Disk Scheduling

04/21/2004CSCI 315 Operating Systems Design2 Disk Structure sector track read/write head arm direction of rotation direction of movement Points to consider: Sector sizes (number of bits per sector) should be fixed. The density of the magnetic material is constant on the surface of the disk. Size of the sector gets smaller as the radius of the track gets smaller. The disk rotates at a constant speed. To find a block, the head is moved to the appropriate track, and then the correct sector is found as the disk rotates. Organization of a disk surface

04/21/2004CSCI 315 Operating Systems Design3 Disk Structure sector track read/write head arm direction of rotation direction of movement The disk rotation is given in rotations per minute (RPM). The time to find a track is proportional to the distance the head must travel. The average time to find a sector within a track is roughly half the time for a full rotation. Question: If the time to move from track i to track (i+1) is given by , assuming that the disk head is at track 0 (all the way out), could you calculate the time to get to sector 4 in track 5? Organization of a disk surface

04/21/2004CSCI 315 Operating Systems Design4 Disk Structure direction of movement direction of rotation Multi-surface disk arm read/write heads cylinder A cylinder is the collection of all the same tracks across all the multiple disk surfaces. There is a time associated with turning heads on and off so that a different surface can be accessed. We call this overhead the head- switching time. The time to move the arm to read another cylinder is due to the mechanics of the arm. It is certainly much large than the head-switching time, which is due to electronics only. Question: How should one organize data across multiple surfaces to minimize access overhead?

04/21/2004CSCI 315 Operating Systems Design5 Disk Request A request must specify: –Whether the operation is input or output, –The disk address for the transfer, –The memory address for the transfer, –The size of the data block to be transferred (number of bytes). Disk requests are generated by processes. When the disk is busy serving a request, other incoming requests must be stored for later processing. For this purpose, the OS organizes these requests in a queue of pending requests for that disk unit. When the disk finishes serving a request, the OS much check the queue and if it is not empty, serve another request. What policy should be used for dealing with the queue? Disk Scheduling

04/21/2004CSCI 315 Operating Systems Design6 FCFS Scheduling Consider the following sequence of requests where each number corresponds to a disk cylinder: 98, 183, 37, 122, 14, 124, 65, 67 queue = 98, 183, 37, 122, 14, 124, 65, Question: How much does the disk head travel to serve these requests? Question: How does this scheduling of requests affect the disk performance? Question: What metric could one define to characterize performance here?

04/21/2004CSCI 315 Operating Systems Design7 SSTF Scheduling 98, 183, 37, 122, 14, 124, 65, 67 queue = 65, 67, 37, 14, 98, 122, 124, Question: If this is similar to SJF, does it share the same drawback? Question: Is the performance of SSTF any better than that of FCFS? FCFS Total head movement = 640 Question: Is the performance of SSTF optimal? SSTF Total head movement = 236

04/21/2004CSCI 315 Operating Systems Design8 SCAN Scheduling 98, 183, 37, 122, 14, 124, 65, FCFS Total head movement = 640 SSTF Total head movement = 236 SCAN Total head movement = ? Assume the distribution of requests for cylinders is uniform. Consider the density of requests when the head reaches one end and reverses direction. Hmmm… few requests will be right in front of the head… The heaviest density will be at the other end of the disk and those requests will have waited the longest. Why not just go there first?

04/21/2004CSCI 315 Operating Systems Design9 C-SCAN Scheduling 98, 183, 37, 122, 14, 124, 65, When the head reaches the end of the disk, it immediately returns to cylinder 0. The algorithm essentially treats the cylinders as a circular list that wraps around from the final cylinder to the first one.

04/21/2004CSCI 315 Operating Systems Design10 LOOK Scheduling 98, 183, 37, 122, 14, 124, 65, Well, by now you have realized that scanning all the way to the extreme ends of the disk is perhaps wasteful. In practice, one could move the head only as far as the request that is farthest out.

04/21/2004CSCI 315 Operating Systems Design11 C-LOOK Scheduling 98, 183, 37, 122, 14, 124, 65,

04/21/2004CSCI 315 Operating Systems Design12 Choosing a Disk Scheduling Algorithm The criteria should involve fairness and performance. Performance depends on the number and type of requests. Given a string of cylinder references, one could find the optimal schedule to serve them all using, for instance, dynamic programming. Remember, however, that computing the optimal schedule takes time! Another point to remember is that disk performance depends heavily on the file allocation method, on the location of directories and indices. If disk scheduling is a separate OS module, it can easily be replaced. Modern disk units don’t disclose the physical location of disk blocks, so it can be challenging to do scheduling in the OS. Disk controllers, however, can handle disk scheduling themselves, lessening the burden on the OS.