Question

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:

  1. Construct a table showing which process is active and for how long until all processes are completely serviced (as done in class).
  2. 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

  1. First Come First Serve (FCFS)
  2. Shortest-job first (SJF non pre-emptive)

Process ID

Burst (ms)

Arrival time

Priority

P1

9

0

2

P2

12

5

1

P3

3

9

1

P4

30

25

2

P5

20

25

2

P6

2

45

1

  1. Shortest-job first (SJF non pre-emptive)
  2. Shortest-remaining time next (SJF pre-emptive)
  3. Round-robin (RR with 3 ms quantum)

6.Priority-based scheduling (with shortest job first)

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

1. FCFS P1 P2 P3 P4 P5 P6 21 24 74 174 Average turnaround time = ((9-0)-(21-1)-(24-2)+(54-3)-(74-4)-(174-5))/5 = (9-19-22+51+

P1 P2 P3 P4 P5 P6 P1 P2 P4 P5 P6 P1 P2 P4 P5 P6 P2 P4 P5 P6 P4 P5 P6

P4 P5 P6 P4 P6P4 P6 P4 P6 P6 P6 P6 P6 P6 P6 P6 P6 P6 P6P6 P6 P6

P6 P6 |P6 P6 P6 P6P6 P6 P6 P6 P6 P6 P6 P6

Average turnaround time (36-0) (51-1)+(9-2) (101-3)+(83-4) (174-5)/5 (36+50+7+98+79-169)/5 87.8 ms Average waiting time (33-0

--------------------------------------
We are allowed to answer 4 sub parts only. Please post accordingly.

Add a comment
Know the answer?
Add Answer to:
Given the following set of processes with corresponding execution times (in ms), arrival times and priority...
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
  • 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)

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

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

  • (d) Pre-emptive priority scheduling [4 marks]: Consider the following set of processes, with the length of...

    (d) Pre-emptive priority scheduling [4 marks]: Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process Burst Priority Arrival Time P1 8 3 0 P2 3 4 1 P3 6 2 3 P4 3 1 5 P5 1 5 7 P6 3 8 14 P7 8 5 18 (d-1) Draw Gantt chart illustrating the execution of these processes using pre-emptive priority (a smaller priority number implies a higher priority) [2 marks] 00   01  ...

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

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

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

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

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

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

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