Question
Consider the following three processes that arrive in a system at the specified times, along with the duration of their CPU bursts. Process P1 arrives
Consider the following three processes that arrive in a system at the specified times, along with the duration of their CPU bursts. Process P1 arrives at time t=0, and has a CPU burst of 10 units. P2 arrives at t=2, and has a CPU burst of 2 units. P3 arrives at t=3, and has a CPU burst of 3 units
. Write programs to find out average waiting time for each of the following algorithms. (a) First Come First Serve (non-preemptive) (b) Shortest Job First (preemptive and non-preemptive) (c) Priority (preemptive and non-preemptive) (d) Round robin with a time slice of (at most) 5 units per process (non-preemptive)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Lets walk through how you can implement programs to calculate the average waiting time for the speci...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