Awesome q2a theme
0 votes
78 views

Can someone please tell the method to solve this question

 

Thank you in advance 

in Operating System by (392 points) | 78 views
0
i'm getting 3264
0
can you please provide the method? Thank you
0
i got the answer 3266.5, i will add the answer below
0
Thank you @Mk Utkarsh
0

 report the question and give them link to my answer

1 Answer

+4 votes
Best answer

Each sector requires a seek,

Size of File = $8\text{KB}$

Total sectors needed for file = $\Large \frac{2^{13}}{2^9} $$ = 16$

$\text{Total time = 16 (seek time + avg rotational latency + data transfer time)  }$

Time to move head from cylinder to adjacent one is 2ms, So time to move cylinder from 1 to 200 is $199 \times 2 ms.$

$\text{Avg Seek time = }$ $\Large \frac{\text{Number of Cylinders}}{3} \times 2  $$ =  133.34ms$

$\text{Avg rotational latency =  } \frac{1}{2} \times \frac{60}{6000} sec  = 5ms $

Hence, for 1 full rotation takes 10ms or we can say to transfer 1 track or 64 sectors it takes 10ms.
So to transfer 1 sector it will take $\frac{10}{64} ms$

$\text{Total time = 16 (133.34 + 5 + } \frac{10}{64})  = 16 \times 138.34 + \frac{10}{4} = 2215.94ms $


As Vimal pointed out that Average seek time should be $\Large \frac{\text{Max Seek time}}{3}$ i was not able to find any reliable source for it, 

here OP's method was correct but incomplete and also it is almost impossible to solve for each and every track manually and then take the average of seek times. So i wrote a code for it for confirmation that this formula $\Large \frac{\text{Max Seek time}}{3}$ is valid or not.

https://ideone.com/weZQrR

Here i found out that if for moving from one cylinder to adjacent one if we need 1 time unit then for $n$ cylinders max seek time can be $n-1$ units and the formula should be $\Large \frac{\text{Max Seek time  + 1}}{3}$ or $\Large \frac{\text{Number of Cylinders}}{3}$.

So i got 66.7 for 199 max seek time and multiplying by 2 because 1 time unit is 2ms for question above we get $133.34$.

by (302 points)
edited by
0
@mk utkarsh, I have one doubt.

should not avg seek time be (max_seek_time / 3)?
0

 yes thank you for that. I will edit it.

0
Why it should be 3 ?
0

 added some explanation and let me know if you find something which is missing or wrong

0

I reckon this will be useful https://stackoverflow.com/a/13295708/8213590

+2

Also This

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Dec 2019
  1. Pratyush Priyam Kuan

    158 Points

  2. Vimal Patel

    118 Points

  3. avistein

    65 Points

  4. srestha

    54 Points

  5. Mk Utkarsh

    49 Points

  6. arya_stark

    46 Points

  7. goxul

    39 Points

  8. Sathuri Bharath

    34 Points

  9. vishal burnwal

    31 Points

  10. Shaik Masthan

    27 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
2,315 questions
1,294 answers
6,599 comments
89,719 users