University of Central Punjab
(Incorporated by Ordinance No. XXIV of 2002 promulgated by Government of the Punjab)
Faculty of Information Technology & Computer Science
Mid-term Theory Exam, S23 NAME__________________ REG#__________________
Operating Systems
Time allowed: 90 Minutes.
_____________________________________________________________________________
Instructions
• All questions are mandatory.
• While we have made every effort to ensure the accuracy of this question paper, if you
do find any errors, please make a sensible prediction and attempt to solve the
question to the best of your ability.
• Understanding the problem is part of the problem.
• Solve Question#3 on the question paper and rest of the questions on the answer
booklet.
• Correction, cutting, or overwriting in Question#3 is not allowed. If you do so, that
part of the question will not be counted.
_____________________________________________________________________________________
Question#1 (10 points)
Draw Gantt chart and calculate average wait time of the given processes using preemptive
Priority scheduling policy. Lower numbers represent higher priority. (Note: Calculations
must corelate with the Gantt chart.)
Arrival CPU Priority
Processes Time Burst
P0 0 6 4
P1 1 5 3
P2 2 3 2
P3 3 1 1
P4 4 2 0
Question#2 (4+5 points)
Shared memory and Anonymous PIPES are two basic IPC kernel constructs we have
studied so far. (Your answer should be concise)
a) Write two pros and cons of each of them.
b) Discuss the scenario(s) where one is preferred over another.
Page 1 of 2
University of Central Punjab
(Incorporated by Ordinance No. XXIV of 2002 promulgated by Government of the Punjab)
Faculty of Information Technology & Computer Science
Mid-term Theory Exam, S23 NAME__________________ REG#__________________
Operating Systems
Time allowed: 90 Minutes.
Question#3
Negative marking applies to this question. This question must be solved on question paper.
(10+6+15 points)
a) Write ‘True (T)” or “False (F)” against each statement in respective column.
S# Statements Microkernel Monolithic
kernel
1 Minimal kernel functionality
2 Most services run as user-level processes
3 Difficult to add new services or update
existing ones
4 Communication between kernel and
user-level processes via message passing
5 High degree of modularity and flexibility
b) Write ‘True (T)” or “False (F)” against each statement in respective column.
S# Statements Program Process
1 An entity that represents code stored on disk.
2 An entity that is currently running can have an
associated state.
3 Have Stack segment and heap
c) Write ‘True (T)” or “False (F)” against each statement in respective column.
S# Statements Multi- Multi- Multi-processing
programming tasking
1 Allows multiple programs to run on a
single CPU by switching between them.
2 Enables multiple tasks to run on a single
CPU concurrently by dividing CPU time
between them.
3 Requires multiple programs to reside in
memory
4 Involves the use of multiple CPUs
working together to perform tasks.
5 Can improve system performance by
increasing CPU utilization.
Page 2 of 2