Bcn2053 - Operating Systems 21112

6

Click here to load reader

Transcript of Bcn2053 - Operating Systems 21112

Page 1: Bcn2053 - Operating Systems 21112

8/12/2019 Bcn2053 - Operating Systems 21112

http://slidepdf.com/reader/full/bcn2053-operating-systems-21112 1/6

U n i v e r s i t iM a l a y s i aP H N GEngineering Technology Creativity

FACULTY OF COMPUTER SYSTEMS SOFTWARE ENGINEERING

FINAL EXAM INATION

COURSE PERATING SYSTEMS

COURSE CODE

CN2053

LECTURER

MRAN EDZEREIQ KAMARUDIN

DATE JUNE 2012

DURATION HOURS

SESSION SEMESTER : ESSION 2011/2012 SEMESTER II

PROGRAMME CODE :

CN/BCSIBCG

INSTRUCTIONS TO CANDIDATE:

This question paper consists ofFIVE 5) questions Answer ALL questions2 W rite your answers in the answer book let provided3 Answer EAC H question on a new page4 All calculations and assumptions must be clearly shown Calculator is allowed

EXAM INATION REQUIREME NTS:

NONE

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

This exam ination paper consists ofSIX 6) printed pages including the front page

Page 2: Bcn2053 - Operating Systems 21112

8/12/2019 Bcn2053 - Operating Systems 21112

http://slidepdf.com/reader/full/bcn2053-operating-systems-21112 2/6

CONFIDENTIAL CS/BCGIBCN/1 122111BCN2053

STRUCTURED QUESTIONS 8 MARKS]

QUESTION 1

17 Marks]

a) Give THREE 3) main purposes of an operating system?

[3 M arks]

b) Give differences between operating systems for mainframe computers and personal

computers?

[4 M arks]

c) Consider the various definitions of an operating system. Consider whether the operating

system should include applications such as Web browsers and mail programs. Explain both

situation w here:

i) . The operating system should include such applications, and

ii). The ope rating system should be a standalone by itself

[10 Marks]

2

Page 3: Bcn2053 - Operating Systems 21112

8/12/2019 Bcn2053 - Operating Systems 21112

http://slidepdf.com/reader/full/bcn2053-operating-systems-21112 3/6

CONFIDENTIAL CS/BCG/BCN/l 12211/B CN2053

QUESTION 2 15 Marks]

a) Process is defined a s program in execution. IllustrateFIVE 5) process states and explain

what happ ens to a process in each particular state

[ Marks]

b) In order to serve multiple processes simultaneously, process scheduler selects among

available processes for next execution on CPU. These processes how ever are put into queues

by CPU schedulers. Differentiate between long term scheduler and short term scheduler with

example.

[4 Marks]

(c) From a program developer s point of view, system call allows user-level processes to request

services of an operating system. Taking Win32 API as an example of system call, explain

how a programmer uses Win32 API in his program to request services from operating

system.

[6 Marks]

Page 4: Bcn2053 - Operating Systems 21112

8/12/2019 Bcn2053 - Operating Systems 21112

http://slidepdf.com/reader/full/bcn2053-operating-systems-21112 4/6

CONFIDENTIAL CS/BCG/BCN/1 12211fBCN2053

QU STION 3 18 Marks]

a) Most modem operating systems provide features enabling a process to contain multiple

threads of control. This feature is called multithreading. Explain each model with their

advantage and disadvantage.

[9 M arks]

b) Suppose .that following processes arrive for execution at the time indicated:

Process Arrival Time B urst Time

P1 0.0 8

P2 0.4

P3 1.0

With the relevant Gantt chart calculate the average waiting time and turnaround time of the

system in accordance to

i) . FCFS Scheduling algorithm

ii). Preemptive SJF algorithm

iii). Non preem ptive SJF algorithm

[9 M arks]

u

Page 5: Bcn2053 - Operating Systems 21112

8/12/2019 Bcn2053 - Operating Systems 21112

http://slidepdf.com/reader/full/bcn2053-operating-systems-21112 5/6

CONFIDENTIAL CS/BCG/BCN/1 122111BCN2 053

QUESTION 4 7 Marks]

a) Is there any way to im plement a truly stable storage? Explain your answer.

[2 M arks]

b) Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently

serving a request at cylinder 143 and the previous request was at cylinder 125. The queue of

pending request in FIFO o rder is:

86

470

13

774

48

509

022

750

3

Starting from the current head position, illustrate and calculate the total distance in

cylinders) that the disk arm moves to satisfy all the pending requests for each of the

following disk-scheduling algorithms?

i) . SSTF

ii). SCAN

iii). LOOK

[9 Marks]

c) Program threats can be a chieved easily by writing a program that creates a breach of security,

or causing a normal process to change its behavior and creates a breach. Two of the popular

threats are Trojan horse and T rap door. In your own words, describe how both threats work.

[6 Marks]

Page 6: Bcn2053 - Operating Systems 21112

8/12/2019 Bcn2053 - Operating Systems 21112

http://slidepdf.com/reader/full/bcn2053-operating-systems-21112 6/6

CONFIDENTIAL CS/BCG/BCN/1 122111BCN2053

QUESTION 3 Marks]

a) To build a robust distributed system, you must know the types of failures that can occur.

i). List THREE 3) possible types of failures in a distributed system .

[3 M arks]

ii). Specify wh ich of the list in question above are also applicable to a centralized system.

[2 M arks]

b) The requirement of real time operating systems differ from those general-purpose operatingsystems, especially in terms of the acc uracy of the result produced within the system.

i) escribe real time ope rating systems implementation

[3 M arks]

ii) What is the main difficulty that a programmer must overcome in writing an operating

system for a real-time environment?

[4 M arks]

iii) Name an application that uses real time operating system

[1 M arks]

END OF QUESTION PAPER