0
$\begingroup$

A magnetic disk has 1000 cylinders, 10 tracks per cylinder, 128 sectors per track, 1 KB per sector. The rotation time is 6 msec, maximum seek time is 150 msec, switching between adjacent cylinders takes 15 msec, and switching between adjacent tracks within a cylinder takes no time. Assume this disk has 4 MB of data stored on it.If data is stored on consecutive tracks and is twice as likely to start on the first half (upper 5 tracks) of a cylinder than the second half (lower 5 tracks), find the average access time

Solution'

#Tracks: 4 MB x 1024 KB/1 MB x 1 sector/1 KB x 1 track/128 sectors = 32 tracks 
Transfer time = 32 x 6 = 192 msec

Exp. switch and wait: Probability (twice as likely) -> If x = probability, 
5 x 2x + 5 x 1x = 1 -> x = 1/15

         Track  Probability   # switch s/w time
           1     2/15               3               18x3 
           2     2/15               3               18x3
           3     2/15               3               18x3
           4     2/15               3               18x3
           5     2/15               3               18x3
           6     1/15               3               18x3
           7     1/15               3               18x3
           8     1/15               3               18x3
           9     1/15               3               18x3
          10     1/15               4               18x4

        Exp. s/w = 5 x [(18x3) x 2/15] + 4 x [(18x3) x 1/15] + [(18x4) x 1/15] = 55.2 msec

        Exp. access time = exp seek + exp latency + transfer + exp s/w = (1/3 x 150) + (1/2 x 6) + 192 + 55.2
                = 300.2 msec

Is there a easier method to this question maybe with formulas or something,

$\endgroup$
  • 1
    $\begingroup$ This seems to be about basic arithmetics, not computer science. $\endgroup$ – Raphael May 31 '17 at 4:22
  • $\begingroup$ i posted it in a math forum they directed me here $\endgroup$ – Craftx398 May 31 '17 at 8:19
  • 1
    $\begingroup$ They were wrong; not everything about computers is computer science. If you want to calculate how far you get with 10l of gas you don't ask the mechanical engineer who constructed your car, or do you? $\endgroup$ – Raphael May 31 '17 at 8:56
  • $\begingroup$ m tired of jumping from one forum to another :( $\endgroup$ – Craftx398 May 31 '17 at 13:31
  • $\begingroup$ Cross-posted: cs.stackexchange.com/q/76106/755, math.stackexchange.com/q/2294211/14578. Please do not post the same question on multiple sites. Each community should have an honest shot at answering without anybody's time being wasted. $\endgroup$ – D.W. May 31 '17 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.