-4

I am studying for my exams and I am stuck on the following problem:

One disk has 20000 tracks, a speed of 7200 RPM, and a seek time of 1 ms. The question asks for me to calculate the total time that is needed to read all tracks on the disk. It gives us one hint: the transfer time of a track is the time that it needs to do a full round under the disk head.

I have tried to find the transfer time first but I don't know if correct. I get 7200/3600.

How can I solve this one?

16
  • 3
    Sorry, it is against the policy of most here to help with homework - you'll have to do it yourself. :)
    – Xavierjazz
    May 15, 2015 at 17:54
  • 1
    Existing questions cover this subject. Your basic course book would cover this. You might want to study the material before trying to do the questions, it might help, don't study the test....its not helpful. Question with your answer
    – Ramhound
    May 15, 2015 at 18:25
  • 1
    @PanayiotisIrakleous The hint gives it away. Calculate how fast it takes for one track to go around once (in ms) and multiply that by how many tracks there are. Add the 1 ms seek time. That should do it.
    – Cfinley
    May 15, 2015 at 18:27
  • 1
    @PanayiotisIrakleous You should only add that once, as you are reading from the start of the disk to the end of the disk.
    – Cfinley
    May 15, 2015 at 18:35
  • 1
    The problem/question is incompletely specified. The geometry of the drive, i.e. tracks per cylinder, is not provided. Hence the number of seeks cannot be determined The seek time is given as a single constant, whereas with a real HDD, the seek time is a function of the number of cylinders traversed. Hence the time spent on seeks cannot be determined Also "transfer (to host) time" != "read (from track) time".
    – sawdust
    May 15, 2015 at 19:13

1 Answer 1

4

I think the problem is not really about computers or hard disks, if it is asked like in the exam question. It is more about basics.

  • If you have 7200 RPM, that means the disk will rotate (7200/60) = 120 times per second
  • Each time the disk does a whole rotation, you are theoretically able to read 1 complete track. That means reading 1 track takes (1/120)s

So, now the question of the 1ms seek time:

  • If you can do a continuous read, then you have to add the seek time only once. So you have (1/120)s for each track and the one-time addition of seek time. This seems like an oversimplification.
  • More realistically: Assuming the question implies that you need an additional 1ms (1/1000)s to switch from one track to the next, you can not read 120 tracks each second as the rotation alone would suggest.
  • Taking the rotation and the seek time into account, each track will take (1/1000 + 1/120)s to read.

Note:

As @sawdust correctly points out in the comments, this answer uses multiple simplifications. This is due to the fact that no more information was given in the question and I tried to work with the basics. If the question is more complex (or dealing with actual hardware, instead of being an exam question), these factors have to be accounted for:

  • The disk might have multiple (say, N) platters, so the 20000 tracks can be distributed over the N platters. In general, a platter can be used on both sides.[1] So the 20000 tracks each of the 2N Read-/Write-Heads in the drive are not 20000 cylinders, but rather 20000/(2N) cylinders. That might enable to read 2N tracks at the same time. Then, reading 2N tracks takes (1/120)s.
  • The seek time should not be fixed to 1ms. It is usually a combination of head seek time, where the head is moved to the correct cylinder (which might not be always constant depending on where you are on the drive), PLUS the rotational latency, which means the disk itself has to rotate until the head is above the correct sector. On average, the rotational latency might be simplified to be half of the time it takes the disk to do 1 whole revolution. So the rotational latency might be around (1/240)s for each new cylinder.
  • Real drives can have certain latency issues when facing problems to read the data correctly. This happens when blocks are damaged or otherwise difficult to read and by the drive tries to read the sectors with different head positionings and parameters to increase the chance of retrieving any data. The resulting latencies can sometimes even be observed with new retail drives and must be taken into account when planning a real system that depends on timely disk reads. So you can not always assume that a track will be completely read after 1 single revolution. The problem can become very bad, so more enterprise drives offer features such as TLER to limit the allowed time to retry reading a sector.[2]

[1]: Wikipedia: Cylinder-Head-Sector
[2]: Western Digital: Difference between Desktop edition (WD Blue, WD Green and WD Black) and RAID (Enterprise) edition drives

5
  • 1
    If you are unsure about the seek time, ask your instructor BEFORE the exam. Slizzered and I have different ideas how that should work. (I am assuming he is correct here).
    – Cfinley
    May 15, 2015 at 18:44
  • someone told me that the seek time is to switch from one track to the next May 15, 2015 at 18:47
  • @Cfinley I added your idea of only adding seek time once, since I find it at least worth to consider, given the rather ambigous wording of the question. Even if adding it for each track is correct, it might still be good to keep people thinking about the possible ways to interpret the question
    – Slizzered
    May 15, 2015 at 18:58
  • 1
    The actual number of seeks required cannot be determined, since the HDD geometry was not given. Even if the seek time is 1ms (instead of a function), your calculation is incomplete because you don't properly account for rotational latency post seek. But you seem to assume that all 2000 tracks are in one cylinder (e.g. no seeks as you switch to "next" track) (in your first guess), so in that case zero seeks would be necessary, and "add the seek time only once" is incorrect.
    – sawdust
    May 15, 2015 at 19:22
  • @sawdust Yes, I did omit several facts that should never be overlooked when dealing with actual hardware. However, the question as stated does not give any further information. All the arithmetically-oriented exam questions I usually deal with are structured in a way that you can actually solve them. So, given the information, I assumed all other factors to be negligible. But you are correct, so I will add a disclaimer to the answer. Thanks for pointing that out
    – Slizzered
    May 15, 2015 at 19:32

Not the answer you're looking for? Browse other questions tagged .