Question

operating systems question: Below is a set of processes with CPU burst times listed in milliseconds....

operating systems question:

Below is a set of processes with CPU burst times listed in milliseconds.  Assume all processes arrive at time 0 in the  order shown.
Process            CPU burst
A                         10 ms
B                          3 ms
C                          6 ms
D                          8 ms
E                           5 ms

a) Create a Gantt chart for the Shortest Job First scheduling algorithm.  Assume no preemption.  Label the 
ending times of each process.  Use this format for your Gantt chart:

|  W     |     X     |     Y     |     Z     |
0         4             7            10          17

b) What are the wait times for each process, and the average wait time for SJF? Show your work.

c) Draw a Gantt chart for the Round Robin scheduling algorithm. Use a quantum of 5 ms.

d) What are the wait times for each process, and the average wait time for Round-Robin? Show your work.

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

Given

Process CPU Burst
A 10
B 3
C 6
D 8
E 5

a) Gantt chart for Shortest Job First:

B E C D A
0 3 8 14 22 32

b)

Waiting Time for Process = Turn Around Time – Burst Time

Turn Around Time = Completion Time – Arrival Time

First we calculate Turn Around Time for each process,

Process Turn Around Time
A =32-0 = 32
B =3 - 0 = 3
C =14 - 0 = 14
D =22 - 0 = 22
E =8 - 0 = 8

Now Waiting time for each process,

Process Waiting Time
A = 32 - 10= 22
B = 3 - 3 =0
C =14 - 6 =8
D = 22 - 8 =14
E = 8 - 5 = 3

Average Waiting time = Total waiting time/ Number of process

Average Waiting time = (22+0+8+14+3)/5

Average Waiting time =47/5

Average Waiting time using SJF =9.4 ms

c) Gantt chart using Round Robbin CPU scheduling using time quantum 5ms

A B C D E A C D
0 5 8 13 18 23 28 29 32

d)

Waiting Time for Process = Turn Around Time – Burst Time

Turn Around Time = Completion Time – Arrival Time

First we calculate Turn Around Time for each process,

Process Turn Around Time
A =28-0 = 28
B =8 - 0 = 8
C =29 - 0 = 29
D =32 - 0 = 32
E =23- 0 = 23

Now Waiting time for each process,

Process Waiting Time
A = 28- 10= 18
B = 8- 3 =5
C =29 - 6 =23
D = 32- 8 =24
E = 23 - 5 = 18

Average Waiting time = Total waiting time/ Number of process

Average Waiting time = (18+5+23+24+18)/5

Average Waiting time =88/5

Average Waiting time using Round Robbin =17.6 ms

Add a comment
Know the answer?
Add Answer to:
operating systems question: Below is a set of processes with CPU burst times listed in milliseconds....
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
  • 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:Processburst TimePriorityP1103P211P323P414P552For each of the scheduling algorithms, FCFS, Shortest-Job-First (SJF, non-preemptive), Priority (smaller priority number implies higher scheduling priority), and RR (quantum = 1) do the following.Draw a Gantt chart to show how these processes would be scheduled.Give the turnaround time (total time from the first arrival into ready state until CPU-burst is completed) of each process.Give the waiting time (total time spent in the Ready state) of each process.Give...

  • Consider the following set of processes, with the length of CPU burst in milliseconds.

    Consider the following set of processes, with the length of CPU burst in milliseconds. Process PI P2 P3 P4 P5 Arrival time 00 02 03 06 30 Burst time 10 12 14 16 05 Draw a Gantt chart that illustrates the execution of these processes using the preemptive shorte st job first (SJF) algorithm. Hence find the average waiting time. Draw a Gantt chart that illustrate the execution of these processes using preemptive priority scheduling algorithm. Given priority of each...

  • Opearting system 5. [27pts.] Given the following set of processes, with arrival times, priorities, and the...

    Opearting system 5. [27pts.] Given the following set of processes, with arrival times, priorities, and the length of the CPU burst in ms: Process Arrival Time Burst time Priority P1 P2 P3 2 10 P4 (Note: a lower number means higher priority; processes P2- P4 arrive at the same time, in the given order) a. Draw a Gantt chart showing a FCFS scheduling algorithm. b. Draw a Gantt chart showing a non-preemptive Priority scheduling algorithm. Draw a Gantt chart showing...

  • 5. [27pts.] Given the following set of processes, with arrival times, priorities, and the length of...

    5. [27pts.] Given the following set of processes, with arrival times, priorities, and the length of the CPU burst in ms: Priority Burst time Arrival Time Process 3 P1 4 P2 2 10 P3 P4 (Note: a lower number means higher priority) Draw a Gantt chart showing a FCFS scheduling algorithm. a. b. Draw a Gantt chart showing a non-preemptive Priority scheduling algorithm. c. Draw a Gantt chart showing a Round Robin Scheduling algorithm with quantum of 4ms d. Compute...

  • V. Round Robin and SJF comparison 6 Process Arrival Time CPU Burst Time P1 0 9...

    V. Round Robin and SJF comparison 6 Process Arrival Time CPU Burst Time P1 0 9 P2 4 4 P3 6 P4 For each of the following algorithms, draw a Gantt chart and calculate the average wait time and turn around time. 1. Round robin with quantum=1 time unit 2. Round-robin with quantum=3 time-units 3. SJF WI preemption (Shortest Remaining Time First), assume quantum=3 4. SJE Wlo preemption 5. ECES

  • C language show all work 1. [50 pts] Given the following set of processes, with arrival...

    C language show all work 1. [50 pts] Given the following set of processes, with arrival times, priorities, and the length of the CPU burst in ms: Priority Arrival Time Burst time Process P1 P2 P3 P4 4. 3 2 0 0 10 (Note: lower number means higher priority, processes P1, P2, P3, and P4 arrive at the same time, in the given order). a. Draw a Gantt chart showing a FCFS scheduling algorithm. b. Draw a Gantt chart showing...

  •          Process                    Arrival Time            &nbsp

             Process                    Arrival Time                             Burst Time                         P1                                0                                              2                         P2                                1                                              1                         P3                                2                                              4                         P4                                3                                              2                         P5                                4                                              1 Consider a set of processes given above with the arrival time and the length of CPU burst time given in cycles. Show a Gantt chart and calculations of average turnaround time and average waiting time of these processes under the shortest job first (SJF) with preemption CPU scheduling algorithm and the round-robin...

  • Consider the following set of processes, with the length of the CPU burst time given in...

    Consider the following set of processes, with the length of the CPU burst time given in milliseconds: Process            Burst Time      Priority P1                    7                      5 P2                    2                      4 P3                    11                    3 P4                    9                      1 P5                    5                      3 The processes are assumed to have arrived in the order P1,P2, P3, P4, P5, all at time 0. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 2). * Please provide a chart...

  • 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                    10                    3 P2                    1                     1 P3                    2                     3 P4                    1                     4 P5                    5                     2 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF (SPN), a...

  • Assume that the three processes arrived in order: Processes                            CPU Burst Time P1  &n

    Assume that the three processes arrived in order: Processes                            CPU Burst Time P1                                           17 P2                                            6 P3                                            8 a.     Please draw the Gantt chart if FCFS scheduling is used. b.    Please calculate the average waiting time and average completion time under FCFS. You MUST show the calculation procedure. c.      Please draw the Gantt chart if Round Robin is used. d.    Please calculate the average waiting time and completion time under RR with q = 3. You MUST show the calculation...

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