《operatingsystem操作系统ch12massstoragesystems49.ppt》由会员分享,可在线阅读,更多相关《operatingsystem操作系统ch12massstoragesystems49.ppt(48页珍藏版)》请在第壹文秘上搜索。
1、12.2nOverview of Mass Storage StructurenDisk StructurenDisk AttachmentnDisk SchedulingnDisk ManagementnSwap-Space ManagementnRAID StructurenDisk AttachmentnStable-Storage ImplementationnTertiary Storage DevicesnOperating System IssuesnPerformance Issues12.3nDescribe the physical structure of seconda
2、ry 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 HSM12.4nMagnetic disks provide bulk of secondary storage of modern compu
3、terslDrives 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 res
4、ults from disk head making contact with the disk surface4Thats 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 array12.512.6nMagnet
5、ic tapelWas early secondary-storage mediumlRelatively permanent and holds large quantities of datalAccess time slowlRandom 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 he
6、adlOnce data under head,transfer rates comparable to diskl20-200GB typical storagelCommon technologies are 4mm,8mm,19mm,LTO-2 and SDLT12.7nDisk drives are addressed as large 1-dimensional arrays of logical blocks,where the logical block is the smallest unit of transfer.nThe 1-dimensional array of lo
7、gical blocks is mapped into the sectors of the disk sequentially.lSector 0 is the first sector of the first track on the outermost cylinder.lMapping 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 innermos
8、t.12.8nHost-attached storage accessed through I/O ports talking to I/O bussesnSCSI itself is a 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 controllernFC is high-speed serial ar
9、chitecturelCan 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 devices12.9nNetwork-attached storage(NAS)is storage made available over a network rather than over a local connecti
10、on(such as a bus)nNFS and CIFS are common protocolsnImplemented via remote procedure calls(RPCs)between host and storagenNew iSCSI protocol uses IP network to carry the SCSI protocol12.10nCommon in large storage environments(and becoming more common)nMultiple hosts attached to multiple storage array
11、s-flexible12.11nThe operating system is responsible for using hardware efficiently for the disk drives,this means having a fast access time and disk bandwidth.nAccess time has two major componentslSeek time is the time for the disk are to move the heads to the cylinder containing the desired sector.
12、lRotational latency is the additional time waiting for the disk to rotate the desired sector to the disk head.nMinimize seek timenSeek time seek distancenDisk bandwidth is the total number of bytes transferred,divided by the total time between the first request for service and the completion of the
13、last transfer.12.12nSeveral 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,67Head pointer 5312.13Illustration shows total head movement of 640 cylinders.12.14nSelects the request with the minimum seek time from
14、the current head position.nSSTF scheduling is a form of SJF scheduling;may cause starvation of some requests.nIllustration shows total head movement of 236 cylinders.12.1512.16nThe disk arm starts at one end of the disk,and moves toward the other end,servicing requests until it gets to the other end
15、 of the disk,where the head movement is reversed and servicing continues.nSometimes called the elevator algorithm.nIllustration shows total head movement of 208 cylinders.12.1712.18nProvides a more uniform wait time than SCAN.nThe head moves from one end of the disk to the other.servicing requests a
16、s 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 trip.nTreats the cylinders as a circular list that wraps around from the last cylinder to the first one.12.1912.20nVersion of C-SCANnArm only goes as far as the last request in each direction,then reverses direction immediately,without first going all the way to the end of the disk.12.2112.22nSSTF is common and has a natural appealnSCAN and C-SCAN perfo