Вы находитесь на странице: 1из 5

CONFIDENTIAL CS/APR 2010/CSC520/ITC520

UNIVERSITI TEKNOLOGI MARA


FINAL EXAMINATION

COURSE PRINCIPLES OF OPERATING SYSTEMS /


OPERATING SYSTEMS CONCEPT
COURSE CODE CSC520/ITC520
EXAMINATION APRIL 2010
TIME 3 HOURS

INSTRUCTIONS TO CANDIDATES

1. This question paper consists of two (2) parts : PART A (10 Questions)
PART B (3 Questions)

2. Answer ALL questions in the Answer Booklet. Start each answer on PART B on a new
page.

3. Do not bring any material into the examination room unless permission is given by the
invigilator.

4. Please check to make sure that this examination pack consists of:

i) the Question Paper


ii) an Answer Booklet - provided by the Faculty

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO


This examination paper consists of 5 printed pages
© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL
CONFIDENTIAL 2 CS/APR 2010/CSC520/ITC520

PART A (40 MARKS)

Answer ALL Questions.

QUESTION 1

Explain the idea of resource abstraction in computer system.


(4 marks)

QUESTION 2

a) What is mode bit?


(2 marks)

b) Why is it necessary to have mode bit?


(2 marks)

QUESTION 3

Briefly explain TWO (2) type of information kept in file descriptor.


(4 marks)

QUESTION 4

The most critical part of the Operating System is a kernel. Briefly explain how to implement
the kernel.
(4 marks)

QUESTION 5

What would happen if a system allows many processes to be placed in main memory,
without dividing the memory into partitions?
(4 marks)

QUESTION 6

Define a modern process.

(4 marks)

QUESTION 7

How is the functionality provided by the file manager related to virtual memory?
(4 marks)
QUESTION 8

Describe the relationship between a modern process and threads.


(4 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 3 CS/APR 2010/CSC520/ITC520

QUESTION 9

A memory manager for a variable-sized region strategy has a free list of blocks of size 2600,
1400, 1000, 2200, 1600 and 1050 bytes. A list of request for the free list arrived in order,
1603, 349, and 949. By using best fit approach, draw a memory diagram to show the
placement of the request.
(4 marks)

QUESTION 10

Briefly explain the purpose of the Operating System based on Figure 1.

Figure 1: Purpose of Operating System


(4 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 4 CS/APR2010/CSC520/ITC520

PART B (60 MARKS)

Answer ALL Questions.

QUESTION 1

a) Briefly explain TWO (2) performance metrics for comparing scheduling strategies.
(4 marks)

b) What is the goal of Round Robin scheduling?


(2 marks)

c) What is the effect of increasing the time quantum to a very large number for Round
Robin scheduling?
(4 marks)

d) Assume that you have the following jobs to execute with one processor:

Process Burst Time Arrival Time


P0 80 0
P1 20 15
P2 10 15
P3 20 60
P4 50 65

Suppose a system uses Round Robin scheduling with a quantum of 15.

i. Create a Gantt chart to illustrate the execution of these processes.


(5 marks)

ii. What is the turnaround time for process P2?


(2 marks)

iii. What is the average waiting time for all the processes?
(3 marks)

QUESTION 2

a) How does the virtual memory work?


(7 marks)

b) State the major advantage of virtual memory scheme.


(3 marks)

c) Suppose R = 3, 2, 4, 3, 4, 2, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4. 5, 6, 2, 1 is a page reference


stream. Given a frame of 3 and assuming the primary memory is initially unloaded. How
many page faults will the given reference stream incur under Least Recently Used
(LRU)?
(5 marks)
© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL
CONFIDENTIAL 5 CS/APR 2010/CSC520/ITC520

d) Using reference stream, R in d), apply Least Frequently Used (LFU) algorithm and
compare the number of page fault.
(5 marks)

QUESTION 3

a) Briefly explain the necessary condition for a deadlock to exist.


(8 marks)

b) What is safe state?


(2 marks)

c) Two processes, p0 and p^ compete for two units of the single resource type, a0 and a^.
Assume a process may request only one unit of the resource at a time and cannot ask
for a cumulative total of more than two units, since there are only two units in the
system. smn refers to the state in which p0 is in sm and pi is in sn. State s0Q represents the
case in which the process neither holds nor requests any unit of the resource.

Possible state transition from s0o is by a request, r, on the resource. The requests are
designated by r0 and n. This request will cause the system to move to state s01,
representing the case in which the process still holds no resources but now needs one
unit. The transition to s02 is possible when acquires a unit of the resource, a-i. From s02,
two transitions are possible. Either the process may release the resource, thus changing
to Soo or the process may request a second unit of the resource, causing the new state to
be s03, where the process holds one unit of the resource and needs another. Removing
a resource from the process is designated by d 0 for r0 and d-t for r-[. Several states from
the "cross product" are not feasible such as s44, which is impossible. Therefore, several
states from the cross product have been eliminated from the diagram.

Based on the above description, identify safe, unsafe and deadlock states in the states
diagram in Figure 2.

Figure 2: State diagram


(10 marks)

END OF QUESTION PAPER


© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL

Вам также может понравиться