OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2024


OPS611S - OPERATING SYSTEMS - 1ST OPP - JUNE 2024



1 Page 1

▲back to top


nAm I BIA un IVERSITY
OFSCIEnCEAno TECHnOLOGY
FACULTYOF COMPUTING AND INFORMATICS
DEPARTMENT OF COMPUTER SCIENCE
QUALIFICATION:BACHELOROF COMPUTER SCIENCE(SYSTEMSADMINISTRATION}
QUALIFICATIONCODE:07BCMS
LEVEL6:
COURSE:Operating Systems
COURSECODE:OPS611S
DATE:June 2024
SESSION:1
DURATION:3 hours
MARKS:100
EXAMINER(S)
MODERATOR:
FIRSTOPPORTUNITYEXAMINATIONQUESTIONPAPER
FRANS HAINGURA
LOIN IIYAMBO
THISQUESTIONPAPERCONSISTSOF 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
in [ ]. Do not give too few or too many facts in your answers.
PERMISSIBLE
1. Non programmable Scientific Calculator.
Page 1 of 8

2 Page 2

▲back to top


SECTION A (MULTIPLE CHOICE) 20 MARKS
1.
___ is where the data and instructions of a computer must reside to be processed.
[1]
a. HOD
b. SSD
C. CPU
d. RAM
2. There are two types of real-time systems depending on the consequences of missing the
deadline. A __ real-time system risks total system failure if the predicted time deadline is
missed.
[1]
a. Restricted
b. Constrained
c. Soft
d. Hard
3. The Memory Manager, the Interface Manager, the Processor Manager, and the File Manager are
the four essential managers of every major operating system.
[1]
a. True
b. False
4. What is a deadline in real time operating system?
[1]
a. The expected boot time of the system
b. The expected shutdown time of the system
c. The expected complete execution of a thread
d. No correct answer
5. Computers in the mid-1960s were designed with faster CPUs, but they still had problems
interacting directly with the relatively slow printers and other 1/0 devices. The solution was called
_______
, which introduced the concept of loading many programs at one time and
allowing them to share the attention of the single CPU.
[1]
a. Multiprocessing
b. Multitasking
c. Multithreading
d. Multiprogramming
6. Compaction should always be performed only when there are jobs waiting to get in.
[1]
a. True
b. False
7. Fixed partitions are also called __ partitions.
(1]
a. Complete
b. Direct
c. Static
d. Dynamic
Page2 of 8

3 Page 3

▲back to top


8. 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.
[1]
a. Load register
b. Relocation register
c. Compaction register
d. Dynamic register
9. The release of memory space by the Memory Manager is called ____
_
[1]
a. Fragmentation.
b. Relocation
c. Deallocation
d. Free memory.
10. The algorithm used to store jobs into memory in a fixed partition system requires a few more
steps than the one used for a single-user system because the size of the job must be matched
with the size of the partition to make sure it fits completely.
[1]
a. False.
b. True.
11. _____
of memory is performed by the operating system to reclaim fragmented sections
of the memory space.
[1]
a. Deallocation
b. Redirection
c. Reallocation
d. Compaction
12. One of the disadvantages of Best-fit allocation strategy is that it is slower in making allocations.
[1]
a. True.
b. False.
13. Single-user, fixed partition, and dynamic partition memory schemes share unacceptable
fragmentation characteristics that were resolved with the development of ___ _
[1]
a. Null entry accounting.
b. Best-fit algorithms.
c. Deallocation.
d. relocatable dynamic partitions.
14. In a paged memory allocation scheme, a simple __
shows its location and its free/busy status.
a. Memory Management table
b. Job Table
c. Page Access table
d. Memory Map Table
has one entry for each page frame that
[1]
Page 3 of 8

4 Page 4

▲back to top


15. Thrashing is a problem that occurs when there are many jobs and many free pages so that pages
are being moved around too much.
[1]
a. True
b. False
16. The primary advantage of storing programs in non-contiguous locations is that ___ . [1]
a. Multiple programs can run at the same time.
b. Every program will be able to run.
c. Secondary storage is accessed more quickly.
d. Main memory is used more efficiently.
17. The term ____
means that during any phase of its execution, a program references only a
small fraction of its pages.
[1]
a. Locality of reference
b. Structured programming
c. Dynamic paging.
d. Working set
18. Which of the following is one of the advantages of virtual memory.
[1]
a. Code and data sharing allowed
b. Programs are stored in non-contiguous page frames
c. Programs are stored in contiguous page frames
d. Inefficient memory usage.
19. To access a location in memory when using segmented memory management, the address is
composed of two entries: _____
.
[1]
a. the segment number and the line number.
b. the segment number, the line number, and the displacement.
c. the segment number and the displacement.
d. the line number and the displacement.
20. Which of the following algorithm is considered hypothetical?
[1]
a. FIFO.
b. First-Fit.
c. LRU.
d. Next-Fit.
SECTION B (THEORY) 20 MARKS
1. At minimum what are the four tasks each essential subsystem manager is expected to perform?
[4]
2. How does an Operating System differ from a User Software? Give examples of each.
[4]
3. Differentiate between virtual memory and cache memory.
[2]
4. Compare the characteristics of a CPU-bound process vs. an I/O-bound process.
[2]
5. Compare and contrast a process and a thread.
[2]
6. Briefly explain the differences between seek time and search time.
[2]
7. Is file deallocation important? Explain your answer.
[2]
8. Compare and contrast program files and data files.
[2]
Page 4 of 8

