Question

A set of processes along with their burst time in milliseconds is given below. The processes...

A set of processes along with their burst time in milliseconds is given below. The processes should execute in First Come First Served order. Assume that the quantum (q) is 3:

Process Burst Time

P1 22

P2 4

P3 12

P4 15

P5 2

Find the average waiting time using the Round Robin algorithm. Round your answer to 2 decimal places

Homework Answers

Answer #1

A set of process is given with the burst time in milliseconds. the proceaa will execute First come First serve process and the quantum time |q| is 3 ms.

Round Robin Scheduling algorithm is used in Multitasking operating system and Time sharing basically based on First Come First Serve.

      Process

Burst Time ( ms)

            P1

         22

            P2

          4

            P3

         12

            P4

         15

            P5

          2

The quantum |q| is 3 millisecond and the arrival time is 0. Draw the Gantt Chart for the process to find out the average waiting time and turn around time.

P1 gets the CPU at the 0 ms so when P1 gets the CPU it has to execute the how long the burst time of the P1 i.e 6 22 ms but we need to allow it to excute only equals to the time quantum |q| which is 3 ms

Gantt Chart :

0       3        6        9     12      14    17 18 21    24    27    30   33 36 39   42

P1

P2

P3

P4

P5

P1

P2

P3

P4

P1

P3

P4

P1

P3

P4

42      45        48      51       54     55

P1

P4

P1

P1

P1

Method to find out the waiting time

Turnaround Time = Complition Time – Arriving Time

Wating Time = Turnaround time – Burst time

   Process

Complition Time (ms)

Turn around Time (ms)

Waiting Time (ms)

         P1

         55

55 – 0 = 55

55 – 22 = 33

       P2

         18

18 – 0 = 18

18 – 4 = 14

        P3

         39

39 – 0 = 39

39 – 12 = 27

        P4

         48

48 – 0 = 48

48 – 15 = 33

        P5

         14

14 – 0 = 14

14 – 2 = 12

Average Turnaround time is

( 55 + 18 + 39 + 48 + 14 ) / 5

34.80 ms

Average Waiting Time is

( 33 + 14 + 27 + 33 + 12 ) / 5

23.80 ms

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process            Burst Time Priority P1                               5 4 P2                               3 1 P3                               1 2 P4                               7 2 P5                               4 3 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. If nonpreemptive priority (a larger priority number implies a higher priority) is used, what is the average waiting time of...
Process Burst Time Priority Arrival p1 8 15 0 p2 3 20 0 p3 4 20...
Process Burst Time Priority Arrival p1 8 15 0 p2 3 20 0 p3 4 20 20 p4 4 20 25 p5 5 5 45 p6 5 15 55 The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority,with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time quantum of 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue. Process            Burst Time Arrival Time...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority,with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time quantum of 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue. Process            Burst Time Arrival Time...
**Operating System** FCFS Example Processes arrived in the order of P2,P3,P1. Process Burst Time P1 24...
**Operating System** FCFS Example Processes arrived in the order of P2,P3,P1. Process Burst Time P1 24 P2 3 P3 3 Calculate the waiting times for P1, P2, and P3 Draw the Gantt Chart and calculate the average waiting time.
What is the average waiting time for Processes If the Operating System uses the Priority Scheduling...
What is the average waiting time for Processes If the Operating System uses the Priority Scheduling (PS) Scheduling Algorithm? (P1=20 ms, P2=15 ms, P3=10 ms, P4=5 ms) Priority Order: P1, P4, P3, P2
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Process Priority Burst...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Process Priority Burst Arrival P 1 8 15 0 P 2 3 20 0 P 3 4 20 20 P 4 4 20 25 P 5 5 545 P 6 5 15 55 Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. The scheduler will execute the highestpriority process. For processes with the same priority, a round-robin scheduler will be...
**Operating System** Preemptive SJF The newly arrived process with shorter CPU burst will preempt the currently...
**Operating System** Preemptive SJF The newly arrived process with shorter CPU burst will preempt the currently executing process. Process Arrival Time Burst Time P1 3 8 P2 2 4 P3 1 9 P4 0 5 Draw the Gantt Chart and calculate the average waiting time.
Using the non-preemptive and preemptive Priority schedulers, draw out process execution timelines for the following processes....
Using the non-preemptive and preemptive Priority schedulers, draw out process execution timelines for the following processes. Clearly indicate the wait time for each process for each scheduler.   Process Arrival Burst Priority P1 0 6 2 P2 3 2 1 P3 6 8 4 P4 9 4 5 P5 12 3 3
1. What is the average waiting time for Processes If the Operating System uses the Shortest-Job-First...
1. What is the average waiting time for Processes If the Operating System uses the Shortest-Job-First (SJF) Scheduling Algorithm? (P1=5 ms, P2=10 ms, P3=15 ms) 2. How many page faults occur in the Optimum Page Replacement algorithm (OPR) with the following reference string for three-page frames?    Reference String: 4,2,1,3,2,3,4,1 3. What is the average waiting time for Processes If the Operating System uses Shortest-Job-Remaining-First (SJRF) Scheduling Algorithm? (P1=5 ms, P2=10 ms, P3=15 ms) Arrival Time ( P1=0 ms, P2=5...