Question
Consider the following set of five processes P1, P2, P3, P4, and P5. Process Burst Time Priority P1 19 3 P2 26 1 P3 3
Consider the following set of five processes P1, P2, P3, P4, and P5.
Process | Burst Time | Priority |
P1 | 19 | 3 |
P2 | 26 | 1 |
P3 | 3 | 5 |
P4 | 11 | 2 |
P5 | 14 | 4 |
The priorities and the lengths of the CPU-burst time in milliseconds are given below. The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0 (except for preemptive SJF). A larger priority number implies a higher priority. Draw a Gantt chart illustrating the execution of these processes and compute the average waiting time (AWT) of each of the following CPU scheduling algorithms. Also show the waiting time for each process.
- FCFS (First-Come, First-Served). Also calculate average execution time.
- Non-preemptive SJF (Shortest-Job-First).
- Preemptive SJF (Shortest-Job-First). Also show turnaround time for each process.
Process | P1 | P2 | P3 | P4 | P5 |
Arrival Time | 0 | 0.4 | 1 | 2 | 2.5 |
- Non-preemptive Priority Scheduling.
- RR (Round-Robin)
- with time quantum of 10 milliseconds.
- with time quantum of 15 milliseconds.
- with time quantum of 5 milliseconds.
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