5 Page 5

▲back to top


SECTION C (ALGORITHMS AND COMPUTATIONS) 60 MARKS
1. Given the following: configuration with jobs arriving in order (Job A, B, C) and with blocks shown
in order from low order memory to high order memory:
[8]
Job List:
Job
Memory
Number Requested
Job A
Job B
Job C
990K
275K
760K
Memory Block
List:
Memory
Block
Memory
Block
Size
Block 1 900K
Block2 960K
Block 3 300K
a. Use the first-fit algorithm to indicate which memory blocks are allocated to each of the
arriving jobs.
[3]
b. Use the best-fit algorithm to indicate which memory blocks are allocated to each of the
arriving jobs.
[3]
c. Calculate the amount of internal fragmentation in Block 1 using algorithms from question
(a) and (b) above.
[2]
2. Given Job and the Page Map Table (PMT) below, the system dictates that the jobs must be split
into equivalents of 40 bytes and the first page is 0, answer the following questions.
[9]
Job
Byte O START
Byte 32 LOADCATALOGUE
Byte 54 ADDTO CART
Byte 99 REMOVEFROMCART
Byte 105 CHECKOUT
Byte 124 L.....E__N___D_____
__.
Page5 of 8

6 Page 6

▲back to top


PMT
Page
0
1
2
3
Page
Frame
4
2
8
12
a. Compute the starting addresses of the Page Frames in the given PMT?
[4]
b. Compute the page number and exact displacement of the ADD TO CART instruction. [2]
c. Compute the CHECK OUT instruction's physical address.
[3]
3. Given a system with two page frames and using a Least Recently Used (LRU) algorithms to
allocate the requested pages accordingly. Answer the following questions.
[12]
PageRequested
121 3 1 24 21 3
Page
Frame A
Page
Frame B
Interrupt
a. Recreate the table and fill in accordingly
b. Compute the success rate.
[1O]
[2]
4. Given the information below. Use SRT scheduling algorithm to answer the following questions.
Note that the concept of aging is used in this system.
[5]
Process Arrival CPU
Time Cycle
Pl
0
2
P2
0
4
P3
2
2
P4
4
4
Page6 of 8

7 Page 7

▲back to top


a. Draw a timeline analysis.
[2]
b. Calculate turnaround time for each process.
[2]
c. Calculate the average turnaround time.
[1]
5. For the system described below, given that all the 16 devices are of the same type, and using the
Banker's Algorithm, answer the following questions:
[4]
Job Devices
No. Allocated
Maximum
Required
Job 1
5
8
Job 2
3
9
Job 3
4
8
Job 4
2
5
a. Calculate the number of available devices.
[1]
b. Determine the remaining needs for each job in the system.
[2]
c. Determine whether the system is in a safe state or an unsafe state.
[1]
6. Consider the description of the system below and answer the following questions per each
system:
[1 OJ
Resource A has 2 instances.
Resource B has 3 instances.
Resource C has 3 instances.
Process 1 holds one instance of B and C and is waiting for an instance of A.
Process 2 holds one instance of A and waiting on an instance of B.
Process 3 holds one instance of A, two instances of B, and two instance of C.
a. Draw the resource allocation graph.
[6]
b. What is the state of each process? Just indicate if 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.
[1]
Page7 of 8

8 Page 8

▲back to top


7. Consider a 6 track and 5 sectors per track virtual cylinder with the following characteristics: it
takes 4 ms to move the read/write head from track to the next, it takes 2 ms for a virtual cylinder
to rotate from one sector position to the next, and it takes is 0.2 ms for a read/write head to
read/write data in a sector. Calculate the resulting seek time, search time and data transfer time,
and total time for the following request list. If the read/write head is at track 0, at the beginning of
sector 4, fill in the missing figures in the table below.
[12]
Track
1
1
3
3
5
4
Sector
0
4
4
0
3
4
Seek Time
Search Time
Data
Transfer
Time
Total
Time
GOOD LUCK!
Page 8 of8