CSC223 2012-2013
CSC223 2012-2013
[2Marks]
c) Describe the roles of the runtime system in the implementation of user level threads.
[3Marks]
d) A process can be in different states. What are the blocked suspend and ready suspend
states? What reason would cause a process to transition to either of the two states?
[2Marks]
e) How does a process control block differ from a process table? [2Marks]
f) Suppose you were given the task of designing a system that uses threads. [3Marks]
a) Which method is more suitable between dynamic or static creation of threads?
b) Give a reason for your answer.
c) What is the disadvantage of the alternative?
g) What is the essential difference between block and character oriented devices?
[1Mark]
h) Explain how separation of policy and mechanism can lead to design of efficient systems
when it comes to scheduling tasks. [2Marks]
i) Describe the difference between the base and limit registers and the swapping methods of
managing memory. [2Marks]
SECTION B
Question 2 (15 Marks)
a) State four goals of an operating system [2Marks]
b) Five batch jobs A through E, arrive at a computer center at almost the same time. They
have estimated running times of 10, 6, 2, 4, and 8 minutes. Their (externally
determined) priorities are 3, 5, 2, 1, and 4, respectively, with 5 being the highest
priority. For each of the following scheduling algorithms, determine the mean process
turnaround time. Ignore process switching overhead. [8Marks]
i) Round robin (Time quantum = 1).
ii) Priority scheduling.
iii) First-come, first-served (run in order 10, 6, 2, 4, 8).
iv) Shortest job first
c) Disable interrupts mechanism is not useful in some system architectures. Which
architectures are these and why is this the case? [2Marks]
d) What do you understand by the term ‘principle of locality’? [1Mark]
e) Explain two methods that can be used by systems to recover from a deadlock [2Marks]
a) Discuss the implementation of four mutual exclusion techniques and give a disadvantage
for each [8Marks]
b) There are two methods which the CPU can use to communicate with control registers and
device data buffers associated with I/O devices. [4Marks]
i) Use diagrams to differentiate between the two alternatives.
ii) Which of the two is a better alternative and why?
c) Why is setting the quantum in round robin algorithm a critical issue in determining the
turnaround time of processes? [1Mark]
d) Explain two conditions for a deadlock and how each can be attacked in deadlock
prevention [2Marks]