COSC 222
CHUKA UNIVERSITY
UNIVERSITY EXAMINATIONS
SECOND YEAR EXAMINATION FOR THE AWARD OF DEGREE OF BACHELOR
OF SCIENCE IN COMPUTER SCIENCE
COSC 222: OPERATING SYSTEMS
STREAMS: BSC (COMPUTER SCIENCE) Y2S1 TIME: 2 HOURS
DAY/DATE: TUESDAY 11/12/2018 11.30 A.M. – 1.30 P.M.
INSTRUCTIONS:
Answer question ONE in SECTION A and any other TWO questions in SECTION B
Marks are awarded for clear and concise answers
SECTION A
Question One Compulsory - (30 marks)
a) State and briefly explain four major functions of an Operating system. (4 marks)
b) Using a diagram, Explain the abstract view of a computer system. (6 marks)
c) Briefly explain the advantages and disadvantages of batch systems. (6 marks)
d) Within the broad family of operating systems, there are generally four types, categorized
based on the types of computers they control and the sort of applications they support.
Explain the various types of operating systems (4 marks)
e) With the aid of a diagram, explain the various process states that exist in the process of
execution of a program. (6 marks)
f) Differentiate between pre-emptive and non-preemptive scheduling, when it comes to CPU
scheduling (4 marks)
Page 1 of 3
COSC 222
Section B: Select ANY two questions
QUESTION TWO: (20 MARKS)
a) Describe briefly main memory management based on the following: (9 marks)
(i) Paging
(ii) Paged-segmentation
(iii) Relocation and swapping
b) Describe the difference between external and internal fragmentation. Which of the two is
most likely to be an issue on memory management using base and limit registers and
static partitioning? (7 marks)
c) Describe the strategy behind deadlock prevention and give an example of a practical
deadlock prevention method. (4 marks )
QUESTION THREE: (20 MARKS)
The table below shows jobs submitted for execution in a computer system with Time-sharing
Capability
Job Arrival time CPU burst
P1 0 15
P2 2 4
P3 3 1
P4 5 6
P5 6 4
The Arrival Time and CPU burst are in arbitrary units. Using the table
a) Construct Gantt Chart for FCFS,SJF,SRTN and RR (Time slice-3) scheduling algorithms
and work out the average waiting time (12 marks)
b) Which of the algorithms provide optimal values for the Average Waiting Time?
(1 mark)
c) Is the answer to (b) consistent with your expectation? Explain (3 marks)
d) Explain the requirements for mutual exclusion (4 marks)
Page 2 of 3
COSC 222
QUESTION FOUR: (20 MARKS)
a) Explain the term thrashing and state its disadvantages (4 marks)
b) Explain five algorithms used by memory manager to allocate a new created or swapped in
process. (10 marks)
c) Explain the following terms;
(i) Fetch policy
(ii) Placement policy
(iii) Replacement policy (6 marks)
QUESTION FIVE: (20 MARKS)
a) (i) Define the term critical region as used in processing scheduling.(2 marks)
(ii) State the main attributes of a process. (4 marks)
(iii) Explain the role of Process Control Block. (4 marks)
a) For single unit resources, one can model resource allocation and requests as directed
graphs connecting processes and resources. Explain the importance of such graphs and
how they can be used in deadlock detection. (4 marks)
b) The batch systems were marked with major problems during the historical development
of the operating systems; discuss some of these problems and the solutions that were
offered. (6 marks)
---------------------------------------------------------------------------------------------------------------
Page 3 of 3