Bcn2053 - Operating Systems 11213

6
Universiti Malaysia PAHANG Engineering • Technology • Creativity FACULTY OF COMPUTER SYSTEMS & SOFTWARE ENGINEERING FINAL EXAMINATION COURSE : OPERATING SYSTEMS COURSE CODE : BCN2053 LECTURER : IMRAN EDZEREIQ KAMARUDIN DATE : 10 JANUARY 2013 DURATION 3 HOURS SESSION/SEMESTER : SESSION 2012/2013 SEMESTER I PROGRAMME CODE : BCN/BCS/BCG INSTRUCTIONS TO CANDIDATE: 1. This question paper consists of Four (4) questions. Answer ALL questions. 2. Write your answers in the answer booklet provided. 3. Answer EACH question on a new page. 4. All calculations and assumptions must be clearly shown. Calculator is allowed EXAMINATION REQUIREMENTS: NONE DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO This examination paper consists of Six (6) printed pages including the front page.

description

...

Transcript of Bcn2053 - Operating Systems 11213

Page 1: Bcn2053 - Operating Systems 11213

Universiti Malaysia PAHANG Engineering • Technology • Creativity

FACULTY OF COMPUTER SYSTEMS & SOFTWARE ENGINEERING

FINAL EXAMINATION

COURSE : OPERATING SYSTEMS

COURSE CODE : BCN2053

LECTURER : IMRAN EDZEREIQ KAMARUDIN

DATE : 10 JANUARY 2013

DURATION 3 HOURS

SESSION/SEMESTER : SESSION 2012/2013 SEMESTER I

PROGRAMME CODE : BCN/BCS/BCG

INSTRUCTIONS TO CANDIDATE:

1. This question paper consists of Four (4) questions. Answer ALL questions. 2. Write your answers in the answer booklet provided. 3. Answer EACH question on a new page. 4. All calculations and assumptions must be clearly shown. Calculator is allowed

EXAMINATION REQUIREMENTS:

NONE

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

This examination paper consists of Six (6) printed pages including the front page.

Page 2: Bcn2053 - Operating Systems 11213

CONFIDENTIAL

BCN1BCS/BCG/12131/BCN2053

QUESTION 1

a) An operating systems can be standalone (for example Unix) or could include some

applications such as web browser and mail programs (for example Windows & and Ubuntu).

Explain the following situations where:

i. The Operating System should include such applications, and

ii. The Operating system should be a standalone by itself

[6 Marks]

b) Imagine an operating system that does not perform memory deallocation. Investigate FOUR

(4) unfortunate outcomes that would result and explain your answer.

[4 Marks]

c) Given the following information

Job List:

Job number Memory Requested Memory Block Memory Block Size

Job 1 690K Block 1 900K

Job 275K Block 910K

Job 3 760K Block 3 300K

i. Using the best-fit algorithm, indicate which memory blocks are allocated to each of

the three arriving jobs.

ii. Using the first-fit algorithm, indicate which memory blocks are allocated to each of

the three arriving jobs.

iii. Based on the findings above, which algorithm is more efficient? Explain your answer.

[8 Marks]

Page 3: Bcn2053 - Operating Systems 11213

CONFIDENTIAL

BCN/BCSIBCG/121311BCN2053

d) In some systems, a subdirectory can be read and written by an authorized user like ordinary

files

i. What problem can arise from this situation?

ii. Suggest a scheme for dealing with the protection problem above.

[2 Marks]

QUESTION 2

a) Explain the fundamental differences between interactive, batch, real-time, and embedded

systems.

[4 Marks]

b) What are the main differences between operating systems for mainframe computers and

personal computers?

[4 Marks]

c) Compare and contrast internal fragmentation and external fragmentation. Explain the

circumstances where one might be preferred over the other.

[4 Marks]

d) Given that main memory is composed of three page frames for public use and that a program

requests pages in the following order:

a,d,b,a,f,b,e,c,g,f,b,g

i. Using the FIFO page removal algorithm, illustrate a page trace analysis indicating

page faults with asterisks (*). Then compute the failure and success ratios.

ii. Using the LRU page removal algorithm, illustrate a page trace analysis and compute

the failure and success ratios

[8 Marks]

3

Page 4: Bcn2053 - Operating Systems 11213

CONFIDENTIAL BCNIBCSIBCG/121311BCN2053

QUESTION 3

a) Describe context switching and identify the process information that needs to be saved,

changed, or updated when context switching takes place?

[3 Marks]

b) Given the following information:

Job Arrival Time CPU cycle

A 0 10

B 2 12

C 3 3

D 6 1

E 9 15

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

system in accordance to:

i. Non preemptive SJF algorithm

ii. Preemptive SJF algorithm

iii. Round Robin (Time Quantum = 5)

[9 Marks]

rd

Page 5: Bcn2053 - Operating Systems 11213

CONFIDENTIAL

BCNIBCS/BCG/121311BCN2053

c) Consider the directed resource graph shown in above, and answer the following questions.

i. Identify all of the deadlocked processes.

ii. Can the deadlock be resolved without selecting a victim? Explain your answer

iii. Which requests by the three processes for resources from R2 would you satisfy to

minimize the number of processes involved in the deadlock?

iv. Conversely, which requests by the three processes for resources from R2 would

you satisfy to maximize the number of processes involved in deadlock?

[8 Marks]

QUESTION 4

a) Distinguish the differences between CSMAICD and CSMAICA. Provide one example for

each access control technique.

[4 Marks]

5

Page 6: Bcn2053 - Operating Systems 11213

CONFIDENTIAL

BCNIBCSIBCG/121311BCN2053

b) Suppose that a disk drive has 200 cylinders, numbered 0 to 199. The drive is currently

serving a request at cylinder 98, and the previous request was at cylinder 53. The queue of

pending request in FIFO order is:

98 183 37 122 14 124 65 67

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 (assuming arm movement towards the beginning of disk)

(iii) C-SCAN (assuming arm movement towards the end of disk)

[9 Marks]

(c) Many users are required to log into several networks and thus have multiple passwords,

which are difficult to remember.

i. Select THREE (3) ways that a user can manage these password requirements and

compare the advantages and disadvantages of each.

ii. Based on the selection above, decide which one you would recommend to

implement when you need to log into several networks with multiple passwords.

[7 Marks]

END OF QUESTION PAPER