Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



Consider a disk system with $100$ cylinders. The requests to access the cylinders occur in the following sequence:

$4,34,10,7,19,73,2,15,6,20$

Assuming that the head is currently at cylinder $50$, what is the time taken to satisfy all requests if it takes $1$ ms to move from one cylinder to adjacent one and the shortest seek time first policy is used?






Solution

Using shortest seek time first policy, the head always moves to the nearest request.

Initial head position is

$50$

Request sequence in SSTF order will be:

$50 \to 34 \to 20 \to 19 \to 15 \to 10 \to 7 \to 6 \to 4 \to 2 \to 73$

Now, total head movement is

$|50-34|+|34-20|+|20-19|+|19-15|+|15-10|+|10-7|+|7-6|+|6-4|+|4-2|+|2-73|$

$=16+14+1+4+5+3+1+2+2+71$

$=119$

Since $1$ cylinder movement takes $1$ ms,

Total time taken is

$119$ ms



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...