Question: Can someone please show me how to implement the round-robin CPU scheduling algorithm in C programming? I need to show the algorithm with inputting a

Can someone please show me how to implement the round-robin CPU scheduling algorithm in C programming?

I need to show the algorithm with inputting a file, NOT user input!! The time quantum will come from the command line also, NOT user input!

------------------------------------------------------------------------------------------------------------------

Example input file:

4 - the first number is the amount of processes

1 3 4 - the 1 is the first process id, the 3 shows the burst time, the 4 shows the priority

2 1 8 - the 2 is the second process id, the 1 shows its burst time, the 8 shows its priority

3 2 7 - the 3 is the third process id, the 2 shows its burst time, the 7 shows its priority

4 6 9 - the 4 is the fourth process id, the 6 shows its burst time, the 9 shows its priority

------------------------------------------------------------------------------------------------------------------

I must output the process id, the burst times, the priorities, waiting time, turnaround time sorted in the correct order with the time quantum. Along with the avg. wait time and avg. turnaround time. Thank you very much!

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!