سیستم های عامل و مدیریت دیسک
اسلاید 1: Department of Computer and IT EngineeringUniversity of KurdistanOperating systemsDisk ManagementBy: Dr. Alireza Abdollahpouri
اسلاید 2: Hard Disk DrivesWestern Digital Drivehttp://www.storagereview.com/guide/Read/Write HeadSide View
اسلاید 3: Mechanics of DisksPlatters circular platters covered with magnetic material to provide nonvolatile storage of bitsTracks concentric circles on a single platterSectors segment of the track circle – usually each contains 512 bytes – separated by non-magnetic gaps. The gaps are often used to identify beginning of a sectorCylinders corresponding tracks on the different platters are said to form a cylinderSpindle of which the platters rotate aroundDisk heads read or alter the magnetism (bits) passing under it. The heads are attached to an arm enabling it to move across the platter surface
اسلاید 4: Hard Disk Drives
اسلاید 5: + Rotational delay + Transfer time Seek timeDisk access time = + Other delays Disk platter Disk armDisk headDisk Access Time
اسلاید 6: Measure Disk PerformanceTransfer rate is rate at which data flows between drive and computerPositioning time (random-access time) is time The time to move disk arm to desired cylinder (seek time) and the time for desired sector to rotate under the disk head (rotational latency)
اسلاید 7: Magnetic DisksPlatters range from .85” to 14” (historically)Commonly 3.5”, 2.5”, and 1.8”Range from 30GB to 3TB per drivePerformance Transfer Rate – theoretical – 6 Gb/secEffective Transfer Rate – real – 1Gb/secSeek time from 3ms to 12ms – 9ms common for desktop drivesAverage seek time measured or calculated based on 1/3 of tracksLatency based on spindle speed1/(RPM * 60)Average latency = ½ latency(From Wikipedia)
اسلاید 8: Magnetic Disk PerformanceAccess Latency = Average access time = average seek time + average latencyFor fastest disk 3ms + 2ms = 5msFor slow disk 9ms + 5.56ms = 14.56msAverage I/O time = average access time + (amount to transfer / transfer rate) + controller overheadFor example to transfer a 4KB block on a 7200 RPM disk with a 5ms average seek time, 1Gb/sec transfer rate with a .1ms controller overhead =5ms + 4.17ms + 4KB / 1Gb/sec + 0.1ms =9.27ms + 4 / 131072 sec = 9.27ms + .12ms = 9.39ms
اسلاید 9: Disk StructureDisk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer The 1-dimensional array of logical blocks is mapped into the sectors of the disk sequentiallySector 0 is the first sector of the first track on the outermost cylinderMapping 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 innermostLogical to physical address should be easyExcept for bad sectorsNon-constant # of sectors per track via constant angular velocity
اسلاید 10: Disk SchedulingDisk can do only one request at a time; What order do you choose to do queued requests?Seek time seek distanceSeveral algorithms exist to schedule the servicing of disk I/O requests3210752HeadUserRequestscylinder # of requested block
اسلاید 11: Disk Scheduling (Cont.)There are many sources of disk I/O requestOSSystem processesUsers processesI/O request includes input or output mode, disk address, memory address, number of sectors to transferOS maintains queue of requests, per disk or deviceIdle disk can immediately work on I/O request, busy disk means work must queueOptimization algorithms only make sense when a queue existsNote that drive controllers have small buffers and can manage a queue of I/O requests (of varying “depth”)Several algorithms exist to schedule the servicing of disk I/O requestsThe analysis is true for one or many plattersWe illustrate scheduling algorithms with a request queue (0-199) 98, 183, 37, 122, 14, 124, 65, 67Head pointer 53
اسلاید 12: Disk Scheduling: FCFSFair among requesters, but order of arrival may be to random spots on the disk Very long seeksExample در اين روش سيلندرهاي متقاضي به ترتيب درخواستشان سرويسدهي ميشوند. بعبارتي هر درخواست در صف اجرا قرار ميگيرد. سادهترين روش است اما كارآيي چنداني ندارد.
اسلاید 13: Disk Scheduling: SSTF در اين روش، هر لحظه سيلندر متقاضي كه به محل هد در آن لحظه نزديكتر باشد مورد پردازش قرار ميگيرد.
اسلاید 14: Disk Scheduling: SCANThe disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk, where the head movement is reversed and servicing continues. Sometimes called the elevator algorithm
اسلاید 15: Disk Scheduling: C-SCANThe 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 tripTreats the cylinders as a circular list that wraps around from the last cylinder to the first one
اسلاید 16: C-LOOKArm 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 Total number of cylinders?
اسلاید 17: مثالفرض کنید یک دیسک 200 شیار داشته و صف درخواست دیسک درخواستهای Random را در خود دارد . شیار (track)های در خواست شده به ترتیب دریافت عبارتند از : 55, 58, 39,18,90,160,38,184 در هر یک از حالات زیر:اگر زمان حرکت از شیار به شیار دیگر 4 میلی ثانیه طول بکشد، و بازوی دیسک در ابتدا در روی شیار 100 قرار داشته باشد :ترتیب سرویس دهی به در خواستها و طول متوسط Seek چقدر است ؟کل زمان جستجو چقدر خواهد بود ؟الف ) از روش FIFO استفاده کنید .ب ) از الگوریتم SSTF استفاده شود .ج ) از الگوریتم آسانسور استفاده شود.د ) از الگوریتم C-SCAN استفاده شود .
اسلاید 18: فرض کنید در روش scan و c-scan جهت اولیه حرکت به سمت افزایش شماره شیار می باشد.
اسلاید 19: FIFO55.3Average Seek Length =تعداد track های پیموده 498
اسلاید 20: زمان جستجو کل = =تعداد track های پیموده 498498 * 4 (ms) =1992 msecFIFO
اسلاید 21: order of servicerequest servicedتعداد track های پیموده شده 0100 19010258323553439165381618207150132816010918424زمان جستجو کل = =تعداد track های پیموده 248248 * 4 (ms) = 299 msec27.5Average Seek LengthSSTF
اسلاید 22: SSTForder of servicerequest servicedتعداد track های پیموده شده 0100 19010258323553439165381618207150132816010918424
اسلاید 23: 27.8Average Seek Length100150160184905855393818SCAN or ELEVATOR آسانسور))زمان جستجو کل = =تعداد track های پیموده 250250 * 4 (ms) = 1000 msecتعداد track های پیموده شده5010249432316120
اسلاید 24: SCAN or ELEVATOR آسانسور))
اسلاید 25: order of servicerequest servicedتعداد track های پیموده شده 0100 1150502160103184244181665382063917551685839903235.8Average Seek Lengthزمان جستجو کل = =تعداد track های پیموده 322322 * 4 (ms) = 1288 msecC-SCAN
اسلاید 26: C-SCANorder of servicerequest servicedتعداد track های پیموده شده 0100 11505021601031842441816653820639175516858399032
اسلاید 27:
اسلاید 28: 28Questio
نقد و بررسی ها
هیچ نظری برای این پاورپوینت نوشته نشده است.