Question

Burst Time Arrival Time P1 54 2 P2 12 3 P3 26 4 P4 16 5...

Burst Time

Arrival Time

P1

54

2

P2

12

3

P3

26

4

P4

16

5

P5

8

6

P6

92

7

use SRTF

(1) Gant chart

(2) Waiting time and Turn around time for every process

(3) Average WT and Average TAT

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the answer below,

First, let's see some information about SRTF (Shortest Remaining Time First)

1. In this algorithm, processes are scheduled based on the burst time

2. It's preemptive by nature means the process will be stopped and another process with less burst time would be scheduled.

Gantt Chart:

P4 | PIPS | PT Pਪ | P 3P1 | P6 3 6 01 233965 128 2 z 0.

Please find the process table below:

Process Burst Time Arrival Time Completion Time Turn Around Time(TAT) Waiting Time(WT)
P1 54 2 118 116 62
P2 12 3 23 20 8
P3 26 4 65 61 35
P4 16 5 39 34 18
P5 8 6 14 8 0
P6 92 7 210 203 111

Average Waiting time = 234 / 6 = 39

Average Turn Around Time = 442 / 6 = 73.67

Explanation:

--> At time 0 no process was there for execution.

--> At time 2, first process P1 arrives and starts execution till time 3.

--> At time 3, Process P2 arrives with burst time 12, so CPU would be assigned to P2. P1 has 53 units remaining for execution.

--> At time 4, Process P3 arrives with burst time of 26 so it would be put in the queue and P2 continue execution.

--> At time 5, Process P4 arrives with burst time of 16 so it would be put in the queue and P2 continue execution.

--> At time 6, Process P5 arrives with a burst time of 8 which is less than P2 so P2 will be stopped and P5 is assigned with CPU. P2 has 9 units of burst time remaining.

--> At time 7, Process P6 arrives with burst time of 92 so it would be put in the queue and P5 continue execution.

--> At time 14, Process P5 completes execution and P2 which has the lowest burst time among the queued process will be brought into CPU.

--> At the time 23, Process P2 completes execution and P4 which has the lowest burst time among the queued process will be brought into CPU.

--> At the time 39, Process P4 completes execution and P3 which has the lowest burst time among the queued process will be brought into CPU.

--> At the time 65, Process P3 completes execution and P1 which has the lowest burst time among the queued process will be brought into CPU.

--> At time 118, Process P1 completes execution and the last process P6 will be brought into CPU.

--> At time 210 P6 completes the execution.

Now find out the completion time of each process.

--> Using completion time calculate Turn Around Time which is (Completion Time - Arrival Time)

--> Using Turn Around Time calculate waiting time which is (Turn Around Time - Burst Time)

Please let us know in the comments if you have any doubt.

Add a comment
Know the answer?
Add Answer to:
Burst Time Arrival Time P1 54 2 P2 12 3 P3 26 4 P4 16 5...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • process Arrival Time Burst Time P1 0 10 P2 2 7 P3 4 4 P4 5...

    process Arrival Time Burst Time P1 0 10 P2 2 7 P3 4 4 P4 5 2 P5 6 1 I need the solution on non-preemptive SJF & Preemptive SJF the Gantt Chart , Wating time and Average Wating time becouse I am really confused :(

  • Process Arrival Time CPU Burst Time P1 0 7 P2 3 8 P3 4 3 P4...

    Process Arrival Time CPU Burst Time P1 0 7 P2 3 8 P3 4 3 P4 6 7 For the following algorithms, calculate the average wait time and turn around time. Round-robin with quantum of one time-unit

  • Answer the following using the processes and their corresponding arrival time and burst time. These processes...

    Answer the following using the processes and their corresponding arrival time and burst time. These processes are being scheduled using a preemptive, round-robin scheduling algorithm with a time quantum of 2 units. PID Arrival Time Burst Time P1 0 4 P2 1 5 P3 2 3 P4 3 2 P5 4 6 1. Use a Gantt chart to represent the above processes (5 points) 2. Calculate the average waiting time for each process (5 points) 3. Calculate the completion time...

  • The processes are assumed to have arrived in the order of P1, P2, P3, P4, P5, P6 and P7 all at time 0.

    Table 1 shows the list of processes and burst time for each processesTable 1 ProcessBurst TimeP113P25P323P43P531P66P714 The processes are assumed to have arrived in the order of P1, P2, P3, P4, P5, P6 and P7 all at  time 0. a)    Calculate the average waiting time when each of the below scheduling algorithm is used. Assume that a quantum 8 is being used:i.) First Come, First Server                                                                      (6 marks)ii.) Round Robin                                                                                       (6 marks)iii.) Shortest Job First, non preemptive                                                      (6 marks)

  • Five processes p1,p2,p3,p4,p5 arrive at time 0 simultaneously. their cpu burst are 12,6,5,6, and 8 respectively....

    Five processes p1,p2,p3,p4,p5 arrive at time 0 simultaneously. their cpu burst are 12,6,5,6, and 8 respectively. 1.) Uses Shortest job first to calculate the waiting time of each process b.) calculate the average waiting time

  • Consider 5 processes whose Arrival time and CPU Burst time is as follows (Process no: Arrival...

    Consider 5 processes whose Arrival time and CPU Burst time is as follows (Process no: Arrival time: Burst time): P1:0,6 P2:4,2 P3:5,2 P4:6,5 P5:7,9 Assume that the processes are scheduled using FCFS scheduling algorithm. The average waiting and turaround time is O 3.4 and 8.2 O 3.5 and 8.0 O 3.6 and 7.1 3.9 and 9.8

  • Consider 5 processes whose Arrival time and CPU Burst time is as follows (Process no: Arrival...

    Consider 5 processes whose Arrival time and CPU Burst time is as follows (Process no: Arrival time: Burst time): P1:0,6 P2:2,4 P3:3,2 P4: 5,5 P5: 6,9 Assume that the processes are scheduled using SJF (Non-preemptive) scheduling algorithm. The average waiting and turaround time is O 5.45, 11.60 O 5.40, 10.60 O 6.50, 10.99 O 5.45, 11.60

  • Consider the following set of processes (P1 arrived at t=0; burst time=10), (P2 arrived at t=2:...

    Consider the following set of processes (P1 arrived at t=0; burst time=10), (P2 arrived at t=2: burst time=8). (P3 arrived at t=3; burst time=3), (P4 arrived at t=10; burst time=4), (P5 arrived at t=12: burst time=1). (P6 arrived at t=15; burst time=4). At (t=20) using RR (Q=3), as process scheduling algorithm, process will be handled P1 Ο P20 P3 O P4 P5 a P6 о

  • Q.2] Answer the following questions Process Burst Time Priority P1 3 1 P2 8 3 P3...

    Q.2] Answer the following questions Process Burst Time Priority P1 3 1 P2 8 3 P3 2 4 P4 4 5 P5 5 1 (21 points) Consider the set of processes shown in the table above, with the length of the CPU-burst time given in milliseconds. The processes are assumed to have arrived in the order P5, P4, P3, P2 , and P1, all approximately at time 0. Draw three Gantt charts illustrating the execution of these processes using SJF,...

  • Given the following set of processes---with the specified length of the CPU burst, arrival time, and...

    Given the following set of processes---with the specified length of the CPU burst, arrival time, and priority---compute response time for P1-P5 with round-robin scheduling with time quantum of 10 units. Also compute average response time. Assume that a newly arriving process arrives first at time T- and a process that is preempted due to the completion of its quantum arrives at time T+ in the waiting queue. (Note: Show the Gantt chart and other working details in your worksheet.) Process...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT