Docsity

Operating Systems Exam - Bachelor of Science in Computing - Stage 2, Exams of Cryptography and System Security

Toggle sidebar
bg1
Cork Institute of Technology
Page 1 of 5
Bachelor of Science in Computing – Stage 2
(KCOMP_7_Y2)
Autumn 2008
Operating Systems
(Time: 3 Hours)
Answer ANY FOUR questions.
All questions carry equal marks.
Examiners: Ms. M. Meagher
Ms. A. Brown
Mr. P. Rothwell.
1. (a) List and briefly explain the three types of event that can trigger a process
switch. [3 marks]
Briefly describe the steps involved in process switches. [3 marks]
Sometimes a context switch is done instead of a process switch.
Briefly explain the difference between process and context switches. [4 marks]
(b) Summarise the typical contents of a process control block (PCB). [4 marks]
Briefly explain what the PCB is used for. [2 marks]
(c) With the aid of a diagram, fully describe the ‘fetch-execute’ cycle indicating
when interrupts are handled. [4 marks]
Briefly outline the important steps in interrupt handling. [5 marks]
[Total: 25 marks]
pf3
pf4
pf5

Partial preview of the text

Download Operating Systems Exam - Bachelor of Science in Computing - Stage 2 and more Exams Cryptography and System Security in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science in Computing – Stage 2

(KCOMP_7_Y2)

Autumn 2008

Operating Systems

(Time: 3 Hours)

Answer ANY FOUR questions. All questions carry equal marks.

Examiners: Ms. M. Meagher Ms. A. Brown Mr. P. Rothwell.

  1. (a) List and briefly explain the three types of event that can trigger a process switch. [3 marks] Briefly describe the steps involved in process switches. [3 marks] Sometimes a context switch is done instead of a process switch. Briefly explain the difference between process and context switches. [4 marks]

(b) Summarise the typical contents of a process control block (PCB). [4 marks] Briefly explain what the PCB is used for. [2 marks]

(c) With the aid of a diagram, fully describe the ‘fetch-execute’ cycle indicating when interrupts are handled. [4 marks] Briefly outline the important steps in interrupt handling. [5 marks] [Total: 25 marks]

  1. (a) Given the following skeleton pseudocode complete the ‘wait’ and ‘signal’ methods. class semaphore { int value; ListofProcesses L = new ListofProcesses( );

void wait( ) { //complete this }//end wait method

void signal ( ) { //complete this } //end signal method } //end class semaphore [4 marks]

Based on the code given, briefly explain the semaphore object. [2 marks]

(b) Several proposed software and hardware solutions to the mutual exclusion problem involve ‘busy waiting.’ Explain ‘busy waiting’ in this context. Fully explain how the use of a semaphore avoids the ‘busy waiting’ problem. [4 marks] Using pseudocode, show how a semaphore can be used to solve the general mutual exclusion problem. [4 marks] Clearly indicate the semaphore’s initial value and justify your choice. [2 marks]

(c) Fully describe the producer/consumer problem. In the context of your description clearly explain where the mutual exclusion and synchronisation problems occur. [9 marks] [Total: 25 marks]

  1. (a) With reference to the paged scheme of memory management, use diagrams, examples, and definitions to give full descriptions of : (i) the efficiency of use of physical memory; [5 marks] (ii) address mapping; [6 marks]

(b) What is the ‘resident set’ [2 marks] Fully explain the following terms with respect to resident set management: (i) fixed allocation, variable scope; (ii) variable allocation, global scope; (iii) variable allocation, local scope. [3 marks]

(c) Assuming memory is managed using a paged virtual memory management scheme, outline^ the notion of a page fault and list and briefly describe^ the steps involved in the page fault handling routine. [9 marks] [Total: 25 marks]

  1. (a) Explain the following terms in the context of CPU scheduling: (i) Pre-emptive and non-pre-emptive scheduling algorithms; (ii) CPU-bound and I/O bound processes. [4 marks] Indicate broadly the importance of each of these notions for CPU scheduling. [4 marks] (b) Given the following set of process information, for ONE of the following scheduling algorithms briefly characterise the algorithm and complete the table below: (i) Round Robin (time slice = 2); (ii) First come – First served; (iii) Highest Response Ratio Next [4 marks] Fully explain how you got your answer with the help of a table on graph paper. [5 marks] Proc arrival time service time wait time Turnaround NTT Ratio 0 0 6 1 2 5 2 3 4 (c) Briefly define and give examples of the following categories of criteria for evaluating scheduling algorithms: User oriented, system oriented, performance related, non-performance related. [6 marks] Briefly explain what is meant by ‘processing burst time’ of a process. [2 marks] [Total: 25 marks]
  2. (a)
  1. (a) What is disk scheduling? [2 mark] Why is the performance of disk access seen as highly important? [2 mark]

(b) For the following disk track request queue, diagram and calculate the head movement required under TWO of the following disk scheduling algorithms. Request queue: 176 42 35 54 65 123 98 21 18 167 Where necessary assume that the disk head is initially at track 100, is moving toward track 0, and the maximum track number is 200. [6 marks] (i) Shortest seek time first; (ii) C-Scan; (iii) Look. For both algorithms chosen, briefly discuss their fairness and efficiency. [4 marks]

(c) With the aid of a diagram, summarise^ the operation of the Direct Memory Access (DMA) function. [7 marks] Explain how DMA contributes to the efficiency of disk access operations. [4 marks] [Total: 25 marks]