Can you please help me with this code because i am struggling on how to do this, this code has to be in C code. question that i need help with: Priority with round-robin schedules tasks in order of priority and uses round-robin scheduling for tasks with equal priority. There will be multiple queues in the system each representing one priority class. For ease of implementation, you need total 1 through max_priority numbers of queues. You should start scheduling job out of the max priority queue and serve the members of the queue following RR. The schedule of tasks has the form [task name] [priority] [CPU burst], with the following example format: T1, 4, 20 T2, 2, 25 T3, 3, 25 T4, 3, 15 T5, 10, 10 The output should look like this: Running task = [P1] [4] [5] for 5 units. Task P1 finished. Running task = [P5] [3] [4] for 4 units. Task P5 finished. Running task = [P4] [2] [7] for 1 units. Task P4 exhausted its Quantum hence will be Rescheduled. Running task = [P3] [2] [1] for 1 units. Task P3 finished. Running task = [P4] [2] [6] for 6 units. Task P4 finished. Running task = [P2] [1] [3] for 3 units. Task P2 finished.
Can you please help me with this code because i am struggling on how to do this, this code has to be in C code.
question that i need help with:
Priority with round-robin schedules tasks in order of priority and uses round-robin scheduling for tasks with equal priority. There will be multiple queues in the system each representing one priority class. For ease of implementation, you need total 1 through max_priority numbers of queues. You should start scheduling job out of the max priority queue and serve the members of the queue following RR.
The schedule of tasks has the form [task name] [priority] [CPU burst], with the following example format:
Running task = [P1] [4] [5] for 5 units.
Task P1 finished.
Running task = [P5] [3] [4] for 4 units.
Task P5 finished.
Running task = [P4] [2] [7] for 1 units.
Task P4 exhausted its Quantum hence will be Rescheduled.
Running task = [P3] [2] [1] for 1 units.
Task P3 finished.
Running task = [P4] [2] [6] for 6 units.
Task P4 finished.
Running task = [P2] [1] [3] for 3 units.
Task P2 finished.

Step by step
Solved in 4 steps









