OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2022


OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2022



1 Page 1

▲back to top


'9
n Am I BIA u n IVER s ITY
OF SCIEn CE 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: June 2022
PAPER: THEORY
DURATION: 3 hours
MARKS: 80
FIRST OPPORTUNITY EXAMINATION QUESTION PAPER
EXAMINER(S)
Ms. Teresia Ankome, Mr. Isaac Nhamu and Mr. Julius Silaa
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


Question 1
Section A [10 marks]
Below are multiple choice questions as well as true/ false questions. Select the correct answers.
[10]
1.1 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.2 In _______
several programs are kept in main memory at the same time.
a) Multiprocessor
b) On- line operation
c) Buffering
d) Multiprogramming.
1.3 In a paged memory allocation scheme, a simple ____
that shows its location and its free/busy status.
a) Memory Map Table
b) Memory Management table
c) Page Access table
d) Job Table
has one entry for each page frame
1.4 _____
is when, in modern printing systems, a disk accepts output from several users
and acts as a temporary storage area for all output until the printer is ready to accept it.
Select one:
a) Lagging
b) Spooning
c) All of the above
d) Spooling
1.5 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
1.6 The scheduler is the part of an Operating System that determines the priority of each process.
1

3 Page 3

▲back to top


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) True
b) False
1.9 Shortest Remaining Time First is the best preemptive scheduling algorithm that can be
implemented in an Operating System.
a) True
b) False
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 operation systems:
2.1 Compaction
[2]
2.2 Interleaving
[2]
2.3 Threads
[2]
Question 3
Explain the fundamental differences between multiprocessing and multitasking operating systems.
[4]
Question 4
Explain any four (4) objectives of a process scheduling algorithm?
[4]
Question 5
5.1 Briefly explain the Process Control Block.
[3]
5.2 Identify any three attributes of a Process Control Block.
[3]
Question 6
Four (4) conditions need to be present for a deadlock to occur. Explain two conditions namely; no
preemption and resource holding.
[4]
Question 7
Fixed partitions and dynamic partitions are two of the main memory allocation schemes. Describe
them and highlight the main distinguishing characteristics.
[6]
3

5 Page 5

▲back to top


Question 8
Section C [40 marks]
Consider the process state diagram shown below and answer the questions that follow.
,------------------\\
-~
Controlled
HoldState 1-- byJob
Scheduler
~------~Controlle~-~
>----Running State : byJob
~- interrupt
1 Scheduler
signalto issued
continue
I/0 request
processing
pagefault
Finished
_ __,/
7 WaitingS~~ontrolled
by
____________Pr_o_ce_ss_oSr_c_heduler)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
Consider the following information about resources in a particular system:
Resource A has 3 instances
Resource B has 2 instances
Resource Chas 4 instances
The resources are allocated as follows:
Process 1 holds one instance of Band C and is waiting for an instance of A;
Process 2 holds one instance of A and waiting on an instance of B;
Process3 holds one instance of A, one instances of B, and one instance of C.
4

6 Page 6

▲back to top


a) Draw the resource allocation graph for the above described system.
[6]
b) What is the state of each process? indicate whether 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 10
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)
10.1 Illustrate with an aid of a diagram how the jobs will be assigned in the main memory using
fixed partitions method:
First-fit
(4]
10.2 Calculate the total internal fragmentation for each algorithm stated in 10.1.
[2]
Question 11
In demand paging, a page replacement policy is used to manage system resources. Given that main
memory has 3 page frames (0, P, S) 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:
965 6875975 68 5 98
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.
5

7 Page 7

▲back to top


11.1 First In First Out
(4]
11.2 Least Recently Used
(4]
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 algorithms:
12.1 Priority
[3]
12.2 Shortest Job Next
[3]
12.3 Calculate the average turnaround time for each algorithm.
[1]
12.4 Calculate the average waiting time for each algorithm.
[1]
Question 13
Suppose that a disk drive has 1000 cylinders, numbered 0 to 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.
Starting from the current head position, show/illustrate how these requests will look like using the
LOOKseek strategy.
(4]
End of Paper
6