UNIVERSITY EXAMINATION 2020/2021
YEAR 2/3 SEMESTER II EXAMINATION FOR THE DEGREE OF BACHELOR
OF SCIENCE IN COMPUTER SCIENCE
SPC 2201: OPERATING SYSTEMS I
DATE: Friday, 26th May, 2021 TIME: 11.00 am – 1.00 pm
INSTRUCTIONS: Answer Question ONE and any other TWO Questions
Question One (30mks)
a) Consider a timesharing Operating system processing batch jobs. Explain
why or why not busy waiting may be appropriate in handling possible
race conditions. [5 marks]
b) Consider a printing job being sent to a printer in a timesharing operating system.
Provide a five state process model (specific to the printing job) [7 marks]
c) Assume that a friend of yours has offered their hard disk (installed with an
Operating system) to you to use in your computer as a master disk. Explain
the likely behavior of your computer when switched on. [3 marks]
d) The government of Kenya is rolling out a free-laptop program for all standard
one pupils in all public primary schools. Assuming that the laptops will be
used within networks set up across all public schools in the country and that
the laptops have sufficiently fast CPU and memory. Also assume that you
are part of a group of studentswho have been asked to provide insight (ideas)
that can help in designing a newOperating system to be rolled out for use in
these laptops.
i. Suggest, with reasons, which architecture can be the most suitable under
these circumstances [2 marks]
ii. State, with reasons, three overhead issues that can arise in the design of
this Operating System [3 marks]
e) In a batch system, there are five jobs A through E with runs 2, 4, 1,1,1
seconds respectively. Their arrival times are 0, 0, 3,3,3 respectively. What
is the turnaround time using the shortest job first scheduling algorithm?
Page 1 of 3
Is this the optimal turn around time among the non preemptive runs [5 marks]
f) Consider the Dining Philosophers problem within philosophers but
with n + l forks. The extra fork is in the middle of the table and can be
used by any philosopher — one at a time. Is deadlock possible? Explain
your answer. [3 marks]
g) Describe a race condition [2 marks]
QUESTION TWO
a) Explain what hard and symbolic links are (4 marks]
b) Describe the producer consumer problem [3 marks]
c) Assume a scheduling policy that requires that an unblocked process
should get the CPU next; still when a process blocks it is put in the
ready state instead of the running state directly. Describe a scheduling
algorithm that achieves this goal. [6 marks]
d) Assume that a process is in a critical section guarded by a mutex
when it creates a fatal error that causes the process to be killed.
Explain how this could affect other processes. Suggest how the
Operating System can eliminate this problem. [7 marks]
QUESTION THREE [20 MARKS]
a) Describe the following scheduling algorithms [9
marks]
i. Non Pre-Emptive, First Come, First Serve
ii. Round Robin
iii. Shortest Job First
b) Given the following processes and burst times
Page 2 of 3
Calculate the average turn around time when each of the above scheduling
algorithms is used? Assume that a quantum of 8 is being used. [11 marks]
QUESTION FOUR[20 MARKS]
a) Describe the benefits of a mono-programming operating system [4 marks]
b) When a file is removed, the blocks it occupies are simply placed back onto
the free list. Can you see any problems with this? If so, how would you
overcome them and what problems, if any, would now exist and how
would you resolve these? [5 marks]
c) What information is used by the Least Recently Used page replacement policy,
and how does this compare to the information used by the various Clock
algorithms? [4 marks]
d) Explain why, or why not, internal fragmentation can be a problem when
using the best fit algorithm for memory allocation. [5 marks]
e) One of the options in a mainframe OS is to limit the number of jobs (processes)
currently in the system. What are some of the benefits of this capability? [2 marks]
QUESTION FIVE: (20 MARKS)
(a) Explain how an RPC operates. (6 marks)
(b) Compare and contrast the Write-through and Delayed-write Cache
Update Policies (4 marks)
(c) Compare and contrast the Centralized Approach and the Fully Distributed
approaches of dealing with mutual exclusion (10 marks)
Page 3 of 3