OPS611S - OPERATING SYSTEMS - 2ND OPP - JULY 2023


OPS611S - OPERATING SYSTEMS - 2ND OPP - JULY 2023



1 Page 1

▲back to top


nAmlBIA unlVERSITY
OF SCIEnc E Ano TECHn OLOGY
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: July 2023
PAPER: THEORY
DURATION: 3 hours
MARKS: 80
SECOND OPPORTUNITY /SUPPLEMENTARY EXAMINATION QUESTION PAPER
EXAMINER(S)
Ms. Teresia Ankome , Ms. Deada Kandjii and Mr. Ericky lipumbu
MODERATOR:
Ms. Loini liyambo
THIS QUESTION PAPER CONSISTS OF 9 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]
Question 1
1.1 The Job Table (JT) contains two values for each active job: the size of the job
and the memory location where its Page Map Table is stored.
a)False
b) True
1.2 An important function of the Processor Manager is to keep track of the status of
each job, process, and thread.
a)False
b) True
1.3 In active multiprogramming schemes, a job can monopolize the CPU for a long
time while all other jobs waited.
a)False
b) True
1.4 A large job can have problems with a first-fit memory allocation scheme.
a)False
b) True
1.5 The key to the successful implementation of demand paging is the use of a high-
speed CPU.
a)False
b) True
1.6 The scheduler is the part of an Operating System that determines the priority of each
process.
a)False
b) True
1.7 Thrashing is a problem that occurs when there are a large number of jobs and many
free pages so that pages are being moved around too much.
a)True
b) False
1.8 The working set model is used to compute the average number of frames a job will
need in order to run smoothly without causing thrashing.
a) False
b) True
1.9 Shortest Remaining Time First is the best preemptive scheduling algorithm that can
be implemented in an Operating System.
b) False
b) True
1

3 Page 3

▲back to top


1.10 Paged memory allocation offers the advantage that it doesn't require the entire job to
be stored in memory during its execution.
a) True
b) False
2

4 Page 4

▲back to top


Section B [30 marks]
Question 2
Define the following terms as used in operating systems:
2.1 Search time
[2]
2.2 Cache memory
[2]
2.3 Interleaving.
[2]
Question 3
Differentiate between fixed length records and variable length records.
[4]
Question 4
Discuss how the following pairs of scheduling criteria conflict in certain settings.
4.1 CPU utilization and response time
[2]
4.2 Average turnaround time and maximum waiting time
[2]
4.3 1/0 device utilization and CPU utilization
[2]
Question 5
What do you understand by Cloud computing, and what are some of the benefits that it
offers?
[4]
Question 6
Four conditions need to be present for a deadlock to occur. Explain two conditions namely;
no preemption and resource holding.
[4]
3

5 Page 5

▲back to top


Question 7
You are given a program of size 8650 bytes that needs to be loaded in memory. Assume that you are
using the paged memory allocation scheme and the size of each page frame is 650 bytes.
Answer the following questions given that 1 byte= 1 line of code:
7.1 How many pages will the program have?
[2]
7.2 How much internal fragmentation will be caused?
[2]
7.3 The processor (CPU),wants to accessthe instruction at line 6650. In which page number will
it find this instruction and what will be the displacement (offset) value?
[2]
4

6 Page 6

▲back to top


Question 8
Section C [40 marks]
Consider the process state diagram shown below and answer the questions that follow.
Controlled
by Job
Scheduler
signalto
continue
processing
I/0 request
pagefault
Wai~/Controlled
by
___~_t_in_g _____P_r_oc_e_ss_oSr_ch_eduler)1
8.1 Explain why there is no transition from the READYstate to the WAITING state. [1]
8.2 Explain why there is no transition from the WAITING state to the RUNNING state.
[2]
Question 9
For the following resource allocation graph, find out and explain whether there is a
deadlock or not.
[2]
R1
R2
R3
9.2 Given the following information regarding resources in a system:
5

7 Page 7

▲back to top


Resource 1 (Rl) has 1 unit
Resource 2 (R2) has 2 units
Resource 3 (R3) has 3 units
Resource 4 (R4) has 1 unit
Process A is holding 1 unit of Rl and 1 unit of R3; and is requesting 1 unit of R2.
Process B is holding 1 unit of R3; and is requesting 1 unit of Rl.
Process C is holding 1 unit of R3; and is requesting 1 unit of Rl and 1 unit of R2.
Process Dis holding none of the resources; and is requesting 1 unit of R2 and 1
unit of R3.
Draw the resource allocation graph (RAG) for the above described system
showing all resources and processes.
[6]
••R2
6

8 Page 8

▲back to top


Question 10
Given the following information:
Process
A
B
C
D
E
Arrival Time
0
3
7
4
10
CPU Cycle
11
16
4
2
13
Draw a timeline analysis for each of the following scheduling algorithms. (It might be helpful
to first compare a start and finish time for each job). Calculate the average turnaround time
and average waiting time for execution of the processes.
a) FCFS
[5]
b)SRT
[6]
Question 11
In demand paging, a page replacement policy is used to manage system resources. Given that
main memory has 3 page frames (F, C, I) 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:
965687597568598
Suppose that all the page frames are initially empty.
Using the Most Recently Used (MRU) page removal algorithms, do a pages trace analysis
clearly indicating page faults.
Show how these pages will be allocated using the following page replacement policies. You
are required to do a page trace analysis and clearly indicating when an interrupt or page fault
has occurred.
11.1 First In First Out
[5]
7

9 Page 9

▲back to top


11.2 Least Recently Used
[5]
11.3 Calculate the failure rate and success rate for 11.2
[2]
Question 12
Given the table below, answer the questions that follow.
Jobs
Job 1
Required memory (KB)
950
Memory block
1
Job 2 330
2
Job 3 600
3
Job 4 940
4
Size (KB)
650
400
1000
950
8

10 Page 10

▲back to top


(Assume all jobs are in a waiting queue in the order given)
12.1 Illustrate with an aid of a diagram how the jobs will be assigned in main memory using
fixed partitions method:
First-fit
[4]
12.2 Calculate the total internal fragmentation for each algorithm stated in 12.1.
[2]
End of Paper
9