Example: bachelor of science

Chapter 12: Mass-Storage Systems - University of Cincinnati

Chapter 12: Mass-Storage SystemsChapter 12: Mass-Storage , Galvin and Gagne 2009 Operating System ConceptsChapter 12: Mass-Storage SystemsChapter 12: Mass-Storage SystemsnOverview of Mass Storage StructurenDisk StructurenDisk AttachmentnDisk SchedulingnDisk ManagementnSwap-Space ManagementnRAID StructurenDisk AttachmentnStable-Storage ImplementationnTertiary Storage DevicesnOperating System IssuesnPerformance , Galvin and Gagne 2009 Operating System ConceptsObjectivesObjectivesnDescribe the physical structure of secondary and tertiary storage devices and the resulting effects on the uses of the devicesnExplain the performance characteristics of Mass-Storage devicesnDiscuss operating-system services provided for mass storage, including RAID and.

4.3BSD allocates swap space when process starts; holds text segment (the program) and data segment. Kernel uses swap maps to track swap-space use. Linux and late versions of Solaris only allocate swap space when a page is forced out Linux supports multiple swap partitions, and suggests that they be at

Tags:

  Linux, Process

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Chapter 12: Mass-Storage Systems - University of Cincinnati

1 Chapter 12: Mass-Storage SystemsChapter 12: Mass-Storage , Galvin and Gagne 2009 Operating System ConceptsChapter 12: Mass-Storage SystemsChapter 12: Mass-Storage SystemsnOverview of Mass Storage StructurenDisk StructurenDisk AttachmentnDisk SchedulingnDisk ManagementnSwap-Space ManagementnRAID StructurenDisk AttachmentnStable-Storage ImplementationnTertiary Storage DevicesnOperating System IssuesnPerformance , Galvin and Gagne 2009 Operating System ConceptsObjectivesObjectivesnDescribe the physical structure of secondary and tertiary storage devices and the resulting effects on the uses of the devicesnExplain the performance characteristics of Mass-Storage devicesnDiscuss operating-system services provided for mass storage, including RAID and.

2 Galvin and Gagne 2009 Operating System ConceptsOverview of Mass Storage StructureOverview of Mass Storage StructurenMagnetic tapelWas early secondary-storage mediumlRelatively permanent and holds large quantities of datalAccess time slow And random access ~1000 times slower than disklMainly used for backup, storage of infrequently-used data, transfer medium between systemslKept in spool and wound or rewound past read-write headlOnce data under head, transfer rates comparable to diskl20-200GB typical storagelCommon technologies are 4mm, 8mm, 19mm, LTO-2 and SDLTnToday primary mass storage structure is magnetic diskslTape used for backuplDepending on capacity required, CD/DVD also sometimes used for , Galvin and Gagne 2009 Operating System ConceptsOverview of Mass Storage Structure (Cont.)

3 Overview of Mass Storage Structure (Cont.)nMagnetic disks provide bulk of secondary storage of modern computerslDrives rotate at 60 to 200 times per secondlTransfer rate is rate at which data flow between drive and computerlPositioning time (random-access time) is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency)lHead crash results from disk head making contact with the disk surface That s badnDisks can be removablenDrive attached to computer via I/O buslBusses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSIlHost controller in computer uses bus to talk to disk controller built into drive or storage , Galvin and Gagne 2009 Operating System ConceptsDisk StructureDisk StructurenDisk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.

4 NThe 1-dimensional array of logical blocks is mapped into the sectors of the disk 0 is the first sector of the first track on the outermost proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to , Galvin and Gagne 2009 Operating System ConceptsDisk AttachmentDisk AttachmentnHost-attached storage accessed through I/O ports talking to I/O bussesnSCSI itself is a type of bus, up to 16 devices on one cable, SCSI initiator requests operation and SCSI targets perform tasks lEach target can have up to 8 logical units (disks attached to device controllernFibre Channel (FC) is high-speed serial architecturelCan be switched fabric with 24-bit address space the basis of storage area networks (SANs) in which many hosts attach to many storage unitslCan be arbitrated loop (FC-AL) of 126 , Galvin and Gagne 2009 Operating System ConceptsNetwork-Attached StorageNetwork-Attached StoragenNetwork-attached storage (NAS) is storage made available over a network rather than over a local connection (such as a bus)nAlthough often mounted as a filesystem, is really a remote serverlNFS and CIFS are common protocols (with NFS s shortcomings)lImplemented via remote procedure calls (RPCs))

5 Between host and storagelNew iSCSI protocol uses IP network to carry the SCSI , Galvin and Gagne 2009 Operating System ConceptsStorage Area NetworkStorage Area Networkn Super version of NAS servers SAN masks complexity redundancylLarge system / set of Systems attached to nothing but storage (arrays)nCommon in large storage environments (and becoming more common) , Galvin and Gagne 2009 Operating System ConceptsDisk SchedulingDisk SchedulingnGoal of OS / controller is to minimize service time (provide quickest response time) by using hardware most efficientlynTime factors in reading (or writing) a disk sector are:lSeek time is the time for the disk are to move the heads to the cylinder containing the desired latency time is the additional time waiting for the disk to rotate the desired sector to the disk time is the time to read data and move it to the systemnCannot do much about transfer and latency time (HW)nCAN try to schedule reads/writes to minimize seek timelDo this by minimizing seek distancelIf system / disk is reasonably busy, can have significant impactlScheduling can be done by system, disk, or in , Galvin and Gagne 2009 Operating System ConceptsDisk Scheduling (Cont.)

