Scheduling

Given 4 processes with burst time (in ms) and priority as below, display the Gantt chart for the various scheduling algorithms. Assume time quantum as 2 ms. Also calculate the average waiting time and average turnaround time for the scheduling algorithms.

Process

Burst time (ms)

Priority

P0

6

3

P1

3

2

P2

1

1

P3

7

4

 


 

Given 5 processes with burst time (in ms), and priority as below, display the Gantt chart and calculate the average waiting time and average turnaround time for the various scheduling algorithms. Assume time quantum as 4 ms.

Process

Burst time (ms)

Priority

P0

21

2

P1

3

1

P2

6

4

P3

2

5

P4

10

3

 


 

Given 4 processes with burst time, priority and arrival time (in ms) as below, display the Gantt chart for the various scheduling algorithms. Assume time quantum as 2 ms. Also calculate the average waiting time and average turnaround time for the scheduling algorithms.

Process

Burst time (ms)

Arrival time (ms)

Priority

P0

5

0

2

P1

3

1

1

P2

8

2

2

P3

6

3

3

 


 

Given 5 processes with burst time, priority and arrival time (in ms) as below, display the Gantt chart for the various scheduling algorithms. Assume time quantum as 3 ms. Also calculate the average waiting time and average turnaround time for the scheduling algorithms.

Process

Burst time (ms)

Arrival time (ms)

Priority

P0

21

0

2

P1

3

1

1

P2

6

2

4

P3

2

3

5

P4

10

4

3

 


 

Given 5 processes with burst time, priority and arrival time (in ms) as below, display the Gantt chart and the average waiting time and average turnaround time for the various scheduling algorithms. Assume time quantum as 20 ms.

Process

Burst time (ms)

Arrival time (ms)

Priority

P0

80

0

2

P1

20

10

1

P2

10

20

3

P3

20

30

5

P4

50

40

4

 


 

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

Process

P1

P2

P3

P4

P5

Arrival time

0

2

3

6

30

Burst time

10

12

14

16

5

  • Draw a Gantt chart that illustrates the execution of these processes using the FCFS, preemptive SJF and RR algorithm. Hence find the average waiting time.
  • Draw a Gantt chart that illustrate the execution of these processes using preemptive priority scheduling algorithm. Given the priority of each process is P1=4, P2=3, P3=5, P4=1 And P5=1. Also find the average waiting time.

 


 

What is the average turnaround time for the following processes using
  • FCFS
  • SJF non-preemptive
  • Preemptive SJF

Process

Arrival Time

Burst Time

P0

0.0

8

P1

0.4

4

P2

1.0

1

 


 

Given 4 processes with burst time and arrival time (in ms) as below, display the Gantt chart and the average waiting time and average turnaround time for the various scheduling algorithms. Assume time quantum as 3 ms.

Process

Burst time (ms)

Arrival time (ms)

P0

1

0

P1

9

1

P2

4

2

P3

5

3

 


 

Consider the following set of processes with the length of the CPU burst time given in milliseconds. Calculate the average waiting time and average turnaround time for FCFS, SJF and Round Robin (quantum = 2 ms) scheduling policies. Draw the Gantt chart showing the scheduling.

Process

Burst time (ms)

Arrival time (ms)

P0

3

0

P1

6

2

P2

4

4

P3

5

6

P4

2

8

 


 

Consider the following process, with the CPU burst time given in milliseconds

Process

Burst time (ms)

Priority

P1

10

3

P2

1

1

P3

2

3

P4

1

4

P5

5

2

  • Process arrive in P1, P2, P3, P4, P5 order at time 0.
  • Draw Gantt charts to show execution using FIFO, SJF, non–preemptive priority and Round Robin (quantum = 1) scheduling
  • Also calculate waiting time and turnaround time for each scheduling algorithms.

 


 

Consider the following process, with the CPU burst time given in milliseconds

Process

Burst time (ms)

P1

10

P2

29

P3

3

P4

7

P5

12

Consider the FCFS, Nonpreemptive SJF, Round Robin (quantum = 10ms) scheduling algorithms. Illustrate the scheduling using Gantt chart. Which algorithm will give the minimum average waiting time? Discuss.

 


 

Assume the following workload in a system. All jobs arrive at time 0 in the order given

Process

Burst time (ms)

Priority

P0

8

2

P1

4

1

P2

5

4

P3

2

2

P4

1

3

  • Draw a Gantt chart illustrating the execution of these job using FCFS, RR (quantum = 4), non-preemptive priority and SJF CPU scheduling.
  • Calculate the average waiting time and average turnaround time for each of the above scheduling algorithm.

 


 

Suppose the following jobs arrive for processing at the times indicated and each job will run the listed amount of time

Process

Burst time (ms)

Arrival time (ms)

Priority

P0

14

0

3

P1

3

4

1

P2

5

5

3

P3

6

7

4

P4

2

14

2

Give Gantt chart illustrating the execution of these jobs using the FCFS, preemptive and non-preemptive SJF, Priority and Round Robin scheduling algorithms. Assume a time quantum of 2 ms. compute the average turnaround time and waiting time for all scheduling algorithms.

 


 

Assume the following processes arrive for execution at the time indicated and also mention with the length of the CPU-burst time given in milliseconds.

Job

Burst time (ms)

Priority

Arrival time (ms)

P0

10

5

0

P1

6

2

0

P2

7

4

1

P3

4

1

1

P4

5

3

2

  • Give the Gantt chart illustrating the execution of these processes using FCFS, Round Robin (quantum = 5) and priority scheduling.
  • Calculate the average waiting time and average turnaround time for each of the above scheduling algorithm.

 


 

Consider the following set of processes, with the length of the CPU-burst time and the arrival time given in milliseconds:

Process

Arrival time

Burst time

P1

0.0

4

P2

0.5

5

P3

1.0

2

  • Draw Gantt chart illustrating the execution of these processes using FCFS and preemptive SJF scheduling algorithms.
  • Calculate the average waiting time and average turnaround time for each of the above scheduling algorithm.

 


 

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

Process

Burst time (ms)

P1

10

P2

1

P3

2

P4

5

  • Draw Gantt chart illustrating the execution of these processes using FCFS, SJF and Round robin (quantum=1ms) scheduling algorithms.
  • Calculate the waiting time and turnaround time for each process using the above techniques.
  • Calculate the average waiting time and average turnaround time for each of the above scheduling algorithm.

 


 

Explain the FCFS, preemptive and non-preemptive versions of SJF and Round robin (time slice = 2) scheduling algorithms with Gantt chart for the four processes given. Compare their average turnaround and waiting time.

Process

Arrival time (ms)

Burst time (ms)

P0

0

10

P1

1

6

P2

2

12

P3

3

15

 


 

Assume the following process arrive for execution at the time indicated with the length of the CPU burst time given in ms

Process

Burst time (ms)

Arrival time (ms)

P0

8

0

P1

6

0

P2

5

0

P3

4

1

P4

3

2

  • Give the Gantt chart illustrating the execution of these processes using FCFS, SJF (preemptive and non-preemptive) and Round robin (quantum = 6 ms) scheduling algorithms
  • Calculate the average waiting time and average turnaround time for each of the above scheduling algorithm.

 


 

Processes P1, P2, P3, P4 and P5 with CPU burst time (ms) given below arrives in the order P1, P2, P3, P4, P5 at time 0, 2, 3, 4, 4.

Process

Burst time (ms)

Priority

P1

4

2

P2

5

1

P3

3

3

P4

6

4

P5

3

5

Draw Gantt chart illustrating the execution of processes using FCFS, SJF, STRF and RR scheduling. Also calculate the waiting time and turnaround time for each of the scheduling algorithm.