December 1998
SW204: SOFTWARE AND FILES DESIGN

QUESTION 2

Total Marks: 20 Marks

Click here to access other questions

Click to access
SUGGESTED SOLUTIONS
for Question 2

2. (a) With the aid of an example, describe how deadlock can occur when two processes are competing for resources.

 

[4]

(b) Name two strategies which may be employed in handling deadlock.

 

[2]
(c) Distinguish between the terms job scheduler and CPU scheduler.

 

[2]

(d) Suppose, in a multiprogramming environment, a processor is assigned the following jobs for execution.

Job

Arrival Time

CPU Time

Priority

1

0

2

4

2

1

4

2

3

2

6

3

4

3

8

1

Priority is highest for 1 and lowest for 4.

Draw a Gantt Chart to illustrate the execution of these jobs using the following scheduling algorithms.

[6]
(i) First come first served.
(ii) Round robin, with a time quantum of 2.
(iii) Priority scheduling.

 

(e) For each of the algorithms mentioned in part (b), compute the average waiting time.

 

[6]