Saturday, 6 June 2015

Q48,Paper 2,D13. Consider a disk queue with request for input/output to block on cylinders 98, 183, 37, 122, 14, 124, 65, 67 in that order. Assume that disk head is initially positioned at cylinder 53 and moving towards cylinder number 0. The total number of head movements using Shortest Seek Time First (SSTF) and SCAN algorithms are respectively



(A) 236 and 252 cylinders
(B) 640 and 236 cylinders
(C) 235 and 640 cylinders
(D) 235 and 252 cylinders


Scan algo.(elevator algo)
53---37-----14----0-------65----67-----98---122----124----183.

Total head movement are  16+23+14+65+2+31+24+2+59.=236 cylinders.
SSTF.algo.
53---65----67---98---122----124----183-------37.----14.
Total head movements are, (12+2+31+24+2+59+146+23)

1 comment:

  1. In SSTF, moving from 67 to 98 scans 31 cylinders but moving from 67 to 37 scans 30 cylinders only. So, head should move to 37 after servicing request for 67 instead of 98.

    ReplyDelete

Note: only a member of this blog may post a comment.