90 likes | 289 Views
Disk Scheduling. To achieve the best disk seek time. Hard Disk Enhanced A+ Guide To Managing and Maintain Your PC, www.course.com. FCFS First Come First Served. Disk queue: 98, 183, 37, 122, 14, 124, 65, 67 Current position: 53 FCFS order of servicing:
E N D
Disk Scheduling To achieve the best disk seek time Dr Milan Simic
Hard DiskEnhanced A+ Guide To Managing and Maintain Your PC, www.course.com Dr Milan Simic
FCFSFirst Come First Served • Disk queue: • 98, 183, 37, 122, 14, 124, 65, 67 • Current position: 53 • FCFS order of servicing: • 53 -> 98, 183, 37, 122, 14, 124, 65, 67 • Number of cylinders heads should go is: • ??? • |53-98| + |98-183| + |183-37| +… Dr Milan Simic
SSTFShortest Seek Time First • Disk queue: • 98, 183, 37, 122, 14, 124, 65, 67 • Current position: 53 • SSTF order of servicing: 53 -> 65, 67, 37, 14, 98, 122, 124, 183 • Number of cylinders travelled is: • ??? Dr Milan Simic
SCAN algorithm • Serving all request on the way from • O (the first cylinder) to 199 (the last cylinder) • And in the other direction as well (199 -> 0) • Disk queue: 98, 183, 37, 122, 14, 124, 65, 67 • Current position: 53, previous was 60 • SCAN order of servicing: 53 -> 37, 14, 0 (although there is no request), 65, 67, 98, 122, 124, 183, 199 (although there is no request). Dr Milan Simic
C-SCAN algorithmCircular SCAN • Serving all request on the way from • O (the first cylinder) to 199 (the last cylinder) • Not serving in the other direction. • Goes quickly back, full speed to 0, • and serving again on the way up. • Disk queue: 98, 183, 37, 122, 14, 124, 65, 67 • Current position: 53 • C-SCAN order of servicing: 53 -> 65, 67, 98, 122, 124, 183, 199, fast back to 0, 14, 37. Dr Milan Simic
LOOK algorithm • Serving all request in one direction, • And in the other direction as well. • No 0 or 199 if there is no request!!! • Disk queue: 98, 183, 37, 122, 14, 124, 65, 67 • Current position: 53, previous was 60 • => direction is down • LOOK order of servicing: 53 -> 37, 14, 65, 67, 98, 122, 124, 183 Dr Milan Simic
C-LOOK algorithm • Serving all request on the way up (n -> n+1) • Not serving in the other direction. • Goes back quickly, full speed to min address, • and serving again on the way up. • Disk queue: 98, 183, 37, 122, 14, 124, 65, 67 • Current position: 53 • LOOK order of servicing: 53 -> 65, 67, 98, 122, 124, 183, fast back to 14, 37 Dr Milan Simic