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 in c++ 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

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!