Question: Q 7 Coding Question: Scheduling Algorithms Calculator In the first few questions I asked you to calculate the head distance for FCFS , SCAN, SSTF

Q7 Coding Question: Scheduling Algorithms Calculator
In the first few questions I asked you to calculate the head distance for FCFS, SCAN, SSTF, C-SCAN for two sets of numbers, but wouldn't it be nice if we could just have them for any set? For this question using any language of your choice create functions that can calculate FCFS, SCAN, SSTF, C-SCAN. Each function should accept the number of cylinders, the starting position, and an array of the queue. It is up to you to write the implementation details. To test each one, put in the values I gave you for questions 1 and 3 in a driver main and validate your answers for those questions. Protip: if you read this part early enough, and you coded this correctly, this should provide your answers to the above questions 1 and 3. If you didn't get around to reading this until after you completed those questions, fret not, this will be a good validation that you get the right results for both your coding and your manual calculations.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!