OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2023


OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2023



1 Page 1

▲back to top


n Am I BIA un IVE RSITY
OF SCIEnCE Ano TECHnOLOGY
Faculty of Computing and Informatics
Department of Computer Science
QUALIFICATION : Bachelor of Computer Science
Bachelor of Computer Science in Cyber Security
Bachelor of Informatics
QUALIFICATION CODE: 07BCMS / 07BCCY/ 07BAIT
LEVEL: 6
COURSE: Operating Systems
COURSE CODE: OPS611S
DATE: June 2023
PAPER: THEORY
DURATION: 3 hours
MARKS: 80
FIRST OPPORTUNITY EXAMINATION QUESTION PAPER
EXAMINER{S)
Ms. Teresia Ankome, Ms. Deada Kandjii and Mr. Ericky lipumbu
MODERATOR:
Ms. Loini liyambo
THIS QUESTION PAPER CONSISTS OF 6 PAGES
(Excluding this front page)
INSTRUCTIONS
1. Answer ALL the questions.
2. Write clearly and neatly.
3. Number the answers clearly.
4. When answering questions, you should be guided by the allocation
of marks. Do not give too few or too many facts in your answers.
PERMISSIBLE MATERIALS
1. Non-programmable calculator

2 Page 2

▲back to top


Section A [10 marks]
Choose the correct answer from the multiple choice questions below.
[10]
1.1 The Job Scheduler seeks to __ when scheduling jobs.
a) Run all CPU intensive jobs first
b) Run all 1/0 intense jobs first
c) Balance the CPU and 1/0 intensive jobs
d) Run the quickest jobs first
1.2 __ allows for faster turnaround of CPU-bound jobs
a) Movements between queues
b) Variance time quantum per queue
c) No movement between queues
d) Aging
1.3 Fill in the missing event that causes deadlock in a database. There are two processes
{Pl and P2}, each of which needs to update two records {Rl and R2) and the following
sequence leads to a deadlock:
1. Pl accesses Rl and locks it.
2. P2 accesses R2 and locks it.
3.
4. P2 requests Rl, which is locked by Pl.
a) P2 releases R2
b) Pl requests Rl again
c) Pl requests R2, which is locked by P2
d) P2 releases Rl
1.4 The Banker's Algorithm is an example of a(n) __ policy
a) Avoidance
b) Recovery
c) Detection
d) Mutual exclusion
1.5 In the "dining philosophers" problem, a philosopher can pick up a fork when __ .
a) it is his/her turn, going in numerical order from one philosopher to the next
b) No other philosopher is eating
c) There is one available
d) There are two available
1

3 Page 3

▲back to top


1.6 Interval between the time of submission and completion of the job is called:
a) Waiting time
b) Turnaround time
c) Throughput
d) Response time.
1.7 In------------- several programs are kept in main memory at the same time.
a) Multiprocessor
b) On- line operation
c) Buffering
d) Multiprogramming.
1.8 Assume that four jobs, E-H, require the CPU cycles listed below. Using the SJN
algorithm, the average turnaround time is __ .
Job:
EFGH
CPU cycle: 5 2 6 4
a)
6.8
b) 11.1
c)
9.0
d)
5.5
1.9 An algorithm designed to detect starvation by tracking how long each job has been
waiting for resources is using the concept of----------------.
a)
Deadlock
b)
Aging
c)
Preemption
d)
Round robin
1.10 The ............... strategy uses the same underlying philosophy as shortest job next, where
the shortest jobs are processed first and longer jobs are made to wait.
a)
SSTF
b)
FCFS
c)
LOOK
d)
SCAN
2

4 Page 4

▲back to top


Section B [30 marks]
Question 2
Define the following terms as used in operating systems:
2.1 Aging
[2]
2.2 1/0 control unit
[2]
2.3 Concept starvation
[2]
Question 3
Explain the fundamental differences between Pre-emptive and non-preemptive scheduling
[4]
Question 4
List and define the two storage media groups
[4]
Question 5
5.1 File management is one of the sub-system managers of the operating systems. List any
three tasks that are performed by the mentioned sub-manager.
[3]
5.2 List any three items that can be found in a file descriptor table.
[3]
Question 6
Mention two types of data compression algorithms and give one example to each mentioned.
[4]
Question 7
In a storage system with conventional magnetic-media disks, several different delays occur
when servicing a request. Identify at least three of these delays, and comment on their
relative contribution to the total delay for servicing a request.
[6]
3

5 Page 5

▲back to top


Section C [40 marks]
Question 8
Given the table below, answer the questions that follow.
Jobs
Job 1
Job 2
Job 3
Job 4
Required memory (KB}
950
330
600
940
Memory block
1
2
3
4
Size (KB)
650
400
1000
950
{Assume all jobs are in a waiting queue in the order given)
8.1 Illustrate with an aid of a diagram how the jobs will be assigned in main memory using
fixed partitions method:
First-fit
[4]
8.2 Calculate the total internal fragmentation for each algorithm stated in 8.1.
[2]
Question 9
Suppose that a disk drive has 1000 cylinders, numbered Oto 999. The drive is currently serving
a request at cylinder 143, and previously it was at cylinder 125. The queue of pending
requests, in FIFO order, is: 86, 600, 220, 940, 260,770,400, 850, 130.
9.1 Starting from the current head position, show how these requests will look like using the
LOOKseek strategy.
[4]
4

6 Page 6

▲back to top


9.2 Using the same initial head position , show how these requests will look like using the
SCAN seek strategy.
[5]
Question 10
The system described in the table below, uses the Banker's algorithm for deadlock avoidance.
You are given that the system has 14 devices.
Job No.
Job 1
Job 2
Job 3
Job 4
Devices Allocated
3
5
0
4
Maximum Required
6
7
13
15
Remaining Needs
Answer the following questions:
a) Fill in the table for the remaining needs of the system
[4]
b) Determine whether the system is in a safe or unsafe state. In case if you find out that it is
unsafe, explain which jobs will be able to complete executing and which jobs will not
be able to complete executing.
If the system is in a safe state, list the sequence of requests and releases that will make
it possible for all jobs to run to completion.
[3]
Question 11
Consider the following information about resources in a particular system:
Resource A has 3 instances
5

7 Page 7

▲back to top


Resource B has 2 instances
Resource C has 4 instances
The resources are allocated as follows:
Process 1 holds one instance of B and C and is waiting for an instance of A;
Process 2 holds one instance of A and waiting on an instance of B;
Process 3 holds one instance of A, one instances of B, and one instance of C.
a) Draw the resource allocation graph for the above described system.
[8]
b) What is the state of each process? Just indicate if it is running or waiting.
[3]
c) Is the system in a deadlock state or not? If so, mention the processes involved and
specifically state what is causing the deadlock. If not, give execution sequences that
eventually lead to all processes being executed.
[2]
Question 12
You would like to visualize the function of the process scheduler and you are given the
following information about jobs that need to be processed:
Process
P1
P2
P3
P4
Ps
Arrival Time
0
4
2
4
6
Burst Time
11
7
10
6
12
Priority
4
6
2
4
3
Draw a time line analysis (gantt chart) for each of the following scheduling algorithm:
Shortest Job Next
[S]
End of Paper
6