UNIVERSITY EXAMINATIONS: 2017/2018
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY
BIT 1106A OPERATING SYSTEMS
DISTANCE LEARNING
DATE: DECEMBER, 2017 TIME: 2 HOURS
INSTRUCTIONS: Answer Question One & ANY OTHER TWO questions.
QUESTION ONE
a) Briefly explain the FIVE main functions of an operating system (5 Marks)
b) Explain how an operating system is interrupt driven (4 Marks)
c) Explain how the two different modes of operations namely, monitor mode and user mode
help in the protection of resources (4 Marks)
d) Define starvation and also explain how it can be avoided (5 Marks)
e) Consider the following processes with given CPU burst times in milliseconds
Process Arrival time burst time
P1 0 4
P2 0 10
P3 2 8
P4 6 4
P5 8 6
Compute average turnaround time for the following CPU scheduling algorithms and state
which amongst them shows the best performance based on the same criterion
i) FCFS
ii) Round robin
iii) Shortest Job first (12 Marks)
QUESTION TWO
a) Define the following terminologies
i) Critical section
ii) Preemptive scheduling (2 Marks)
b) Explain how the UP and DOWN operation on a semaphore ensure mutual exclusion
(6 Marks)
c) Explain with the help of diagrams the difference between multiprogramming with fixed
partitions to multiprogramming with variable partitions (6 Marks)
d) List the THREE memory allocation algorithms (6 Marks)
QUESTION THREE
a) Define deadlocks. Enumerate the necessary conditions for deadlocks to hold
(6 Marks)
b) Differentiate between deadlock prevention and deadlock avoidance (4 Marks)
c) Define semaphores. Explain how it ensures that no two processes can access the critical
section at the same time (4 Marks)
d) Explain the various states of a process (6 Marks)
QUESTION FOUR
a) Write an algorithm to sort out the producer consumer problem (10 Marks)
b) What is swapping and virtual memory (4 Marks)
c) Explain the difference between
i) Internal and external fragmentation
ii) Logical and physical address space
iii) Segmentation and paging (6 Marks)
QUESTION FIVE
a) Given memory partition of 100 kB, 500kB, 200kB, 300kB, and 600 kB (in order),
how would each of the First-fit, Best-fit, and Worst-fit algorithms place processes of
212kB, 417kB, 112kB,and 426kB (in order (9 Marks)
b) Explain any THREE OS services. (3 Marks)
c) Each process is represented in the operating system by a process control block (PCB).
The PCB contains many pieces of information associated with a specific process. List
and describe four pieces of information that can be found in a PCB.
(8 Marks)