OPS621S - OPERATING SYSTEMS - 1ST OPP - NOV 2024


OPS621S - OPERATING SYSTEMS - 1ST OPP - NOV 2024



1 Page 1

▲back to top


n Am I BIA u n IVER s ITY
OF SCIEnCE Ano TECHnOLOGY
Faculty of Computing and Informatics
QUALIFICATION: BACHELOROF COMPUTERSCIENCE: SYSTEMSADMINISTRATION, COMMUNICATION
NETWORKS; BACHELOROF SOFTWAREDEVELOPMENT,BACHLOEROF GEO-INFORMTION TECHNOLOGY
QUALIFICATION CODE: 80BSAN; 07BACS, 07BGEI LEVEL: 6
COURSE: OPERATINGSYSTEMS
COURSE CODE: OPS621S
DATE: NOVEMBER2024
SESSION: 1
DURATION: 3 HOURS
MARKS: 80
EXAMINER(S)
MODERATOR:
FIRST OPPORTUNITY EXAMINATION QUESTION PAPER
ALBERTINA SHILONGO
LOINI IIYAMBO
INSTRUCTIONS
1. Answer ALL the questions.
2. Read all the questions carefully before answering.
3. Number the answers clearly
THIS QUESTIONPAPERCONSISTSOF 6 PAGES
(Including this front page)

2 Page 2

▲back to top


SECTION A
[20 Marks]
Multiple Choice, Fill in question and True and False. Write the question number and the correct
answer next to it.
1. Which of the following is NOT a function of an operating system?
a) Memory management
b) File management
c) Network management
d) Program compiling
2. Select the resource that is non-preemptive.
a) Printer
b) CPUCYCLE
c) File lock
d) RAM
3. Which type of operating system is designed to perform specific tasks or functions on dedicated
hardware platforms?
a) Batch OS
b) Real time OS
c) Embedded OS
d) Multi-user OS
4. Which of the following characteristic defines sequential access storage media?
a) Fast retrieval of any data item
b) Data is organized in a linear format
c) Data can be accessed randomly
d) Low cost per gigabyte
5. Which storage media type is best suited for applications that require quick and frequent access to
individual records?
a) Sequential access media
b) Direct access media
c) Both sequential and direct access media
d) Noneoftheabove
.\\
6. Which is not examples of operating systems?
a) Office 2016
b) Linux
c) Windows

3 Page 3

▲back to top


d) Mac OS
7. Which algorithm works on the assumption that the most recently used page is likely not to be
requested back in the RAM?
a) FIFO
b) FCFS
c) MRU
d) LRU
8. Which process state/queue are jobs moved to while waiting to have the process time?
a) Waiting
b) Ready
c) Running
d) Complete
9. Which RAID levels provides redundancy by mirroring data across multiple drives?
a) RAID0
b) RAID 1
c) RAID 5
d) RAID 10
10. Which algorithm functions by moving the disk arm in one direction and servicing all requests along the
way as it progresses?
a) C-LOOI<
b) C-Seek
c) C-Service
d) C-SCAN
Fillin the missing words
11. The primary purpose of any page replacement algorithm is to reduce the number of_____
_
12. ______
are processes that are started by the operating system and ensures that the running
of the OS.
13. _______
is a process of moving a process temporarily from main memory into a secondary
memory and vice-versa.
14. ______
is a scheduling policy goal that ensures that the processor runs as many jobs as
possible in each amount of time.
15. The equal time slice shared by all process in round robin is called _______
_
State whether the following statements are true or false
16. 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.
17. Device management principles are changing rapidly to accommodate cloud computing.

4 Page 4

▲back to top


18. As a process moves through the system, its status changes. Possible process statuses include FINISHED,
HOLD, READY,RUNNING, and WAITING.
19. A large job can have problems with a first-fit memory allocation scheme.
20. A compressed image file can be reconstructed if a lossy compression algorithm is used because the
compression process is reversible.
SECTIONB: SHORTQUESTIONS
[30
Marks]
1. Various OS components work together seamlessly to manage computer tasks. Explain the functions of
the following OS components from the time a user initiates a printing job to the completion of the job.
(4)
a) Device Drivers
b) Process Management
c) Memory Management
d) File Management
2. Explain the difference between a process and a thread.
(2)
3. Explain two security and protection measures that are offered in a multi-User environment by the
operating system.
(4)
4. List and explain the four conditions that activate the occurrence of a deadlock in the system?
(8)
5. Distinguish between page replacement algorithms and scheduling algorithms in operating systems.
(2)
6. Explain paging in terms of memory management?
(2)
7. Distinguish the types of file organisation in a system.
(6)
8. Explain the role of device drivers in device management.
(2)
Section C: Practical
[30 Marks]
Question 1: Consider a system having resources and processes as described below:
Resource 1 (Rl) have 1 instance
Resource 2 {R2) have 1 instance
Resource 3'(R3) have 1 instance
Process 1 is holding Rl; and is requesting R2.
Process 2 is holding R2; and is requesting Rl and R3.
Process 3 is holding R3; and is requesting Rl.

5 Page 5

▲back to top


Process 4 is holding none; and is requesting R2 and R3.
a) Draw the resource allocation graph for the above-described system.
(5)
Question 2: Consider the following page request: 4 1 0 13 2 0 4 2 0 1304 3
Suppose that all the page frames are initially empty, given that the main memory has 3-page frames
and that a program/job consisting of 15 pages is to be loaded in main memory.
a) Using the Most Recently Used (MRU} page removal algorithm, demonstrate how you will fit the given
pages in the memory.
(6)
b) Indicate the number of pages faults and hits and misses in this algorithm
(2)
c) Discuss 1 advantage and disadvantages of this algorithm
(2)
Question 3: 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
Start
Completion
Waiting
Turn Around Time
(a) Draw a time line analysis (Gantt chart) using Priority scheduling algorithms (non-Preemptive):
(3)
(b) Calculate the average turnaround and waiting time for all processes.
(2)
Question 4: Consider the system with the following resources and processes:
Processes: Pl, P2, P3, P4 PS
Resources and instances: A=10, 8=5, C=7
(a) Given the table below, write down the available resources before any execution.
(1)
Processes Allocation
Maximum
Available
Need
AB C
A
B
C
PO
01 0
75
3
-
Pl
20 0
32
2

6 Page 6

▲back to top


P2
30 2
9
0
2
P3
2 11
22
2
P4
002
43
3
(b) Calculate the total need for all processes. Show all your work by re-drawing the table on your
answer sheet and provide the missing information.
(3)
(c) Calculate the sequence of process execution and verify if the system is in a safe state after
execution of the processes. Show your execution process.
(3)
(d) Identify the order in which processes need to be executed to ensure that the system is in sate
state.
(3)
Exam Ends