OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2025


OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2025



1 Page 1

▲back to top


n Am I BIA u n IVER s ITY
OF SCIEnCE Ano TECHnOLOGY
Faculty of Computing and Informatics
Department of Computer Science
QUALIFICATION: Bachelor of Computer Science in Cyber Security
Bachelor of Computer Science
Bachelor of Geoinformation Technology
Bachelor of Informatics
QUALIFICATIONCODE: 07BCCY,07BCMS, 07BGEI,
07BAIT
LEVEL: 6
COURSE: Operating Systems
COURSECODE: OPS611S
DATE:June 2025
SESSION: 1
DURATION: 2 hours 30 minutes
MARKS: 80
EXAMINER(S):
MODERATOR:
FIRSTOPPORTUNITYEXAMINATION QUESTION PAPER
Mr. Nasimane Ekandjo
Ms. Loini liyambo
THIS QUESTION PAPERCONSISTSOF 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.
PERMISSIBLEMATERIALS
1. Non-programmable calculator.

2 Page 2

▲back to top


Question 1
Section A [12 marks]
Below are multiple choice questions and true/ false questions. Select the correct answer. [12]
1.1 Shortest job next (SJN)is a non preemptive scheduling algorithm (also known as shortest job
first, or SJF)that handles jobs based on the length of their CPUcycle time. (True/False)
1.2 A job's state moves from HOLD to WAITING when it's ready to run but is waiting for the
CPU. (True/False)
1.3 Paged memory allocation offers the advantage that it doesn't require the entire job to be
stored in memory during its execution. (True/False)
1.4 The fixed partition scheme works well if all the jobs run on the system are of the same size
or if the sizes are known ahead of time and don't vary between reconfigurations.
(True/False)
1.5 Access time is the sum of search time and transfer time. (True/False)
1.6 When executing a job, the File Manager determines whether a user request requires that a
file be retrieved from storage or whether it is already in memory. (True/False)
1.7 In a relocatable dynamic partition scheme, the __ ensures that, during execution, a
program won't try to access memory locations that don't belong to it.
a) Relocation register
b) Load register
c) Bound register
d) Compaction register
1.8 In the "dining philosophers" problem, a philosopher can pick up a fork when __ .
a) There is one available
b) There are two available
c) No other philosopher is eating
d) It is his/her turn, going in numerical order from one philosopher to the next
Page 1 of6

3 Page 3

▲back to top


1.9 Fill in the missing event that causes a 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 accessesRl and locks it.
2. P2 accessesR2 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.10 In a paged memory allocation scheme, a page size that is too small will generate __ .
a) Very long Page Map Tables
b) Excessiveinternal fragmentation
c) Excessive page faults
d) Excessiveexternal fragmentation
1.11 The first and simplest recovery method, and the most drastic, is to __ .
a) select a non-deadlocked job, preempt the resources it's holding, and allocate them to
a deadlocked process so it can resume execution, thus breaking the deadlock
b) identify which jobs are involved in the deadlock and terminate them one at a time,
checking to see if the deadlock is eliminated after each removal
c) terminate only the jobs involved in the deadlock and ask their users to resubmit them
d) terminate every job that's active in the system and restart them from the beginning
1.12 Each volume in a system has a volume descriptor followed by a __ that lists the names
and characteristics of every file contained in that volume.
a) Master file directory
b) File allocation
c) Subdirectory
d) Volume directory
Page 2 of 6

4 Page 4

▲back to top


Section B [25 marks]
Question 2
Define the following terms as used in operating systems:
2.1 lnterblock gap (1GB)
[2]
2.2 Multiprogramming
[2]
Question 3
3.1 Describe the concept context switching as used in operating systems.
[2]
3.2 Distinguish or differentiate between cache memory and main memory.
[4]
Question 4
4.1 Outline two advantages of direct record organisation in file management.
[2]
4.2 State any two factors that can affect the efficiency of the file manager.
[2]
Question 5
5.1 One ofthe ways to utilize memory is to make use of compaction. State three circumstances
(situations) when the operating system must perform compaction.
[3]
5.2 Outline two advantages of performing compaction more often.
[2]
Question 6
Name and explain any three conditions that are required for a deadlock to occur.
[6]
Page 3 of 6

