August 1999
SW204 : SOFTWARE AND
FILE DESIGN

QUESTION 1 (Compulsory)

Total Marks: 20 Marks

Click here to access other questions

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

(a) How might an operating system detect that deadlock has occurred? [1]
Several processes are interlocked.

 

(b) Define the term fixed-partition multi-programming. [2]
Fixed partition multi-programming is concerned with the contiguous allocation of memory in regions where size cannot be varied.

 

(c) (i) Give one similarity between compilers and interpreters.

(ii) Give one difference between compilers and interpreters.

[1]

[1]

(i) They both translate source code into equivalent object programs.

(ii) A compiler translates the source program as a whole, whereas a translater translates the source program statement by statement.

 

(d) Name two types of loader. [2]
  • Bootstrap.
  • Compile-and-go.
  • Relocate.
  • Absolute.

 

(e) Name two virtual memory implementation techniques. [2]
  • Overlay.
  • Paging.
  • Segmentation.

 

(f) What are the two categories of randomizing algorithms? [2]
Direct and indirect algorithms.

 

(g) Define the term real-time processing. [1]
Real-time processing involves processing data items the moment they are received.

 

(h) Define the term expert system. [1]
An expert system is an application which emulates the reasoning power of a human expert in a particular domain.

 

(i) List two indexing techniques. [2]
  • Base or full index.
  • Partial or limit index.

 

(j) Perform a lexical analysis on the following piece of code:

Start of code
010     *The purpose of this module is to calculate recurrent chargers.
020     *Check on Display Index
030               IF Display-Index = 'Y'
040                            Display 'Calculate Recurrent Charges'
050                 End-if.
060     *Compute Total Recurrent Charges
070                 Compute WS-Total (WS-Array)=
080                             Charge (001) +
090    *Charge (001) = Domestic Charge
100                            Charge (002) +
110    *Charge (002) = Refuse Charge
120                            Charge (003) +
130    *Charge (003) = Sanitary Appl Fee
End of code

 

[5]
030IfDisplay-Index='Y'\040Display'CalculateRecurrentCharges'\
050End-if\070ComputerWs-Total(WS-Array)=\080Charge(001)+\
100Charge(002)+\120Charge(003)