9k views

A hard disk system has the following parameters :

• Number of tracks $= 500$
• Number of sectors/track $= 100$
• Number of bytes /sector $= 500$
• Time taken by the head to move from one track to adjacent track $= 1 \ ms$
• Rotation speed $= 600 \ rpm$.

What is the average time taken for transferring $250$ bytes from the disk ?

1. $300.5 \ ms$
2. $255.5 \ ms$
3. $255 \ ms$
4. $300 \ ms$

edited | 9k views
0
answer I am getting 250 + 50 +.5 =300.5

answer given every where = 255.5

0
I got 250.5 ms ignoring rotational latency .
0
i got 300.5 ms if anybody know how 255.5ms came, please do reply.
+6
Danish Its correct answer is 300= 249.5+50+.5, we take average of seek time, so do include 0 also in that sum i.e, (0+1+2+......499)/500 = 249.5
0
?? how are you calculating this ?

I am wrong somewhere i am not getting any of the answers .Sir help
0
Avg. seek time = [ (no. of tracks -1 ) / 2  ] * time required to move to the adjacent track.
0

HI Guys,

Check @pC and @Sachin Mittal 1's comment on finding seek time.

In this question it is assumed that  entire 250 Bytes data is continuous( that is why avg. seek and avg. rotational latency is added once). I think this assumption is made because sector size is 500 B.

But i am not sure when should we take $N/3$ for seek time (for derivation refer @pC's comment) ? If you know the answer then please mention.

0
I just learned about the formula N/3 now after reading the document now while revising....:\ ......not much detail analysis are there in stallings on this topic.....the derived equation of N/3 is not so easy to visualize if one doesn't know if from before...:\
0
Average seek time = (Best case seek time + Worst case seek time) /  2

=> 0 + 499 /  2

=>249.5
+1

@Arjun sir @pC @VS what should we take avg seek time t/3 ? Or which is mentioned in the selected answer? if it comes this year again.

option (D)

Explanation

Avg. time to transfer $=$ Avg. seek time $+$ Avg. rotational delay $+$ Data transfer time

Avg Seek Time

given that : time to move between successive tracks is $1 \ ms$

time to move from track $1$ to track $1 : 0ms$
time to move from track $1$ to track $2 : 1ms$
time to move from track $1$ to track $3 : 2ms$
..
..

time to move from track $1$ to track $500 : 499 ms$

Avg Seek time $= \frac{\sum 0+1+2+3+...+499}{500}$
$\mathbf{= 249.5 \ ms}$

Avg Rotational Delay

RMP $: 600$

$600$ rotations in $60$ sec
one Rotation takes $60/600$ sec $= 0.1$ sec

Avg Rotational Delay $= \frac{0.1}{2}$  { usually $\frac{\text{Rotation time}}{2}$ is taken as Avg Roational Delay }

$= .05 sec$

$\mathbf{= 50 \ ms}$

Data Transfer Time

One $1$ Roatation we can read data on  one complete track  .

$= 100 \times 500 = 50,000$ B data is read in one complete rotation

one complete rotation takes $0.1$ s ( we seen above )

$0.1 \rightarrow 50,000$ bytes.
$250$ bytes $\rightarrow 0.1 \times 250 / 50,000 = \mathbf{ 0.5 \ ms}$

Avg. time to transfer $=$ Avg. seek time $+$ Avg. rotational delay $+$ Data transfer time

$\mathbf{= 249.5+50+0.5}$

$\mathbf{= 300 \ ms}$

by Boss (21.5k points)
edited by
+28
Thats wonderfully explained :)
+8
Thank you sir :)
0
Thank you so much for detailed explanation
+1
avg seek time calculation was very confusing. but this is very pretty simple solution .
+13

Average seek time calculation has a flaw. You cannot assume that everytime the head will start from position 0 and hence you have missed out a whole lot of $\binom{500}{2}$ values of seek times while calculating average. Real average seek time is t/3=166.67ms. Here's an explanation http://stackoverflow.com/questions/9828736/why-is-average-disk-seek-time-one-third-of-the-full-access-time

This, however, leads to solution 166.67+50+0.5=217.2ms which doesn't match any option

+11

