(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)
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