Docsity

Operating Systems Examination 2010/11 - Operating Systems (SOFT 7006), Exams of Computer Science

Toggle sidebar
bg1
1
CORK INSTITUTE OF TECHNOLOGY
INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ
Semester 1 Examinations 2010/11
Module Title: Operating Systems
Module Code: SOFT 7006
School: Mathematics & Computing
Programme Title:
Bachelor of Science (Honours) in Software Development – Year 3
Bachelor of Science (Honours) in Software Development & Computer Networking – Year 2
Programme Code: KSDEV_8_Y3
KDNET_8_Y2
External Examiner(s): Mr. Aidan.F. Quilligan
Internal Examiner(s): Mr. G. McSweeney
Instructions: Answer four questions. All questions are worth equal marks.
Duration: 2 Hours
Sitting: Winter 2010/11
Requirements for this examination:
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the
correct examination.
If in doubt please contact an Invigilator.
pf3
pf4
pf5

Partial preview of the text

Download Operating Systems Examination 2010/11 - Operating Systems (SOFT 7006) and more Exams Computer Science in PDF only on Docsity!

CORK INSTITUTE OF TECHNOLOGY

INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ

Semester 1 Examinations 2010/

Module Title: Operating Systems

Module Code: SOFT 7006

School: Mathematics & Computing

Programme Title: Bachelor of Science (Honours) in Software Development – Year 3 Bachelor of Science (Honours) in Software Development & Computer Networking – Year 2

Programme Code: KSDEV_8_Y KDNET_8_Y

External Examiner(s): Mr. Aidan.F. Quilligan Internal Examiner(s): Mr. G. McSweeney

Instructions: Answer four questions. All questions are worth equal marks.

Duration: 2 Hours

Sitting: Winter 2010/

Requirements for this examination:

Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination. If in doubt please contact an Invigilator.

Q 1. (a) Explain what is meant by deadlock. (3 Marks) (b) List the four conditions necessary for deadlock to occur. (4 Marks) (c) Outline two different types of approaches to Deadlock Avoidance. ( 4 Marks) (d) What is meant by a safe state? (2 Marks) Consider the following system which is characterised by the Total Resource Vector and Current Resource allocation shown below.

Total Resource Vector R1 R2 R 5 3 5

Current Resource Allocation R1 R2 R P1 1 1 1 P2 2 0 2 P3 1 1 0 P4 1 1 1

(e) Calculate the current Available Resource Vector for the system. (2 Marks) (f) The following matrix describes the Total Resource Claims for each of the current processes. Is the system currently in a safe state? (6 Marks)

Total Resource Claims R1 R2 R P1 5 2 5 P2 2 1 3 P3 1 1 1 P4 4 1 2

(g) Describe four possible strategies of dealing with deadlock once it is detected. (4 Marks)

Q 3.

(a) The following is part of the output of the ps – l command on a Linux system. UID PID PPID TTY TIME CMD 109 11986 11984 pts/6 0:00 sh 109 11993 11986 pts/6 0:00 bash 109 12049 11993 pts/6 0:00 ksh

What do UID, PID, PPID and TTY mean? What would happen if the command kill - 11986 was entered? ( 6 Marks ) (b) What is the difference between pre-emptive and non pre-emptive scheduling algorithms? Give an example of each. ( 3 Marks ) (c) Consider the following set of processes with arrival times and service times given in milliseconds. Process Name Arrival Time

Service Time A 0 3 B 2 7 C 4 4 D 6 6

Draw a timeline to show the execution of each of these processes for the following scheduling algorithms:  Shortest Remaining Time  Multi-level Feedback

For each algorithm, calculate the Turnaround Time and the Normalised Turnaround Time for each process. For Multilevel Feedback Queue with queues numbered 1-4, quantum = 2i, where i is the queue level number and processes are initially placed in the first queue (i.e., level 1). ( 16 Marks )

Q 4.

(a) In the context of memory management, what is meant by the term paging? ( 2 Marks ) (b) How is virtual paging different from simple paging? ( 2 Marks ) (c) What is meant by the term thrashing? ( 2 Marks ) (d) Write down three requirements for virtual memory to be practical. ( 3 Marks ) (e) Page table entries may contain a number of control bits. Name two of these control bits and explain their purpose. ( 4 Marks ) (f) With the aid of a diagram, describe how the Translation Lookaside Buffer is used to improve the speed of virtual address translation. ( 7 Marks ) (g) What is a page fault? ( 2 Marks ) (h) What are the principal steps in page fault handing? ( 3 Marks )

Q 5.

(a) What is concurrency? ( 2 Marks ) (b) Sharing global resources is a potential difficulty with concurrency. List two other potential difficulties with concurrency. ( 2 Marks ) (c) Describe using an appropriate example, how sharing a global resource can cause problems. ( 4 Marks ) (d) In the context of concurrency, what is meant by starvation? ( 2 Marks ) (e) What is the critical section and what is its purpose? ( 3 Marks ) (f) What are the principal requirements for mutual exclusion? ( 5 Marks ) (g) Consider the following ‘busy waiting’ attempt for a mutual exclusion algorithm. Explain why this algorithm does not guarantee mutual exclusion.

/*Process0 / while (flag[1]) do {/ nothing /} flag[0] = true; /critical section */ flag[0] = false;

/*Process1 / while (flag[0]) do {/ nothing /} flag[1] = true; /critical section */ flag[1] = false;

( 7 Marks )