6 Disk Scheduling (Cont.)nSeveral algorithms exist to schedule the servicing of disk I/O requests. nWe illustrate them with a request queue (0-199). 98, 183, 37, 122, 14, 124, 65, 67 Head pointer = 53 (this is where the head is currently positioned)nEvaluate algorithms on how well they minimize seek time, on fairness, and on , Galvin and Gagne 2009 Operating System ConceptsFCFSFCFS Scheduling SchedulingnFirst-come-first-served scheduling FCFSlServe disk read / write requests in order in which they arrivenSimple, fair, OK if utilization is low ( , disk is not very busy)nBUT it often results in excessive arm , Galvin and Gagne 2009 Operating System ConceptsFCFSFCFSI llustration shows total head movement of 640 , Galvin and Gagne 2009 Operating System ConceptsSSTFSSTF Scheduling SchedulingnShortest-seek-time-first schedulinglThe request chosen to be serviced next is the one closest to the current head positionlSimilar in concept to SJF process schedulingnPROBLEM may result in starvationnCan be considerable improvement over FCFS, but not optimal (because of possible starvation)nIllustration shows total head movement of 236 , Galvin and Gagne 2009 Operating System ConceptsSSTF (Cont.)

7 SSTF (Cont.)Total tracks moved: , Galvin and Gagne 2009 Operating System ConceptsSCANSCANnThe disk arm starts at one end of the disk, and moves toward the other end, servicing all possible requests along the way, then moves back toward the other end of the disk, doing the samelNote: it has to go all the way to the end of the disk (at each end) before it can turn around and start backnSometimes called the elevator of an elevator that must go to very top and very bottom floors before reversing directionsnCan result in uneven service time, but no starvationnIllustration shows total head movement of 208 , Galvin and Gagne 2009 Operating System ConceptsSCAN (Cont.)SCAN (Cont.)Total tracks moved: , Galvin and Gagne 2009 Operating System ConceptsSCAN (Cont.)

8 SCAN (Cont.)Total tracks moved: 208 NOTE this example starts in the opposite direction from all the others, so is not a good , Galvin and Gagne 2009 Operating System ConceptsSCAN (Cont.)SCAN (Cont.)Total tracks moved: 331 Note this example goes in SAME DIRECTION as all the , Galvin and Gagne 2009 Operating System ConceptsC-SCANC-SCANnCircular SCANnThe head moves from one end of the disk to the other, servicing requests as it goes. When it reaches the other end, however, it immediately returns to the beginning of the disk, without servicing any requests on the return reads/writes when moving one directionlLike SCAN, goes from first to last sector of disk, even though there may be no requests that farnProvides a more uniform wait time than the cylinders as a circular list that wraps around from the last cylinder to the first , Galvin and Gagne 2009 Operating System ConceptsC-SCAN (Cont.)

9 C-SCAN (Cont.)Total tracks moved: 382 NOTE: when counting tracks moved, must also countwhile moving from one end to other, even if doing no , Galvin and Gagne 2009 Operating System ConceptsLOOKLOOK Scheduling SchedulingnLike SCAN, but arm only goes as far as the last request in each direction ( , does not go all the way to each end of the disk)nSaves arm movement (and time)nC-LOOK has a similar relationship to , Galvin and Gagne 2009 Operating System ConceptsC-LOOK (Cont.)C-LOOK (Cont.)Total tracks moved: , Galvin and Gagne 2009 Operating System ConceptsComparison of Scheduling AlgorithmsComparison of Scheduling AlgorithmsTOTAL TRACKS MOVED FCFS 640 SSTF 236 smallest, although some requests may starve SCAN 208 started opposite direction from others SCAN 331 going same direction as all the others C-SCAN 382 LOOK 299 Best overall in this example C-LOOK.

10 Galvin and Gagne 2009 Operating System ConceptsSelecting a Disk-Scheduling AlgorithmSelecting a Disk-Scheduling AlgorithmnSSTF is common and has a natural appeallBut starvation possiblenText says that SCAN and C-SCAN perform better than SSTF for Systems that place a heavy load on the disklBut only because they solve starvation problem they don t really perform betternPerformance depends on the number and types of for disk service can be influenced by the file-allocation disk-scheduling algorithm should be written as a separate module of the operating system, allowing it to be replaced with a different algorithm if SSTF or LOOK is a reasonable choice for the default algorithm (if modify SSTF to avoid starvation). , Galvin and Gagne 2009 Operating System ConceptsDisk ManagementDisk ManagementnLow-level formatting, or physical formatting Dividing a disk into sectors that the disk controller can read and use a disk to hold files, the operating system still needs to record its own data structures on the the disk into one or more groups of formatting or making a file system.


Related search queries