-2

This is more of a hardware question than software.

I want to retrieve a 512 byte sector of data off a hard disk drive. The average seek time is 9 milliseconds and the disk spins at 7200 RPM. Once positioned over the data, the data can be transferred at 15 MB/sec. On average, how long will it take to retrieve the data?

There has to be some sort of formula to calculate this, right? With it I plan to write my program. Please help.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
katrina
  • 43
  • 2
  • 10

2 Answers2

0

In theory: If you are looking for the average case then it will be the average seek time to find that data + the amount of time to transfer the data. But since there is some kind of OS on the disk and your data may be fragmented (depending on what it is ) the time might considerably increase.

P.S. There is also the command processing time but that is normally in the range of nano seconds

Techmonk
  • 1,459
  • 12
  • 20
0

The answer to this is nontrivial, and likely irrelevant. The data retrieval time will depend upon OS resources, various levels of caching, where the data is physically on the drive (outside edge is faster than inside), etc.

I say irrelevant because as a programmer, there's nothing you can do about it, and you cannot rely on it either. What if the drive is slower than expected (NFS/Samba mount)? Faster (RAID0, SSD)?

Aaron D. Marasco
  • 6,506
  • 3
  • 26
  • 39