Question
Let there be 200 cylinders numbered from 0 to 199. Let there be a list of cylinder numbers e.g. 100, 65, 69, 87, 153, 159,
Let there be 200 cylinders numbered from 0 to 199. Let there be a list of cylinder numbers e.g. 100, 65, 69, 87, 153, 159, 187, 192, 44, 11. Let the initial position of disk head be at cylinder number 53. Implement the following disk scheduling algorithms: (i) FCFS, (ii) SSTF, (iii) SCAN, and (iv) LOOK. Generate the list of cylinder numbers and the initial head position randomly. Compute the total head movement for each scheduling algorithm for the same list of cylinder numbers and the initial head position. Repeat these steps for a list containing the number of cylinders 10, 20, 30, 40, 50, ..., 100. Plot the total head movement versus the size of the list (i.e. size of the list on x-axis and the total head movement on y-axis). In other words, randomly generate a list of cylinders of size 10 and initial head position, say 53. Run each of these algorithms on that list and record the total head movement. Now, randomly generate a list of cylinders of size 20 and initial head position say 107, run each of these algorithms on the list and record the total head movement, and so on. *** You need to implement disk scheduling algorithms in C++ ***
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started