August 1997
SW204: SOFTWARE AND FILES DESIGN

QUESTION 2

Total Marks: 20 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to Question 2

2. (a) Describe the technique of spooling output to a printer. [4]
Four marks are available for a good description. One mark should be awarded for using the term 'spooling directory;; a further mark should be awarded for an acceptable elaboration. One mark should also be awarded for mentioning the term 'daemon service'; again, a further mark should be awarded for an acceptable elaboration.
(b) Discuss two benefits of spooling in a multiprogramming environment. [4]
One mark should be awarded for each correct benefit named and a further mark should be awarded for an acceptable elaboration (up to a maximum of four marks). Examples of benefits include the following:
better CPU utilization
better system performance.
the printer is made sharable.
(c) With the aid of an example, show how deadlock can occur when two processes are competing for resources. [4]
Two marks should be awarded for an example which illustrates deadlock; if the example does not include a deadlock, then no marks should be awarded. If no example is given, then no marks should be awarded for this part of the answer.
Two marks should be awarded for an explanation of how deadlock occurs only a further mark should be awarded if a definition of deadlock is given, instead of an explanation of how it occurs. A diagram would be acceptable here (or a graph).
(d) Using your example from Part (c), name and describe a suitable method for [8]
(i) deadlock avoidance
Banker's algorithm. One mark should be awarded for using the term; one mark should be awarded for demonstrating understanding of the technique; two marks should be awarded for successfully applying the technique to the example. If no example has been presented, then only two marks can be awarded here.
(ii) deadlock detection and recovery
Recovery through pre-emption / recovery through rollback / recovery through killing processes. One mark should be awarded for using any of these terms; one mark should be awarded for demonstrating understanding of the named technique; two marks should be awarded for successfully applying the technique to the example. If no example has been presented, then only two marks can be awarded here.
In each case, show how the method could be applied to your example.