ICS 2102 - Operating Systems Concepts - November 2019
ICS 2102 - Operating Systems Concepts - November 2019
Instructions
1. This examination consists of FIVE questions.
2. Answer Question ONE (COMPULSORY) and any other TWO questions.
c) Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds. The processes are assumed to have arrived in the order P1, P2, P3, P4, P5,
all at time 0.
Page 1 of 3
i. Draw four Gantt charts illustrating the execution of these processes using FCFS,
SJF, a non pre-emptive priority (a smaller priority number implies a higher
priority), and RR (quantum = 2) scheduling. (8mks)
ii. What is the turnaround time of each process for each of the scheduling algorithms
in part i above? (5mks)
(Hint: Answer by filling the table below)
FSCS RR SJF PRIORITY
P1
P2
P3
P4
P5
iii. What is the waiting time of each process for each of the scheduling algorithms in
part i above? (5mks)
(Hint: Answer by filling the table below)
FSCS RR SJF PRIORITY
P1
P2
P3
P4
P5
b) Consider a multiprocessor system and a multithreaded program written using the many-
to-many threading model. Let the number of user-level threads in the program be more
than the number of processors in the system. Discuss the performance implications of the
following scenarios. (6mks)
i. The number of kernel threads allocated to the program is less than the number of
processors.
ii. The number of kernel threads allocated to the program is equal to the number of
processors.
iii. The number of kernel threads allocated to the program is greater than the number
of processors but less than the number of user level threads.
c) Using a diagram with two processes (Process A and Process B), illustrate the difference
between the two main communication models for processes (5mks)
Page 2 of 3
Question Four (15 marks)
a) Explain the difference between internal and external fragmentation. (2mks)
b) What are two advantages and one disadvantage of multiprocessor systems? (3mks)
c) List and explain five services provided by an operating system that are designed to make
it more convenient for users to use the computer system. the services. (10mks)
b) Explain the differences in the degree to which the following scheduling algorithms
discriminate in favour of short processes: (3mks)
• FCFS (First Come First Serve)
• RR (Round Robin)
• Multilevel feedback queues
c) Using a sequence diagram to illustrate, describe the actions taken by a kernel to context -
switch between processes. Illustrate the executing phases and the idle phases of the
processes. Assume you are working with two processes (P0 and P1 ) (8mks)
Page 3 of 3