Mar2024 Quiz Q
Mar2024 Quiz Q
QUIZ
INSTRUCTIONS TO CANDIDATES:
STUDENT DETAILS:
MATRIC NO GROUP
FULL NAME
LECTURER
MARKS
TOTAL / 35
QUESTION 1 (8 MARKS)
a) State the TWO (2) edges to show directions in the resource-allocation graph.
(2 marks)
ANSWER:
b) Consider the following system snapshot using data structures in the Banker’s algorithm,
with resources of A, B, C and D and processes P1 to P3. With the given Available
resources are <1, 1, 2, 1>.
PROCESS/ MAX ALLOCATION
RESOURCES
A B C D A B C D
P1 2 0 1 0 1 0 0 0
P2 2 1 1 2 1 0 0 1
P3 1 0 0 0 0 0 0 0
ANSWER:
ii) Show whether the system above is in a safe or unsafe state. Provide the safe sequence
if any.
(4 marks)
ANSWER:
3
ANSWER:
c) The definition of “shuffle memory contents to place all free memory together in one large
block” is best describe the technique of __________.
(1 mark)
ANSWER:
1 2 3 3 4 5 6 2 3
Using the Least Recently Used (LRU) algorithm, trace the number of page faults if the
allocated memory is 3 frames. Show your work.
(4 marks)
4
ANSWER:
QUESTION 3 (7 MARKS)
a) Each operating system has its own I/O subsystem to manage the device operations. Briefly
explain one of the management tasks which executes in I/O subsystem.
(2 marks)
ANSWER:
b) Explain one example of event that triggering as an interrupt which happens to enable
utilization of resources in operating system.
(2 marks)
ANSWER:
QUESTION 4 (8 MARKS)
ANSWER:
b) List TWO (2) operations that can be performed on a file in a file system.
(1 mark)
ANSWER:
Aurora = 0 0 0 1 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1
ii)
Consider a file named Neuron that was created using an Index allocation method
with the size of 5 blocks. Show the secondary storage with the occupied blocks.
(3 marks)
ANSWER:
iii) Count the available blocks after the Neuron file has been allocated. If a file named
Stardust requires 4 blocks using the contiguous method, can the available spaces
allocate it? Justify your answer.
(1 mark)
ANSWER: