-
Learn more about disk scheduling and clarify the principles of disk scheduling.
-
Gain a deeper understanding of the main tasks of disk scheduling.
-
Master the main algorithm of disk scheduling through programming.
- Schedules a set of disk accesses given below:
requests | A | B | C | D | E | F | G | H | I | J | K | L | M | N |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
requests for cylinders | 30 | 50 | 100 | 180 | 20 | 90 | 150 | 70 | 80 | 10 | 160 | 120 | 40 | 110 |
-
It is required to use First Come First Serve (FCFS), Shortest Seek Time First (SSTF) and elevator algorithm (SCAN) for scheduling.
-
It is required to give the order of disk access and calculate the average number of moving lanes in each algorithm.
-
Assuming that the current read/write head is at number 90, the elevator scheduling algorithm moves in the direction of increasing track number.
Based on Qt(C++) for Linux.
Read in data via data.txt file.
The first line: the current position and the direction of the magnetic head;
Lines 2 to n: Request service name, track number accessed.