OPS611S - OPERATING SYSTEMS - 2ND OPP - JULY 2022


OPS611S - OPERATING SYSTEMS - 2ND OPP - JULY 2022



1 Page 1

▲back to top


n Am I BI A u n IVER s I TY
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
QUALIFICATIONCODE: 07BCMS / 07BCCY/ 07BAIT
LEVEL:6
COURSE:Operating Systems
COURSECODE: OPS611S
DATE:July 2022
PAPER: THEORY
DURATION: 3 hours
MARKS: 80
SECOND OPPORTUNITY /SUPPLEMENTARY EXAMINATION QUESTION PAPER
EXAMINER{S)
Ms. Teresia Ankome, Mr. Isaac Nhamu and Mr. Julius Silaa
MODERATOR:
Ms. Loini liyambo
THIS QUESTION PAPERCONSISTSOF 7 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


SECTION A
Question 1
Choose the correct answer from the multiple choice questions below.
(10 marks]
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 A system with __ divides programs into parts and keep them in secondary storage,
bringing each part into memory only as it is needed.
a) Virtual Memory
b) Shared Memory
c) Paging processing
d) Segmented processing
1.3 The concept of less-than-complete use of memory space in a fixed partition is called
a) fixed fragmentation
b) interr'lal fragmentation
c) dynamic fragmentation
d) external fragmentation
1.4 The Banker's Algorithm is an example of a(n) __ policy
a) Avoidance
b) Recovery
c) Detection
d) Mutual exclusion
1

3 Page 3

▲back to top


1.5 In a paged memory allocation scheme, a simple __ has one entry for each page frame that
shows its location and its free/busy status.
a) Memory Map Table
b) Memory Management table
c) Page Access table
d) Job Table
1.6 Assume that four jobs, E-H, require the CPUcycles listed below. Using the SJNalgorithm, the
average turnaround time is __ .
Job:
CPU cycle:
EFGH
52 6 4
a) 6.8
b) 11.1
c) 9.0
d) 5.5
1.7 ____
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) Spooling
d) All of the above
e)
1.8 ____
time is the time required to move the arm of a movable-head magnetic drive into
position over the proper track.
a) transfer
b) access
c) search
d) seek
1.9 Which of the following is not a function of the file manager
a) File storage tracking
b) File encryption
c) File allocation if user access cleared
d) File deallocation
e) None of the above
2

4 Page 4

▲back to top


1.10 Many computer users and some operating systems call sub-directories __ .
a) Databases
b) Folders
c) Volumes
d) Files
3

5 Page 5

▲back to top


Section B
Question 2
Define the following terms as used in operating systems:
2.1 Aging
2.2 Context Switching
2.3 Concept starvation
[30 marks]
[2]
[2]
[2]
Question 3
Explain the fundamental differences between pre-emptive and non-preemptive scheduling
(4]
Question 4
Discussthe four (4) conditions that are required for a deadlock to occur.
(8]
Question 5
5.1 File management is one of the sub-system managers of the operating systems. List any three
(3) tasks that are performed by the mentioned sub-manager.
[3]
5.2 List any three (3) items that can be found in a file descriptor table.
[3]
Question 6
In a storage system consisting of 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]
4

6 Page 6

▲back to top


Section C [40 marks]
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?
[1]
7.2 How much internal fragmentation will be caused?
[2]
7.3 The processor (CPU), wants to access the instruction at line 6650. In which page
number will it find this instruction and what will be the displacement (offset) value?
[2]
7.4 What will be the line number for a line (instruction) on page 7 with a displacement of
400?
[2]
Question 8
For the system below, assume that all the devices are of the same type. The system uses the
Banker's algorithm for deadlock avoidance. You are given that the system has 18 devices.
Job No.
Job A
Job B
Job C
Job D
Devices Allocated
7
4
2
3
Maximum Required
10
6
7
17
Answer the following questions:
8.1 Determine the remaining needs for each job
[2]
8.2 Determine whether the system is in a safe or unsafe state. In case if you find out that
it is unsafe, propose a scenario whereby the system can be changed to a safe state. 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]
5

7 Page 7

▲back to top


Question 9
Assume that it takes 1 ms to travel from one track to the next, and that the arm is
originally positioned at Track 53. The request queue (number of tracks) is 0-199. Note
that the r/w arm should move towards the high-numbered tracks. (Ignore rotational
time and transfer time, just consider seek time).
Compute how long it will take to satisfy the following track requests which are all
present in the wait queue:
98, 183,37, 122, 14, 124,65,67
9.1 Use the following seek strategy algorithm to draw/illustrate using a graph how
the track requests will be serviced.
C-LOOK
[6]
9.2 What is the total seek distance for 9.1?
[2]
Question 10
In demand paging, a page replacement policy is used to manage system resources. Given that
main memory has 4 page frames (N, U, S, T) 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:
102143102043 124
Suppose that all the page frames are initially empty.
Using the following page removal algorithms and do a pages trace analysis indicating page
faults.
10.1 Least Recently Used
[7]
10.2 Most Recently Used (MRU)
[7]
6

8 Page 8

▲back to top


Question 11
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)
11.1 Illustrate with an aid of a diagram how the jobs will be assigned in main memory using
fixed partitions method:
First-fit
[4]
11.2 Calculate the total internal fragmentation for each algorithm stated in 11.1.
[2]
End of Paper
7