Wednesday, October 6, 2010

Magnetic Disk Problem Set

Magnetic Disk
bit near center moves slow comparision to bit near end
increasing the spacing between bits in outer tracks so that head can move with CAV
disadvantage amount data in outer and inner track would be same , limited by amount of data that can be stored in inner track
so density increases moving to inner tracks
multiple zone recording
within a zone number of bits per track is constant
zones father from center contains more bits hence better utilization of space
As head moves from one zone to another along same track length of bits changes, causing change in timing for read and write
seek time
= initial startup time + time to traverse tracks
traversal time is not linear that is if it takes t seconds to reach track 4 then it would take 2t to reach track 8 is not the case that is
It also has startup time and settling time


Problem Consider disk with rotation 5400rpm, seek time 4+.05t msec  where t is number of track
1024 tracks,512sector/track,block size 512 bytes.DMA and disk controller read and write data at 4MB/sec
a) capacity of disk
1024*512*512
b)reading 16KB file where sector contagious on track. max and min throughput
maximum th
rotational latency = 1/5400m/rev = 60/5400 sec/rev
it means it takes 60/5400 sec to read a track or 512sectors
so it takes 60/(5400*512) sec =22micro sec to read a sector
In case of maximum throughput we donot have any rotational latency overhead or seek latency It only takes time to move over that many sectors to read
there 16K/512 = 32 sectors in file
so to read 32 sectors it will take 22*32 microsec =694microsec = .694msec
so it takes 694 microsec to read file from the disk
Now we need DMA transfer will take time 16KB/4MB/s = 3.9 msec

Total time is time to get disk from disk + time to transfer via DMA = .694+3.9


For minimum throughput
It has to go for maximum distance to get data that is it has to seek all 1024 tracks and a complete rotational delay to reach data
seek time + latency = 4+.05*1024 + 60/5400


In average case
if there are t tracks, r rpm then
average seek time = t/2 * (per track seek time)
Average rotational delay = 60/ 2r rpm

Worst case
seek time = t * (per track seek time) 
rotational delay 60/ 2r

To read contagious sectors of file
we work on track 
1) For first track we have avg seek time and avg rotational delay overhead
2)For rest of tracks we have track-track seek time

To read non contagious file
we caclulate data for a sector
1)for each sector overhead of avg seek time, avg rotational delay
2) we add the time for all sector for that much number of blocks in file

Cylinder
Both surface of platter and tracks on them form cylinder
if there are p platters and both surface of each platter is used then
A cylinder has 2*p tracks

No comments:

Post a Comment