OPS621S - OPERATING SYSTEMS - 2ND OPP - JAN 2020


OPS621S - OPERATING SYSTEMS - 2ND OPP - JAN 2020



1 Page 1

▲back to top


NAMIBIA UNIVERSITY
OF SCIENCE AND TECHNOLOGY
Faculty of Computing and Informatics
Department of Computer Science
QUALIFICATION: 80BSAN: Bachelor of IT: Systems Administration and Networks
07BACS: Bachelor of Computer Science:
Systems Administration; Communication Networks; Software Development
QUALIFICATION CODE: 80BSAN; 07BACS
LEVEL: 6
COURSE: Operating Systems
COURSE CODE: OPS621S
DATE: January 2020
DURATION: 3 hours
SESSION: 2
MARKS: 80
SECOND OPPORTUNITY / SUPPLEMENTARY EXAMINATION QUESTION PAPER
EXAMINER(S)
Mr. Nasimane Ekandjo and Ms. Jovita Mateus
MODERATOR:
Mr. Isaac Nhamu
THIS QUESTION PAPER CONSISTS OF 6 PAGES
(Excluding this front page)
INSTRUCTIONS
Answer ALL the questions.
Write clearly and neatly.
Number the answers clearly.
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
If the File Manager is required to provide detailed instructions for each system device (how to
start it, get it to move to the correct place where the desired record is located, and when to
stop), then the program is considered device dependent. True/False
1.2 When using DMA, the CPU controls the transfer of data to and from memory over the system
bus. True/False
1.3
If locks are not used to preserve data integrity, the updated records in a database may include
only some of the data—and their contents depend on the order in which each process finishes
its execution. True/False
1.4 The segmented/demand paged memory allocation scheme is a combination of segmentation
and demand paging, and it offers the logical benefits of segmentation, as well as the physical
benefits of paging. True/False
1.5 CPU-bound jobs (such as printing a series of documents) have many brief CPU cycles and long
1/0 cycles. True/False
1.6 Consider the printer event below:
P1 requests and is allocated the printer R1.
P1 releases the printer R1.
P2 requests and is allocated the disk drive R2.
P2 releases the disk R2.
P3 requests and is allocated the plotter R3.
P3 releases the plotter R3.
Assume that the events above are occurring in the order given (1-6). Which of the following
statements is true?
a)
Event 4 caused deadlock
b)
Event 5 caused deadlock
c)
Event 6 caused deadlock
d)
There is no deadlock
Page 1 of 6

3 Page 3

▲back to top


1.7
In a direct record organization scheme, the program used to store the data follows a set of
instructions, called a
algorithm that transforms each key into a number, the record’s
logical address.
a)
Hashing
b)
Grouping
c)
Translation
d)
lookup
1.8 The transition from
can be initiated by the Process Scheduler or the Job Scheduler.
a)
WAITING to READY
b)
RUNNING to WAITING
c)
RUNNING to FINISHED
d)
HOLD to READY
1.9 In a paged memory allocation scheme, a page size that is too small will generate
;
a)
excessive external fragmentation
b)
excessive internal fragmentation
c)
excessive page faults
d)
very long Page Map Tables
1.10 In a relocatable dynamic partition scheme, the
contains a value that must be added to
each address referenced in a program so that the system will be able to access the correct
memory addresses after relocation.
a)
load register
b)
relocation register
c)
bounds register
d)
compaction register
Page 2 of 6

4 Page 4

▲back to top


Section B [30 marks]
Question 2
2.1 Define the following terms as used in operation systems.
a)
Data compression
[2]
b)
Multiprogramming
[2]
2.2
Differentiate between turnaround time and response time.
[4]
Question 3
3.1 What is the relationship between operating systems and computer hardware?
[2]
3.2 What inconveniences can a user face while interacting with a computer system that has no
operating system?
[3]
Question 4
How does a page fault occur? Explain what happens / what needs to be done when a page fault has
occurred.
[4]
Question 5
5.1 One of the ways to utilize memory is to make use of compaction. Explain three circumstances
(situations) when the operating system has to perform compaction.
[3]
5.2 Discuss two advantages of performing compaction more often.
[2]
Question 6
6.1 Explain two advantages of a paged memory allocation scheme and two advantages of a
segmented memory allocation scheme.
[4]
6.2
Explain two disadvantages of a paged memory allocation scheme and two disadvantages of a
segmented memory allocation scheme.
[4]
Page 3 of 6

5 Page 5

▲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?
[2]
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
Given the table below, answer the questions that follow.
Job List:
Memory Block List:
Job Number | Memory Requested
Memory Block | Memory Block Size
JobA
44k
Block 1
250K
Job B
220K
Block 2
900K
Job C
670K
Block 3
280K
Job D
64K
Block 4
200K
Block 5
750K
(Assume all jobs are in a waiting queue in the order given)
Illustrate with an aid of a diagram how the jobs will be assigned in main memory using fixed partitions
method:
Worst fit
[6]
Page 4 of 6

6 Page 6

▲back to top


Question 9
In demand paging, a page replacement policy is used to manage system resources. Suppose that a
newly created process has 3 page frames (Frame X, Frame Y, Frame Z) allocated to it. The program
has been divided into four pages (1, 2, 3, 4), and then generates the page references indicated below.
1232141234121324
Assuming that all the three page frames are initially empty; use the Least Recently Used (LRU) page
removal algorithm to do a page trace analysis. Indicate how many page faults would occur.
[5]
Question 10
The system 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:
10.1 ‘Fill in the table for the remaining needs of the system
[2]
10.2 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]
Page 5 of 6

7 Page 7

▲back to top


Question 11
The device manager in an operating system is responsible for the management and scheduling of 1/O
requests. A device handler usually chooses which strategy to implement when handling 1/O
processes.
11.1 Given that it takes 1ms to travel from one track of a storage device to the next, and that the
arm of a disk's Read/Write head is originally positioned at track 45 moving towards the higher
numbered tracks. You are also given that the disk has tracks 0-249.
Compute by illustrating how long it will take to satisfy the following requests:
50, 111, 87, 120, 215, 17, 30, using the following strategies (with zero rotational and transfer
times):
a) LOOK
[6]
b) C-SCAN
[6]
11.2 What is the average seek time for each of the two strategies mentioned in 11.1.
a) LOOK
[2]
b) C-SCAN
[2]
End of Exam
Page 6 of 6