5 Page 5

▲back to top


Section C [43 marks]
Question 7
Given that a program of size 5750 lines requires using main memory. Assume you are using the
paged memory allocation scheme, and the size of each page frame is 370 MB.
Answer the following questions given that 1 MB= 1 line of code:
7.1 How many pages will the job have?
[1]
7.2 What will be the page number and displacement for the line 4000? (Pages are named from
Page 0 ...)
[2]
7.3 What will be the line number for a line in Page 7 with displacement 70?
[2]
Question 8
Given the following characteristics for a magnetic tape using linear recording described in device
management chapter:
Density= 1600 bpi (bytes per inch)
Speed = 1500 inches/second
Size = 2400 feet
Start/stop time = 4 ms
Number of records to be stored= 200,000 records
Size of each record = 160 bytes
Block size = 10 logical records
IBG = 0.5 inch
Find the following:
8.1 Number of blocks needed.
[1]
8.2 Size of the block in bytes.
[2]
8.3 The amount of tape used for data only is 20 000 inches. Calculate the total amount of tape
used (data+ IBGs), in inches.
[2]
Page4 of 6

6 Page 6

▲back to top


Question 9
In demand paging, a page replacement policy is used to manage system resources. Given that main
memory has 4 page frames namely (L, I, S, A) available to programs and that a program consisting
of 15 pages is to be loaded in main memory. The request pages are provided below in order:
4 1013204 20 1304 3
Suppose that page frame L already contains page 0 (which was loaded first) and that page frame I
contains page 1 (which was loaded secondly). Page frames Sand A are empty.
Using the Least Recently Used (LRU) page removal algorithms, do a page trace analysis clearly
indicating page faults with asterisks (*).
[5]
Question 10
Consider a system that has three processes (Pl, P2, P3) and three reusable resources (Rl, R2, R3).
There is one instance of Rl, two instances of R2 and three instances of R3.
Pl holds an instance of Rl and an instance of R3 and is requesting R2.
P2 holds an instance of R3 and is requesting Rl and R2.
P3 holds two instances of R2 and an instance of R3 and is requesting Rl.
10.1 Draw the resource allocation graph (RAG) for the above-described system.
[6]
10.2 Is this system deadlocked or not? Explain your answer.
[2]
Question 11
Consider the data in the table below to answer the questions that follow:
Job
Arrival
CPU Cycle
A
0
15
B
2
2
C
3
14
D
6
10
E
9
1
Page 5 of 6

7 Page 7

▲back to top


Calculate the start time and finish time for each of the five jobs using each of the following
scheduling algorithms. You are not necessarily required to draw the time line analysis graphs
(GANNT charts), but just to clearly state the start and finish times for each job. Ignore the time
required for context switching and natural wait.
11.1 First Come First Serve (FCFS)
[5]
11.2 Shortest Remaining Time (SRT)
[5]
Job Arrival Time CPU Cycle
FCFS
A
0
B
2
C
3
D
6
E
9
15
Start: - Finish: -
2
Start: - Finish: -
14
Start: - Finish: -
10
Start: - Finish: -
1
Start: - Finish: -
SRT
Start: -
Start: -
Start: -
Start: -
Start: -
Finish: -
Finish: -
Finish: -
Finish: -
Finish: -
Question 12
The device manager in an operating system is responsible for the management and scheduling of
1/0 requests. A device handler usually chooses which policy to implement when handling 1/0
processes.
Consider the situation in which the disk read/write head is currently located at track 50 (of tracks
0-199), moving in the outward direction (towards 199) and it takes lms to travel from one track to
the next.
12.1 Compute how long it will take to satisfy the following track requests using the seek
strategies below: You are required to draw/illustrate how these strategies will service the
track requests.
95, 180, 34, 119, 11, 123, 62 and 64.
Note that all requests are present in the wait queue and arrived in the order from left to
right. (Ignore rotational time and transfer time; just consider seek time).
a) SSTF
[4]
b) C-L00K
[4]
12.2 What is the average seek time for C-L00K algorithm?
[2]
End of Paper
Page 6 of 6