Question:

How can you calculate the time taken to read a file?

by  |  earlier

0 LIKES UnLike



Given that you know the average seek time, the speed of rotation, the sector size, the transfer rate and the size of the file

 Tags:

   Report

1 ANSWERS


  1. Depends.  To do it exactly right, you need to know a few more things.

    Is the file contiguous or not?  

    If not, what is the distribution of file sizes and locations?  This tells you how many seeks to throw in and the amount of reading that can be done without a seek.

    If contiguous, in which sector does the file start?  That will tell you how many one-track seeks you need as you read one track completely and have to seek the next track.

    In general for relatively short, contiguous files, you look at the estimated read time as about two seeks.  For really long files, this takes more time.  It is not an easy computation if you are trying to do it really right.

    For contiguous files, you do one average seek plus as many minimum (one-cylinder) seeks as needed to span the file.  If you are doing nothing but buffering the data and your buffers are already set up, you don't even worry about the transfer rate because it will be overwhelmed by the mechanical seek timing.

    For non-contiguous files, you DEFINITELY ignore the transfer rate because the sequence of non-minimum seeks will eat you alive with their relative slowness.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions