Question

[8 What is the waiting time of each process for each of the scheduling algorithms? Marks] Job Arrival Time Size (msec) P1 0 9


The question is this. there is nothing given
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. FIRST COME FIRST SERVE (FCFS)::

THE PROCESS WHICH COME FIRST WILL BE SERVED FIRST IT IS NON-PREEMPTIVE ALGORITHM.

GANTT CHART:: (arrivaltime- finish time) of each processor

P1 P2 P3 P4 P5

0-09 9-10 10-13 13-18 18-22

waiting time:: finish time-arrival time-execution time

waiting time of each processor

p1 --> 9-0-9 =0

p2-->10-3--1=6

p3-->13-3-3=7

p4-->18-6-5=7

p5-->22-7-4=11

2.PREEMPTIVE PRIORITY::

process having highest priority will execure first in preemptive mode

GANT CHART:: (TIME SLOT,REMAINING TIME)

wating time=finish time-arrival time-execution time

P1 P2(finished) P1 P1 P5(finished) P1(finished) P3(finished) P4 (finished)

0-3,6 3-4,0 4-6,4 6-7,3 7-11,0 11-14,0 14-17,0 17-22,0

finish time arrival time execution time waiting time

P1 14 0 9 5

P2 4 3 1 0

P3 17 3 3 11

P4 22 6 5 11

P5 11 7 4 0

3.NON-PREEMPTIVE PRIORITY SCHEDULING::

process having highest priority will execure first in non-preemptive mode

Gantt chart:: (Time Slot)

P1 P2 P5 P3 P4

0-9 9-10 10-14 14-17 17-22

finish time arrival time execution time waiting time

P1 9 0 9 0

P2 10 3 1 6

P3 17 3 3 11

P4 22 6 5 11

P5 14 7 4 3

4.ROUND-ROBBIN:::

each process execute in given time interval given to that process.

Gantt Chart::(TIME SLOT,REMAING TIME)

P1 P2(fin) P3(fin) P1 P4 P5 P1(FIN) P4(fin) P5(FIN)

0-3,6 3-4,0 4-7,0 7-10,3 10-13,2 13-16,1 16-19,0 19-20,0 20-22,0

finish time arrival time execution time waiting time

P1 19 0 9 10

P2 4 3 1 0

P3 7 3 3 1

P4 20 6 5 9

P5 22 7 4 11

Add a comment
Know the answer?
Add Answer to:
The question is this. there is nothing given [8 What is the waiting time of each...
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
  • QUESTION 1 Consider the following set of processes, with the length of the CPU burst time...

    QUESTION 1 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. a. 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). b. What...

  • Cpu scheduling

    Consider the following set of processes, with the length of the CPU burst times given in milliseconds:a. Draw four Gantt charts illustrating the execution of the processes using FCFS, Preemptive SJF, a non-preemptive priority, and a RR (quantum=2) scheduling. (30 pts)Note: for the RR consider that the arriving time is 0 for all processesb. What is the average waiting time of each process for of the above scheduling algorithms? (10 pts)P1 8 2 0 P2 5 36P3 1 1 8...

  • Please answer the following question in C++ language Consider the following set of processes, with the...

    Please answer the following question in C++ language 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. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive...

  • 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...

  • 4. Consider a ready queue with four processes :- Process Arrival Time Burst Time (ms) P1...

    4. Consider a ready queue with four processes :- Process Arrival Time Burst Time (ms) P1 Priority P2 P3 P4 P5 For each of the following CPU scheduling algorithms, determine the turnaround and average waiting time for each of the process :- a. Shortest remaining Time First b. Shortest Job First C. Priority Scheduling (Both pre-emptive and non-preemptive) d. Round Robin (quantum is 1 ms)

  • The following processes P1, P2, P3, P4 and P5 arrive at the same time (t =...

    The following processes P1, P2, P3, P4 and P5 arrive at the same time (t = 0). Establish a timeline of the process scheduling for the following scheduling algorithms while also identifying start times for each process. FCFS (first come, first serve; assume order of P1, P2, P3, P4 and P5) SJF (shortest job first) Priority iv Round Robin (quantum = 1, assume order of P1, P2, P3, P4 and P5) Determine the average waiting time for each algorithm.

  • 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 the CPU burst given in milliseconds:

    Consider the following set of processes, with the length of the CPU burst given in milliseconds:ProcessBurst TimePriorityP1 54P231P312P472P543The processes are assumed to have arrived in the order P1 , P2 , P3 , P4 , P5 , all at time 0. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive priority (a larger priority number implies a higher priority), and RR (quantum = 2). b. What is the turnaround time of each...

  • 8. Consider the following 5 processes in the ready queue: Process Burst Priority Arrival time n...

    8. Consider the following 5 processes in the ready queue: Process Burst Priority Arrival time n w P1 P2 w N P3 P P - W WE O P4 N P5 N A O Draw Gantt charts illustrating the execution of these processes for each of the following algorithms: (a) preemptive SJF, (b) RR (with quantum = 1), (C) FCFS, and (d) preemptive priority, and calculate the respective turnaround and waiting times.

  • Given the following set of processes with corresponding execution times (in ms), arrival times and priority...

    Given the following set of processes with corresponding execution times (in ms), arrival times and priority (1 – highest).  For each scheduling algorithm: Construct a table showing which process is active and for how long until all processes are completely serviced (as done in class). Calculate the average waiting time and turnaround time. Process ID Burst (ms) Arrival time P1 9 0 P2 12 0 P3 3 0 P4 30 0 P5 20 0 P6 10 0 First Come First Serve...

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