ICS 2202 - Operating systems concepts - December 2023
ICS 2202 - Operating systems concepts - December 2023
Instructions
1. This examination consists of FIVE questions.
2. Answer Question ONE (COMPULSORY) and any other TWO questions.
Question 1 (30 Marks)
i. Under what circumstances would a user be better off using a time-sharing system, rather
than a personal computer or single-user workstation? (2 Marks)
ii. Describe the differences between symmetric and asymmetric multiprocessing. What are
three advantages and one disadvantage of multiprocessor systems? (4 Marks)
iii. When are caches useful? What problems do they solve? What problems do they cause? If
a cache can be made as large as the device for which it is caching (for instance, a cache as
large as a disk), why not make it that large and eliminate the device? (4 Marks)
iv. How can we prevent users from accessing other users’ programs and data? (2 Marks)
v. What are the five major activities of an operating system in regard to process management?
(5 Marks)
vi. Describe the differences among short-term, medium-term, and long-term scheduling.
(6 Marks)
vii. What two advantages do threads have over multiple processes? What major disadvantage
do they have? Suggest one application that would benefit from the use of threads, and one
that would not. (4 Marks)
viii. Explain the differences in the degree to which the following scheduling algorithms
discriminate in favor of short processes: (3 Marks)
a. FCFS
b. RR
c. Multilevel feedback queues
Question 2 (15 Marks)
i) Consider the following preemptive priority-scheduling algorithm based on dynamically
changing priorities. Larger priority numbers imply higher priority. When a process is
waiting for the CPU (in the ready queue, but not running), its priority changes at a rate
α; when it is running, its priority changes at a rate β. All processes are given a priority
of 0 when they enter the ready queue. The parameters α and β can be set to give many
different scheduling algorithms.
a. Determine the algorithm that results from β > α>0? (4 Marks)
b. Determine the algorithm that results from α < β <0? (4 Marks)
ii) Consider three process, all arriving at time zero, with total execution time of 10, 20
and 30 units respectively. Each process spends the first 20% of execution time doing
I/O, the next 70% of time doing computation, and the last 10% of time doing I/O again.
The operating system uses a shortest remaining compute time first scheduling
algorithm and schedules a new process either when the running process gets blocked
on I/O or when the running process finishes its compute burst. Assume that all I/O
operations can be overlapped as much as possible. For what percentage does the CPU
remain idle? (7 Marks)
ii) Consider a paging system with the page table stored in memory.
a. If a memory reference takes 200 nanoseconds, how long does a paged memory reference
take? (2 Marks)
b. If we add associative registers, and 75 percent of all page-table references are found in
the associative registers, what is the effective memory reference time? (Assume that
finding a page-table entry in the associative registers takes zero time, if the entry is there.)
(3 Marks)
a) Determine the contents of the Need Matrix of the Bankers Snapshot above (3 Marks)
b) Comment whether the state of the snapshot is safe or unsafe. If you answer yes, give a
sequence of process ids that leads to all processes completed. If you answer no, give a
sequence of activities that results in a deadlocked state. (6 Marks)