CS604 Operating Systems Assignment No 4 Solution Fall 2012

Question 1

Let us consider a table given below.

Process Arrival Time Burst Time

————————————————————–

A 1.0 9

B 1.4 5

C 2.0 2

Above table shows different processes arriving in the sequence listed in the table.

a) Let us consider that CPU remains idle for first 2 unit of time. Draw the Gantt chart and calculate the average turnaround time for above processes in this situation by using non preemptive Shortest Job First (SJF)scheduling strategy. [Marks 3]

b) Let us consider that CPU remains idle for first 1.5 unit of time. Draw the Gantt chart and calculate the average waiting time for above processes in this situation by using non preemptive Shortest Job First(SJF)scheduling strategy. [Marks 5]

c) Let us consider that CPU remains idle for first 1 unit of time and let us consider that a fourth process ‘D’ enters the system at time 3 and needs 1 unit of CPU time. Draw the Gantt chart and Calculate the average waiting time for four processes A, B, C and D in this situation by using preemptive SJF i.e. Shortest Remaining time scheduling strategy. [Marks 6]

d) Let us consider that CPU remains idle for first 3 unit of time. In this situation, draw the Gantt chart and calculate the average waiting time for a round robin algorithm with q (time quantum) set at 2. Ignore the effect of context switching time.Marks 6]





The Averagme time answers are below.
a. 8.8667
b.8.3667
c.3
d.7.9

DOWNLOAD SOLUTION HERE
loading...