You are on page 1of 5

MOI UNIVERSITY

OFFICE OF THE CHIEF ACADEMIC OFFICER

UNIVERSITY EXAMINATIONS
2018/2019 ACADEMIC YEAR
SECOND YEAR FIRST SEMESTER EXAMINATIONS
FOR THE DEGREE OF
BACHELOR OF TECHNOLOGY
ELECTRICAL & TELECOMMUNICATIONS ENGINEERING AND

ELECTRICAL & ELECTRONICS ENGINEERING

COURSE CODE: COE 251


COURSE TITLE: COMPUTER OPERATING SYSTEMS
DATE: TIME:
INSTRUCTIONS TO CANDIDATES
1. THIS PAPER CONTAINS SEVEN (7) QUESTIONS
2. ANSWER ANY FIVE (5) QUESTIONS

THIS PAPER CONSISTS OF (5) PRINTED PAGES

PLEASE TURN OVER


COE 251: Computer Operating Systems Semester I Academic Year: 2018/19

Question One
a) Briefly describe the following CPU components:
i) Program counter
ii) Instruction registers.
[4 marks]
b) Explain why the operation of a computer CPU is a loop.
[4 marks]
c) Distinguish between traps and interrupts giving one cause of each.
[4 marks]
d) State one use of each of the following UNIX components:
i) Kernel
ii) Shell
[2 marks]

Question Two
a) Explain why a switch between threads may be cheaper than a switch between processes.
[4 marks]
b) Suppose a short-term scheduling algorithm favours those processes that have used little
processor time in the recent past.

i) Explain why this algorithm favours input/output-bound processes.


[2 marks]
ii) Explain why this algorithm does not permanently deny processor time to CPU bound
processes.
[4 marks]
d) For the processes shown in the Table 1 below:
i) Illustrate their execution using Round Robin (quantum =3).
[2 marks]
ii) Determine turnaround time.
[2 marks]

Table 1: Process statistics

Process Arrival time Processing time

A 0.000 4

B 2.001 7

C 3.001 2

D 3.002 2

2
COE 251: Computer Operating Systems Semester I Academic Year: 2018/19

Question Three
a) List three requirements of any solution to the critical section problem.
[3 marks]
b) Describe the Interrupt disabling and Enabling as an approach to mutual exclusion.
[5 marks]
c) Table 2 shows resource usage in a set of four processes. Use the table to answer the
questions that follow.

Table 2: Resource usage

Current Outstanding Resources


Process Allocation requests available
R1 R2 R1 R2 R1 R2
P1 2 0 1 1
P2 3 1 0 0 0 0
P3 1 3 0 0
P4 0 1 0 1

i) Draw a resource allocation graph.


[3 marks]
ii) Draw a reduced resource allocation graph.
[2 marks]
iii) Explain your result in (ii) above.
[1 mark]

Question Four
a) Describe how address translation is achieved in partitioned memory management system.
[5 marks]
b) Distinguish between external and internal fragmentation
[4 marks]
c) On a system with 1 MB of memory using the buddy system, the following string of
memory requests apply: 50K, 150K, 90K,130K, 70K, 80K, 120K, 180K, 60K. Determine:

i) The first request that will fail due to lack of memory


ii) The total amount of memory wasted due to internal and external fragmentation.
[5 marks]

Question Five
a) Define the following virtual memory concepts.

i) Working set
ii) Modified bit
iii) Invalid bit
[3 marks]

3
COE 251: Computer Operating Systems Semester I Academic Year: 2018/19

b) Explain how spatial locality and temporal locality affects the performance of the main
memory (Ignore caching and consider only main memory management.)
[4 marks]
c) In pure on-demand paging, a page replacement policy is used to manage system resources.
Suppose that a newly-created process has 3-page frames allocated to it, and then generates
the page references indicated below.

ABCBADABCDABACBD

Determine:
i) The number of page faults that would occur with LRU page replacement.
[4 marks]
ii) The number of page faults that would occur with OPT page replacement.
[3 marks]
Show all your workings.

Question Six
a) On a system that mounts file systems on individual devices into a single file system, a
floppy device has been mounted at point /usr/mount. If the floppy’s file system contains a
file by the name of /data/Jan, what will that file’s name be in the overall file system?
[2 marks]
b) Describe how the physical location of a logical file is derived using contagious allocation.
[4 marks]
c) The design of a File Management System directory structure is one of the most important
aspects in OS file management primitives. Explain how the following factors influence the
design of a directory structure for file management.

i) Efficiency
ii) File naming
[4 marks]
d) Briefly describe linked list as a technique for organizing data blocks for each file in a file
system. Identify the strengths and weaknesses of this technique.
[4 marks]

Question Seven
a) Explain three reasons why input /output management present the greatest challenge to the
operating system.
[6 marks]
b) With the aid of a simple pseudocode, describe polling mode of I/O operation. What does it
seek to achieve?
[4 marks]

4
COE 251: Computer Operating Systems Semester I Academic Year: 2018/19

c) For the following disk accesses, compute the number of head movements for the following
list of seeks to disk cylinder:

26 37 100 14 88 33 99 12

Assume head is initially positioned over 26.

ii) SSTF
iii) SCAN (going up)
[4 marks]

You might also like