in Operating System retagged by
9,882 views
7 votes
7 votes
A program of size 64MB is stored on disk which supports an average seek time of 30ms and rotation time of 20ms. Page size is 4MB and track size is 32MB. If the pages of the program are contiguously placed on disk, then the total time required to load the program from disk in ms is _____

 

Given answer: 120
in Operating System retagged by
9.9k views

2 Comments

i am getting 110... (60+10+40) (seek time+rotational latency+transfer time) .... not sure if i am correct... wt's the explanation given?
1
1
@ PC, shall we consider seek time and Rotational latency twicw or not?? Finally what to conclude??
0
0

7 Answers

13 votes
13 votes
Best answer

File:Disk-structure2.svg
where:
(A) Track
(B) Geometrical sector
(C) Track sector
(D) Cluster


Total number of tracks this program takes = $\frac{64MB}{32MB} = 2$

Program has to be loaded from the disk, it will happen in the following way:

  1. Head will move at the beginning of the $1^{st}$ track.
    To move to that track on the disk it will take 1 Seek Time, and then to reach at the start of that track it will let the disk to rotate and this on an average takes up $\frac{1}{2} \times \text{Rotation Time}$. Then it will read the track and simultaneously transfer data which will take up 1 Rotation Time(in one rotation a head can read a single track)
    so, till now $\text{1 Seek Time} + \frac{1}{2} \times \text{Rotation Time} + \text{1 Rotation Time}$ has passed.

     
  2. After reading $1^{st}$ track it will move to the second track and to do that same process will be followed which will take exactly the same time as in first case.
     

Hence, 
$\begin{align*} \text{Time taken to load} &= 2 \times \left(\text{1 Seek Time} + \frac{1}{2} \times \text{Rotation Time} + \text{1 Rotation Time} \right )\\ &= 2 \times \left(\text{30ms} + \frac{1}{2} \times \text{20ms} + \text{20ms} \right )\\ &= 120ms \end{align*}$

selected by

2 Comments

But here the required tracks would be just one after the other(continuous) , but we are given avg. seek times, but I think seek time time for consecutive tracks would be much less than that..
0
0
I agree with Amsar the  entire program would be in the same cylinder.

it should be =ST+1/2 RT +K(transfer time per block)

k=total no of blocks

http://www.utdallas.edu/~muratk/courses/db08files/parameters_of_disks.pdf
1
1
5 votes
5 votes
seek time 30 ms

rotational latency 20/2 =10 ms

32 MB covers in 20 ms

total transfer time(30+10+20 )=60 ms

No. of tracks in program 64/32 =2

So, for 16 pages transfer time is 60*2= 120MB
edited by

4 Comments

How the time unit in MB it's should be in ms ..M I right
0
0
@Arjun sir, if program size is 64MB and track size is 32MB, then there must be at least two consecutive tracks holding the program, right? Then how we can say we do not need to move to next track? What is the final answer? Is it:

$$\underbrace{30ms}_{\text{seek time to first track}}
+\underbrace{10ms}_{\text{rotational latency to move head to the starting sector of first track}}
+\underbrace{20ms}_{\text{to read first track}}
+\underbrace{\text{negligible ms}}_{\text{seek time to second track (negligible since consecutive track)}}
+\underbrace{20ms}_{\text{to read second track}}=80ms$$
0
0

I also think correct answer should be as above = 80msec

https://gateoverflow.in/83066/time-required-to-read-800-successive-sectors

0
0
2 votes
2 votes

if the pages are continous so only two seek time will be required one when we will start to read and after that when we will change the track to read the remaining 32 MB of data.

rotational letency = 1/2 rotation time =but thats the average one. here we will consider the full because it is reading the full track.

transfer time =

20 ms = read one track

20 ms= 32MB

1byte= $\frac{20}{32MB}$

64 MB = $\frac{20*64MB}{32MB}$= 40ms

total time will be 32+32+20+20+40 =144 ms

edited by

4 Comments

@akhilnadhpc

first.. transfer time not give so no need to take it.

when head moves from one track to next one it needs one seek but here it is given avg seek time.

to reach at the starting track we need on avgSeek time = 32ms

two rotations are needed so = 20 + 20=40ms

if whole data is stored in contiguous fashion... 32ms + 40ms is sufficient since exact seek time betweed adjacent track is not given.

if all pages are at random location...than :   no.pages*(Tseek + Trot + Ttrans)

Tseek=32ms Trot=20/2 =10ms Ttrans= 0 not given

correct me !
0
0
why take transfer time  = 0 ?
0
0

I think rotational latency should be considered as average only i.e 10 ms because rotational latency is the amount of time it takes for the desired sector of a disk (i.e., the sector from which data is to be read or written) to rotate under the read-write heads of the disk drive. (http://www.webopedia.com/TERM/R/rotational_latency.html)

So, we must consider it as average only because we just want to wait for the time till r/w head comes over our first byte which we need to read. How is it related to whether we want to read full track or half or one sector or whatever amount of data from the track. 

0
0
1 vote
1 vote

Pages are continuously placed on disk- so we need seek time and avg. rotational latency only for first page. So, the sequence of data fetch is like follows:

  1. seek to the track.
  2. rotate to sector
  3. continue rotation until all data is retrieved - since page size is 4MB and track size is 32MB we do not need to move to next track assuming page is not split across tracks.

After the first page access, for every consecutive page access we need only rotational delay but this delay is not average rotational delay- but delay in moving to next sector containing the next page. So, it has to rotate 4/32 of a full rotation taking 20/8 ms.  So, we get

30 + 10 + 2.5 * 16 + 20/8 * 15 = 117.5 ms

edited by
by

1 comment

How you get 2.5 * 16 + 20/8 * 15 .

 

It should be 2.5*8 +2.5*8...

 

So, answer should be  30 + 10 + 2.5*16 = 80 ms.. right?
0
0
Answer:

Related questions

0 votes
0 votes
2 answers
4