Please choose your disk scheduling algorithm: 1. FCFS - First Come First Serve 2. SSTF - Shortest Seek Time First 3. SCAN - 4. CSCAN - Circular Scan 5. LOOK - Scan without moving to ends 6. CLOOK - Circular Look without moving to ends Your choice is (1~6, other input means EXIT): 1 *** MAIN MENU ************************* 0. Change Disk Schedule Algorithm - FCFS 1. Print Disk Scheduling Result 2. Input Disk Request to Device Queue 3. Exit Please enter your choice (0~3):1 Process# Tracks# -------------------------- Current 53 1 98 (+ 45= 45) 2 183 (+ 85= 130) 3 37 (+146= 276) 4 122 (+ 85= 361) 5 14 (+108= 469) 6 124 (+110= 579) 7 65 (+ 59= 638) 8 67 (+ 2= 640) -------------------------- Total movement: 640 tracks *** MAIN MENU ************************* 0. Change Disk Schedule Algorithm - FCFS 1. Print Disk Scheduling Result 2. Input Disk Request to Device Queue 3. Exit Please enter your choice (0~3):3 Terminated by userSource Codes per request
2009/04/30
OS Exercise - Disk Scheduler
A simple C program which implements the disk scheduling algorithm including FCFS, SSTF, SCAN, CSCAN, LOOK and CLOOK.
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言