@pc,
Plz clear one doubt.
Why not we are taking average for every possible pair of tracks ?
Avg Seek time =  $\frac{\sum\text{seek time between every pair of tracks }}{\text{total seek distance}}$ = $\frac{\sum\limits_{x = 1}^N \sum\limits_{y = 1}^N \text{(seek time between x and y)}}{N^2}$ (here $N$=$500$)

I found this calculation here- Average Seek Time Calculation

0
@sachin_mittal_1 @Ishaan_sood
Its a good shot !
I was following my teachers explanation for  calculating avg access time .
+4
+4
Trick to seek true knowledge: Stop trusting anyone and start questioning everything. Your teachers can be wrong, your "sir" can be inaccurate, even GATE/JEE committee is not sanctified with all the errata every year. Humans believed Earth to be the centre of the universe for 2 millenia (Aristotle to Copernicus). (Disclaimer- I am a student of philosophy :) )
0

@Ishaan Sood

Shouldn't the Avg seek time = 499/3 = 166.334

time to move from track 1 to track 500 : 499 ms  (Why have you taken it as 500ms?)

The disk is assumed to have N number of tracks, so that these are numbered from 1...N The position of the head at any point of time can be anything from 0 to N (inclusive).

Avg seek distance = N/3

Average seek time = Avg seek distance / seek rate

If the seek time for the from position 0 to track N takes 't' seconds then seek rate = N/t

Therefore, avg seek time = (N/3)/(N/t) = t/3

+4
@VS  Other way to calculate average seek time is, Ts=  {(number of tracks - 1) * seektime }/ 2
so here Ts= (499 * 1ms) / 2   = 249.5ms

This one looks simpler and gives same answer

His formula gives {(n-1)*(n)/ 2} /n   =   (n-1) / 2
I just simplified his formula.
+1

@Ahwan

have you gone through this ?

What is being discussed here is entirely a different issue :)

+2
@VS yes

@pC @Arjun Sir

Average seek time need a correction

It will be N/3
0
great explanation...
0
a great explanation @PC
0

Note that the solution uses seek distance instead of seek time, for this question this is fine because the question (kind of) states that the RW head moves uniformly over tracks, but in general seek distance cannot be used in place of seek time because the RW head does not move at a constant speed.

0

I am being naive here , I just wanted to know why are we calculating average seek time , is it because we are not aware of the no of track movement done? Plz help @pC

0

Can we calculate avg seek time directly by :- (500-1)/2 = 249.5 ms ( as for 1 track we have 1 ms time delay )

as we have applied the same concept for avg rotational delay.

Avg. time to transfer = Avg. seek time + Avg. rotational delay + Data transfer time

RPM = 600

So, rotational delay = 60 / 600 = 0.1 s

In 1 rotations we can transfer the whole data in a track which is equal to number of sectors in a track * bytes per track

= 100 * 500 = 50,000

i.e., in 0.1 s, we can transfer 50,000 bytes.
Hence time to transfer 250 bytes = 0.1 * 250 / 50,000 = 0.5 ms

Avg. rotational delay = 0.5 * rotational delay = 0.5 * 0.1s = 50 ms

Avg. seek time = (0 + 1 + 2 + .... + 499)/500 (as time to move between successive tracks is 1 ms and we have 500 such tracks) = 499 * 250 /500 = 249.5

So, average time for transferring 250 bytes = 249.5 + 50 + 0.5 = 300 ms
by Veteran (431k points)
0
The average seek time mean time taken to move from innermost track to outermost track ? and since it is given we have to transfer 250 bytes . it implies that 250 bytes from each track has to be read ?? Is this is what you meant in seek time calculation
+3
Maximum seek time is the time taken to move from innermost track to the outermost. Average is half of this.

250 bytes to be read means from any one of the track. Now, at first we have to place the disk head in the correct track for doing this. Time for this placing is the seek time.
+2

In 1 rotations we can transfer the whole data in a track which is equal to number of sectors in a track * bytes per sector.

Time taken by head to move from one track to other is seek time = 1 ms

There are 500 tracks so total average seek time= (total tracks - 1) * seek time/2 = (500 -1) * 1/2 = 249.5 ms

Ave. Rotational latency = 0.5* rotation speed= 50 ms

In one rotation it can read one track

Hence 1 sector can be read in 60/(600*100) sec

To read 1/2 sector it takes = 60/(600*100*2) sec = 0.5 ms

Hence total 300 ms

by Veteran (50.9k points)
edited by
0