Implementation of CPU Scheduling Policies: Priority (Non-preemptive and Preemptive) and Round Robin
Develop a menu driven C program to implement the CPU Scheduling Algorithms
Priority (Non-Preemptive and Preemptive) and Round Robin
Sample Learning Outcome:
- Learn about the CPU Scheduling algorithms Priority and RR.
- Implement the sorting algorithms necessary for scheduling and analyzing the performance using waiting time, turn around time and response time.
- Learn to draw the Gantt Chart Best Practices:
- Algorithm design
- Naming convention for file names, variables
- Comment usage at proper places
- Prompt messages during reading input and displaying output
- Error handling mechanisms for failures in system calls
- Incremental program development
- Modularity
- All possible test cases in output
Algorithm:
- Read the following
- Number of processes
- Process IDs
- Arrival time for each process
- Burst Time for each process
- Design a menu with Priority and Round Robin options
- Upon selection of menu option apply the corresponding algorithm.
- Compute the Turnaround Time, Average waiting Time for each of the algorithm.
- Tabularize the results.
- Display the Gantt Chart.
Sample Input & Output:
CPU SCHEDULING ALGORITHMS
- ROUND ROBIN
- PRIORITY
- EXIT
Enter your option: 1
ROUND ROBIN CPU SCHEDULER
Number of Processes: 5
Process ID: P1
Arrival Time: 0
Burst Time: 4
Process ID: P5
Arrival Time: 6
Burst Time: 3
Output:
Process ID Arrival Time Burst Time Turnaround Time Waiting Time Response time
P1 0 4 *** *** ***
*** *** *** *** *** ***
***
***
Average *** *** ***
Want to Continue ( Y/N): Y
CPU SCHEDULING ALGORITHMS
- ROUND ROBIN
- PRIORITY
- EXIT
Enter your option: 2
PRIORITY CPU SCHEDULER
- Non preemptive PRIORITY
- Pre emptive PRIORITY
Enter your option: a
Number of Processes: 5
Process ID: P1
Arrival Time: 0
Burst Time: 4
Process ID: P5
Arrival Time: 6
Burst Time: 3
Output:
Process ID Arrival Time Burst Time Turnaround Time Waiting Time Response Time
*** *** *** *** *** ***
*** *** *** *** *** ***
***
***
Average *** ***

![[Solved] UCS1411 Exercise 4-Priority and Round Robin](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] UCS1411 Exercise 8- Memory Management Algorithms](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.