Your SlideShare is downloading. ×
0
Chapter 8:  Secondary-Storage Structure
Overview of Mass Storage Structure <ul><li>Magnetic tape </li></ul><ul><ul><li>Was early secondary-storage medium </li></u...
Overview of Mass Storage Structure <ul><li>Magnetic disks  - provide bulk of secondary storage of modern computers </li></...
Moving-head Disk Machanism
 
Hard Disk Drives IBM/Hitachi Microdrive Western Digital Drive http://www.storagereview.com/guide/ Read/Write Head Side View
Disk Structure <ul><li>Disk drives are addressed as large 1-dimensional arrays of  logical blocks , where the logical bloc...
<ul><li>A magnetic disk consists of a collection of platters which rotate on about a central spindle. These platters are m...
<ul><li>In order to satisfy an I/O request the disk controller must first move the head to the correct track and sector. <...
Disk Scheduling <ul><li>The operating system is responsible for using hardware efficiently — for the disk drives, this mea...
Timing of a Disk I/O Transfer
Disk Scheduling <ul><li>Several algorithms exist to schedule the servicing of disk I/O requests.  </li></ul><ul><li>We ill...
FCFS  (First Come, First Served)   <ul><li>FCFS  (First Come, First Served)  </li></ul><ul><ul><li>perform operations in o...
FCFS / FIFO Illustration shows total head movement of 640 cylinders.
Shortest Seek Time First (SSTF) <ul><li>Selects the request with the minimum seek time from the current head position. </l...
SSTF (Cont.)
SCAN <ul><li>The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets ...
SCAN (Cont.)
C-SCAN <ul><li>Provides a more uniform wait time than SCAN. </li></ul><ul><li>The head moves from one end of the disk to t...
C-SCAN (Cont.)
C-LOOK <ul><li>Version of C-SCAN </li></ul><ul><li>Arm only goes as far as the last request in each direction, then revers...
C-LOOK (Cont.)
Examples <ul><li>Request queue:  </li></ul><ul><li>55, 32, 6, 99, 58, 71, 86, 153, 11, 179, 42 </li></ul><ul><li>Disk head...
Selecting a Disk-Scheduling Algorithm <ul><li>SSTF is common and has a natural appeal(request ,call).Bcz it increase perfo...
Disk Management <ul><li>Low-level formatting , or  physical formatting  — Dividing a disk into sectors that the disk contr...
Upcoming SlideShare
Loading in...5
×

7 disk managment

1,068

Published on

