Scheduling Problems 2019 20

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

PROCESS SCHEDULING PROBLEMS

1. Consider the given set of processes with CPU Burst time(in ms). Draw the GANTT chart.
PROCESS ARRIVAL TIME BURST TIME
P1 0 6
P2 1 3
P3 2 1
P4 3 4

Compute the waiting time and average turnaround time for the above processes. Using
FCFS,SJF,SRTF,ROUND ROBIN(time quantum=2ms) scheduling algorithms.

2. Consider the given set of processes with CPU Burst time (in ms).Draw the GANTT chart.

PROCESS ARRIVAL TIME BURST TIME


P1 0 9
P2 1 4
P3 2 9
P4 3 5

Compute the waiting time and average turnaround time for the above processes Using
FCFS,SJF,SRTF,ROUND ROBIN(time quantum=2ms) scheduling algorithms.

3. For the processes listed below draw the GANTT chart using preemptive and non preemptive
priority scheduling algorithms. A larger priority number has highest priority.
JOBS ARRIVAL TIME BURST TIME PRIORITY
J1 0 6 4
J2 3 5 2
J3 3 3 6
J4 5 5 3

Compute the waiting time and average turn around time.

4. For the following processes draw GANTT chart using Round Robin scheduling algorithm and
calculate i)waiting time and turnaround time for each process ii)average waiting time and turn
around time

PROCESS ARRIVAL TIME BURST TIME


P1 0 3
P2 1 6
P3 2 2
P4 3 2
P5 4 5
P6 5 5

5. Consider the following processes with 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

All processes are assumed to have arrived at time 0 in the order P1, P2, P3, P4, P5.
i) Draw Gantt charts to illustrate the execution of these processes using FCFS, SJF, non-
preemptive priority(smaller number = higher priority) and RR algorithms(TQ = 1)
ii) What is turnaround time and waiting time for each process for the above algorithms?
iii) What is the minimum average waiting time?
iv) Which algorithm results in minimum average waiting time?
6. Consider the following set of processes

Process Arrival time Burst time Priority

P1 0 10 4

P2 3 5 2

P3 3 6 6

P4 5 4 3

Consider larger number as higher priority. Calculate the average waiting time and average
turnaround time using preemptive priority scheduling and preemptive SJF scheduling
algorithms.

You might also like