DOC PREVIEW
CMU CS 15410 - Disks and Disks Scheduling

This preview shows page 1-2-3-25-26-27-28-50-51-52 out of 52 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Disks and Disk SchedulingOverviewAnatomy of a Hard DriveSlide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Disk Scheduling AlgorithmsSlide 31First Come First Served (FCFS)SCANLOOKCSCANC-LOOKSlide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50Shortest Seek Time First (SSTF)Shortest Positioning Time First (SPTF)Weighted Shortest Positioning Time First (WSPTF)ConclusionsDisks and Disk SchedulingOriginal lecture given by Steve Muckle on Monday, March 31st 2003Additional Slides Taken from Eno Thereska’s July Systems TalkBrian RailingFriday, October 31st 200315-410 Fall 2003Carnegie Mellon University 2OverviewAnatomy of a Hard DriveCommon Disk Scheduling AlgorithmsCarnegie Mellon University 5Anatomy of a Hard DriveOn the outside, a hard drive looks like thisTaken from “How Hard Disks Work”http://computer.howstuffworks.com/hard-disk2.htmCarnegie Mellon University 6Anatomy of a Hard DriveIf we take the cover off, we see that there actually is a “hard disk” insideTaken from “How Hard Disks Work”http://computer.howstuffworks.com/hard-disk2.htmCarnegie Mellon University 7Anatomy of a Hard DriveA hard drive usually contains multiple disks, called plattersThese spin at thousands ofRPM (5400,7200, etc)Taken from “How Hard Disks Work”http://computer.howstuffworks.com/hard-disk2.htmCarnegie Mellon University 8Anatomy of a Hard DriveInformation is written to and read from the platters by the read/write heads on the disk armTaken from “How Hard Disks Work”http://computer.howstuffworks.com/hard-disk2.htmCarnegie Mellon University 9Anatomy of a Hard DriveBoth sides of each platter store informationEach side ofa platter iscalled asurfaceEach surfacehas its ownread/write headTaken from “How Hard Disks Work”http://computer.howstuffworks.com/hard-disk2.htmCarnegie Mellon University 10Anatomy of a Hard DriveHow are the surfaces organized?a surfaceCarnegie Mellon University 11Anatomy of a Hard DriveEach surface is divided by concentric circles, creating trackstracksCarnegie Mellon University 12Anatomy of a Hard DriveThe matching tracks on all surfaces are collectively called a cylinderCarnegie Mellon University 13Anatomy of a Hard DriveThese tracks are further divided into sectorsCarnegie Mellon University 14Anatomy of a Hard DriveA sector is the smallestunit of data transfer toor from the diskMost modern harddrives have 512 bytesectorsa sectorCarnegie Mellon University 15Anatomy of a Hard DriveDoes this mean that sectorson the outside of a surfaceare larger than those onthe inside?Modern hard drivesfix this with zoned bit recordingTaken from “Reference Guide – Hard Disk Drives”http://www.storagereview.com/map/lm.cgi/zoneCarnegie Mellon University 16Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headdesired sectordisk rotatescounter-clockwiseCarnegie Mellon University 17Anatomy of a Hard DriveWe need to do two things to transfer a sector1. Move the read/write head to the appropriate track (seek)2. Wait until the desired sector spins aroundCarnegie Mellon University 18Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 19Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 20Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 21Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 22Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 23Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 24Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 25Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 26Anatomy of a Hard DriveWhy don’t we read in a sector from the diskread/write headCarnegie Mellon University 27Anatomy of a Hard DriveOn average, we will have to move the read/write head over half the tracksThe time to do this is the average seek time, and is ~10msWe will also have to wait half a rotationThe time to do this is rotational latency, and on a 5400 rpm drive is ~5.5msCarnegie Mellon University 28Anatomy of a Hard DriveThere are many other things that determine overall disk access time including - settle time, the time to stabilize the read/write head after a seek- command overhead, the time for the disk to process a command and start doing somethingThe things are fairly minor compared to seek time and rotational latencyCarnegie Mellon University 29Anatomy of a Hard DriveTotal drive random access time is on the order of 15 to 20 millisecondsBut wait! Disk transfer rates are tens of MbytesOh man, disks are slowWhat can we, as operating system programmers, do about this?Carnegie Mellon University 30Disk Scheduling AlgorithmsThe goal of a disk scheduling algorithm is to be nice to the diskWe can help the disk by giving it requests that are located close to each other on the diskThis minimizes seek time, and possibly rotational latencyThere exist a variety of ways to do thisCarnegie Mellon University 31Disk Scheduling AlgorithmsWhat the OS knows about the disk?Logical Block NumbersInterface: IDE or SCSIWhat happened to sectors, tracks, etc?They are hidden behind the logical block numbersHow are they used?File systems assign logical blocks to filesCarnegie Mellon University 32First Come First Served (FCFS)Requests are sent to the disk as they are generated by the OSTrivial to implementFair – no request will be starved because of its location on the diskProvides an unacceptably high mean response timeCarnegie Mellon University 33SCANSend requests in ascending cylindersWhen last cylinder is reached, reverse the scanMean response time is worse than SSTF, but better than FCFSBetter response time variance than SSTFUnfair – why?Carnegie Mellon University 34LOOKJust like SCAN – sweep back and forth through cylindersIf


View Full Document

CMU CS 15410 - Disks and Disks Scheduling

Download Disks and Disks Scheduling
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Disks and Disks Scheduling and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Disks and Disks Scheduling 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?