this is MCA PPT

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,068
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
47
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "7 disk managment"

  1. 1. Chapter 8: Secondary-Storage Structure
  2. 2. Overview of Mass Storage Structure <ul><li>Magnetic tape </li></ul><ul><ul><li>Was early secondary-storage medium </li></ul></ul><ul><ul><li>Relatively permanent and holds large quantities of data </li></ul></ul><ul><ul><li>Access time slow </li></ul></ul><ul><ul><li>Random access ~1000 times slower than disk </li></ul></ul><ul><ul><li>Mainly used for backup, storage of infrequently-used data, transfer medium between systems </li></ul></ul><ul><ul><li>Kept in spool and wound or rewound past read-write head </li></ul></ul><ul><ul><li>Once data under head, transfer rates comparable to disk </li></ul></ul><ul><ul><li>20-200GB typical storage </li></ul></ul><ul><ul><li>Common technologies are 4mm, 8mm, 19mm, LTO-2 and SDLT </li></ul></ul>
  3. 3. Overview of Mass Storage Structure <ul><li>Magnetic disks - provide bulk of secondary storage of modern computers </li></ul><ul><ul><li>A collection of tracks (5 to 10) form a cylinder </li></ul></ul><ul><ul><li>Tracks are split into sectors (10 to 30), which are usually the smallest unit that data can be read/written to a disk. </li></ul></ul><ul><ul><li>Drives rotate at 60 to 200 times per second </li></ul></ul><ul><ul><li>Transfer rate is rate at which data flow between drive and computer </li></ul></ul><ul><ul><li>Positioning 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 ) </li></ul></ul><ul><ul><li>Head crash results from disk head making contact with the disk surface -- That’s bad </li></ul></ul><ul><li>Disks can be removable </li></ul><ul><li>Drive attached to computer via I/O bus </li></ul><ul><ul><li>Busses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSI </li></ul></ul><ul><ul><li>Host controller in computer uses bus to talk to disk controller built into drive or storage array </li></ul></ul>
  4. 4. Moving-head Disk Machanism
  5. 6. Hard Disk Drives IBM/Hitachi Microdrive Western Digital Drive http://www.storagereview.com/guide/ Read/Write Head Side View
  6. 7. Disk Structure <ul><li>Disk drives are addressed as large 1-dimensional arrays of logical blocks , where the logical block is the smallest unit of transfer. </li></ul><ul><li>The 1-dimensional array of logical blocks is mapped into the sectors of the disk sequentially. </li></ul><ul><ul><li>Sector 0 is the first sector of the first track on the outermost cylinder. </li></ul></ul><ul><ul><li>Mapping 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 innermost. </li></ul></ul>
  7. 8. <ul><li>A magnetic disk consists of a collection of platters which rotate on about a central spindle. These platters are metal disks covered with magnetic recording material on both sides. Each disk surface is divided into concentric circles called tracks . Each track is divided into sectors where information is stored. The reading and writing device, called the head moves over the surface of the platters until it finds the track and sector it requires. This is like finding someone's home by first finding the street (track) and then the particular house number (sector). There is one head for each surface on which information is stored each on its own arm . In most systems the arms are connected together so that the heads move in unison, so that each head is over the same track on each surface. The term cylinder refers to the collection of all tracks which are under the heads at any time. </li></ul>
  8. 9. <ul><li>In order to satisfy an I/O request the disk controller must first move the head to the correct track and sector. </li></ul><ul><li>Moving the head between cylinders takes a relatively long time so in order to maximise the number of I/O requests which can be satisfied the scheduling policy should try to minimise the movement of the head. </li></ul>
  9. 10. Disk Scheduling <ul><li>The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk bandwidth. </li></ul><ul><li>Access time has two major components </li></ul><ul><ul><li>Seek time is the time for the disk are to move the heads to the cylinder containing the desired sector. </li></ul></ul><ul><ul><li>Rotational latency is the additional time waiting for the disk to rotate the desired sector to the disk head. </li></ul></ul><ul><li>Minimize seek time </li></ul><ul><li>Seek time  seek distance </li></ul><ul><li>Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer. </li></ul>
  10. 11. Timing of a Disk I/O Transfer
  11. 12. Disk Scheduling <ul><li>Several algorithms exist to schedule the servicing of disk I/O requests. </li></ul><ul><li>We illustrate them with a request queue (0-199). </li></ul><ul><li>98, 183, 37, 122, 14, 124, 65, 67 </li></ul><ul><li>Head pointer 53 </li></ul>
  12. 13. FCFS (First Come, First Served) <ul><li>FCFS (First Come, First Served) </li></ul><ul><ul><li>perform operations in order requested </li></ul></ul><ul><ul><li>no reordering of work queue </li></ul></ul><ul><ul><li>no starvation : every request is serviced </li></ul></ul><ul><ul><li>poor performance </li></ul></ul>
  13. 14. FCFS / FIFO Illustration shows total head movement of 640 cylinders.
  14. 15. Shortest Seek Time First (SSTF) <ul><li>Selects the request with the minimum seek time from the current head position. </li></ul><ul><li>SSTF scheduling is a form of SJF scheduling; may cause starvation of some requests. </li></ul><ul><li>Illustration shows total head movement of 236 cylinders. </li></ul><ul><li>SSTF (Shortest Seek Time First) </li></ul><ul><ul><li>after a request, go to the closest request in the work queue, regardless of direction </li></ul></ul><ul><ul><li>reduces total seek time compared to FCFS </li></ul></ul><ul><ul><li>Disadvantages </li></ul></ul><ul><ul><ul><li>starvation is possible; stay in one area of the disk if very busy </li></ul></ul></ul><ul><ul><ul><li>switching directions slows things down </li></ul></ul></ul>
  15. 16. SSTF (Cont.)
  16. 17. SCAN <ul><li>The 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. </li></ul><ul><li>Sometimes called the elevator algorithm . </li></ul><ul><li>Illustration shows total head movement of 208 cylinders. </li></ul>
  17. 18. SCAN (Cont.)
  18. 19. C-SCAN <ul><li>Provides a more uniform wait time than SCAN. </li></ul><ul><li>The 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 trip. </li></ul><ul><li>Treats the cylinders as a circular list that wraps around from the last cylinder to the first one. </li></ul>
  19. 20. C-SCAN (Cont.)
  20. 21. C-LOOK <ul><li>Version of C-SCAN </li></ul><ul><li>Arm 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. </li></ul>LOOK <ul><li>Version of SCAN </li></ul><ul><li>Arm only goes as far as the last request in each direction, then the head movement is reversed and servicing continues, without first going all the way to the end of the disk. </li></ul>
  21. 22. C-LOOK (Cont.)
  22. 23. Examples <ul><li>Request queue: </li></ul><ul><li>55, 32, 6, 99, 58, 71, 86, 153, 11, 179, 42 </li></ul><ul><li>Disk head is currently at 66. </li></ul><ul><li>Last request serviced was 48. </li></ul><ul><li>Show the track serviced using each of the following disk scheduling algorithms: </li></ul><ul><ul><li>FCFS </li></ul></ul><ul><ul><li>SSTF </li></ul></ul><ul><ul><li>SCAN </li></ul></ul><ul><li>What is the total head movement for each scheduling policy? </li></ul><ul><ul><li>C-SCAN </li></ul></ul><ul><ul><li>LOOK </li></ul></ul><ul><ul><li>C-LOOK </li></ul></ul>
  23. 24. Selecting a Disk-Scheduling Algorithm <ul><li>SSTF is common and has a natural appeal(request ,call).Bcz it increase performance over others. </li></ul><ul><li>SCAN and C-SCAN perform better for systems that place a heavy load on the disk. </li></ul><ul><li>Performance depends on the number and types of requests. </li></ul><ul><li>The Queue usually has just one outstanding request then all algo. Behaves the same, besause they have only one choice.for where to move that time it behaves like FCFS </li></ul><ul><li>Requests for disk service can be influenced by the file-allocation method. </li></ul><ul><li>The disk-scheduling algorithm should be written as a separate module of the operating system, allowing it to be replaced with a different algorithm if necessary. </li></ul><ul><li>Either SSTF or LOOK is a reasonable choice for the default algorithm. </li></ul>
  24. 25. Disk Management <ul><li>Low-level formatting , or physical formatting — Dividing a disk into sectors that the disk controller can read and write. </li></ul><ul><li>To use a disk to hold files, the operating system still needs to record its own data structures on the disk. </li></ul><ul><ul><li>Partition the disk into one or more groups of cylinders. </li></ul></ul><ul><ul><li>Logical formatting or “making a file system”. </li></ul></ul><ul><li>Boot block initializes system. </li></ul><ul><ul><li>Also term bootblock is used to describe special kind of small programs, usually launched by a computer system immediately after power-up or reset from non-volatile storage like Flash ROM . </li></ul></ul><ul><ul><li>The bootstrap is stored in ROM. </li></ul></ul><ul><ul><li>Bootstrap loader program. </li></ul></ul><ul><li>Methods such as sector sparing used to handle bad blocks. </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×