7k views
Consider a disk pack with a seek time of $4$ milliseconds and rotational speed of $10000$ rotations per minute (RPM). It has $600$ sectors per track and each sector can store $512$ bytes of data. Consider a file stored in the disk. The file contains $2000$ sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is__________________

edited | 7k views
0
So is it assumed that the sectors of the file are stored randomly in various tracks? otherwise if they were contiguously stored only four tracks were required to access and then only four times we would multiply avg rotational latency. Am I understanding it correctly?
+4
No,It is not assumed, It is given in question. THe word "necessitates " is the key here.Means mandatory for each sector seek+latency means randomly stored.

Since each sector requires a seek,

Total time $= 2000$  (seek time $+$ avg. rotational latency $+$ data transfer time)

Since data transfer rate is not given, we can take that in $1$ rotation, all data in a track is read. i.e., in $60/10000 = 6$ ms, $600 \times 512$ bytes are read. So, time to read $512$ bytes $= 6/600$ ms $= 0.01$ ms

$= 2000 \times (4 \ ms + 60 \times 1000 /2 \times 10000 + 0.01)$

$= 2000 \times (7.01 \ ms)$

$= 14020 \ ms.$

http://www.csee.umbc.edu/~olano/611s06/storage-io.pdf

by Veteran (431k points)
edited by
+3
+3

I think its moved to

0
i am nt getting that part of ur calculation 60 * 1000 /2* 10000 .... plz reply as fast as possible...
0
Puja, $t_r$ is calculated.
+1
reason for multiplying 1000 ???
0
@Arjun sir  to calculate total time  all time we have to be consider data transfer time ??. weather it is mention or not . but in case of seek time if it is not given we assume it as 0 why is it so ??
+9
@puja just see that

1track    →   600 sectors

6ms←600 sectors (1 rotation means 600 sectors (or) 1 t
2000 sector         →   (2000) 0.01 =  20 ms
∴total time needed to read the entire file is:
= 2000 (4+3) +20= 14020 ms  . hope it will help u
0
Why are we considering data transfer time here??
0

I have a doubt

for data transfer time

600 sector time taken 6ms

1     "             "        "  .01ms

then why r we not calculating

2000 sector time taken 20ms?

why we r calculating with respect to total 2000 * (seek time + avg. rotational latency + data transfer time)

0
0
if am doing in track wise ... 1 track  ---> 6ms then 4 tracks (2000/600~= 4 ) then ans is 14024 , was there range for this ?

sresth as you know 6ms is for 1 track means 600 sectors and we have to find total time for 2000 sectors
0
+1
@sid1221

your answer is differing because you are assuming that 2000 sectors are tightly filled in 4 tracks...but it can be case that all 2000 sectors are stored in 2000 different tracks.
0
yes that i know as nothing is given , then you can do this method also ....that why i was asking there was range for this

srestha i was also not satisfied for these 2 questions ..avg seek time :(
+2

Assume that every sector access necessitates a seek, and the average rotational latency

Means we randomly accessing different sectors. So every time seek and rotational latency will come into picture.

Hi @srestha ji,

+1

@Arjun Sir,

Can we do like this below

Since Tavg= Tseek + Trotational +TData Transfer

For every sector we require a seek and rotational delay is half the time to complete one revolution.

so for 2000 sectors the total seek and rotational delay is

2000*(4+3) =14000ms.

Now, Since a track consists of 600 sectors,

so

600 sectors are read in --------> 6msec

So, 2000 sectors of the file will be read in 20msec.

So, total time =14000+20=14020 ms.

0
Because we have to consider data transfer time while calculating total time.

You can calculate DTR using given RPM and sector size
0
reason for multiplying by 1000? 60/(10000*2) will be the avg rotational time right?
0

@tusharp , because of millisecond.

0

Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation.

If this condition not given then ..how we will calculate time get data for 2000 sectors of file

0

2000×(4 ms+60×1000/2×10000+0.01)

Here, 1000 is multiplied to make seconds into mili-seconds.

0.01 comes from time required to read one whole track, once track rotation time=6ms, one track content 600*512 B.

0

@Arjun The above pdf is not working.

Seek time (given) = 4ms

RPM = 10000 rotation in 1 min [60 sec]

So, 1 rotation will be =60/10000 =6ms [rotation speed]

Rotation latency= 1/2 * 6ms=3ms

# To access a file, total time includes =seek time + rot. latency +transfer time

TO calc. transfer time, find transfer rate Transfer rate = bytes on track /rotation speed

so, transfer rate = 600*512/6ms =51200 B/ms

transfer time= total bytes to be transferred/ transfer rate

so, Transfer time =2000*512/51200 = 20ms

Given as each sector requires seek tim + rot. latency = 4ms+3ms =7ms

Total 2000 sector takes = 2000*7 ms =14000 ms To read entire file ,total time = 14000 + 20(transfer time) = 14020 ms
by Junior (603 points)
+1
This ans is provided by geeksquiz..is it correct approach?
0
each sector will hav its own transfer time... correct me if i am wrong....
0

Here each sector has 512 Bytes. So either you calculate time total transfer time = time for one sector * No. of sectors.

OR

You can calculate the total number of Bytes present in all sector and then get the total transfer time = total Bytes across all sectors / Data transfer rate.

by Junior (817 points)
0
got it
+1 vote

Seek time = 4ms
60s        →   10000 rotations
Rotation Time :-            (60 / 10000) = 6 ms    (in 1- rotation)
Rotational latency  :-     (1 / 2 )6ms = 3ms
1track    →   600 sectors

6ms←600 sectors (1 rotation means 600 sectors (or) 1 t
2000 sector         →   (2000) 0.01 =  20 ms
∴total time needed to read the entire file is:
= 2000 (4+3) +20
=8000+6000+20 = 14020

by Active (4.7k points)

In the question, we have to Find the time required to read / transfer the data (2000 sector /file ) data from disk

So we have to find the time required to read /transfer for 1 sector data than we find 2000(time required for one sector).

so time for one sector is Total time =2000  (seek time +avg. rotational latency + data transfer time)
by Active (1.8k points)

Seek time $=4ms$
In 60 seconds 1000 rotations.

Rotation Time$= (60 / 10000) = 6 ms$  (Time to read one Track)
Rotational latency$= (1 / 2 ) * 6ms = 3ms$

Transfer time = No. of tracks * time to read one track
$=$(Sectors in file/Sectors in one track) * (Time to read one track)
$= (2000/600)*6 = 20$ ms
total time needed to read the entire file is:
$= 2000*(4+3) + 20 = 8000 + 6000 + 20 = 14020$ ms

by Junior (989 points)
SeekTime = 4ms
OneRotationalLatency = (60/10000) = 0.006s = 6ms
AverageRotationalLatency = 0.5 * 6 = 3ms

1 TrackAccessTime = 1 Rotation
4 TrackAccessTime = 4 * OneRotationalLatency  = 24ms

600 SectorsAccessTime = 1 Rotation
600 SectorsAccessTime = 6ms
1 SectorAccessTime = 6/600 = 0.01ms = 10 ms

FullTracksToBeAccessed = floor(2000/600) = 3
ExtraSectorsToBeAccessed = 2000 - (600*3) = 200

TotalTime =

(4 * TrackAccessTime) + (200 * SectorAccessTime)

= (4 * 24) + (10*200) = 2096ms
by Active (2k points)
edited