Critical Section - Operating Systems - Old Exam, Exams of Operating Systems

These are the Old Exam of Operating Systems which includes Secrecy of Users, Passwords, Environmental Variable Path, Partitioning a Disk, Criteria for File Organisation etc. Key important points are: Critical Section, Physical Divide, Process Control Block, Process Switch, Critical Section, Critical Resource

Typology: Exams

2012/2013

Uploaded on 03/25/2013

digvijay
digvijay 🇮🇳

4.4

(17)

185 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1 of 5 OPSY S2001
Cork Institute of Technology
Bachelor of Science in Computing – Stage 2
(KCOMP_7_Y2)
Summer 2008
Operating Systems
(Time: 3 Hours)
Answer any FOUR questions.
All questions carry equal marks.
Examiners: Mr. P. Rothwell
Ms. M. Meagher
Ms. A. Brown
1. (a) The three major goals of an operating system are: convenience of use,
efficiency and fairness, and expandability. Briefly discuss, each of
these goals with the help of examples drawn from any aspect of
operating systems. [6 marks]
With the aid of an example, comment on the significance of the
logical/physical divide from the point of view of the programmer.
[4 marks]
(b) Briefly outline the role of the process control block (PCB). [3 marks]
Summarise the typical contents of a PCB. [4 marks]
(c) List and briefly explain the steps involved in a process switch.
[5 marks]
Briefly distinuish between a process switch and a context switch.
[3 marks]
[Total: 25 marks]
pf3
pf4
pf5

Partial preview of the text

Download Critical Section - Operating Systems - Old Exam and more Exams Operating Systems in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science in Computing – Stage 2

(KCOMP_7_Y2)

Summer 2008

Operating Systems

(Time: 3 Hours)

Answer any FOUR questions. All questions carry equal marks.

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

  1. (a) The three major goals of an operating system are: convenience of use, efficiency and fairness, and expandability. Briefly discuss, each of these goals with the help of examples drawn from any aspect of operating systems. [6 marks]

With the aid of an example, comment on the significance of the logical/physical divide from the point of view of the programmer. [4 marks]

(b) Briefly outline the role of the process control block (PCB). [3 marks] Summarise the typical contents of a PCB. [4 marks]

(c) List and briefly explain the steps involved in a process switch. [5 marks] Briefly distinuish between a process switch and a context switch. [3 marks] [Total: 25 marks]

  1. (a) Briefly outline the general mutual exclusion problem and give an example to illustrate where it occurs. [5 marks] Clearly explain the terms critical section and critical resource. [2 marks]

(b) Given the following skeleton pseudocode complete the ‘wait’ and ‘signal’ methods. [4 marks] 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

Using pseudocode, explain 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] Explain why the wait and signal operations must be atomic and indicate how this can be achieved. [2 marks]

(c) Fully describe the producer/consumer problem. In the context of your description clearly explain the synchronisation problem. [6 marks] [Total: 25 marks]

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

(b) Fully explain the following terms with respect to resident set management: (i) fixed allocation, local scope; (ii) variable allocation, global scope; (iii) variable allocation, local scope. [3 marks] Briefly explain and comment upon each of the following characteristics that may be taken into account in the choice of a victim page when replacing a page in virtual memory management: recency, age, frequency, modify/dirty bit. [8 marks]

(c) Assuming memory is managed using a paged virtual memory management scheme, outline the notion of a page fault. [2 marks] List and briefly describe the steps involved in the page fault handling routine. [3 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 = 4); (ii) Highest Response Ratio Next; (iii) Shortest remaining time. [5 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 1 8 2 3 2 (c) Fully explain a typical Multi-level Feedback scheduling arrangement [7 marks] [Total: 25 marks]

  1. (a) Why is the performance of disk access seen as highly important? [2 marks] With the aid of a diagram, briefly describe the structure of a hard disk and fully explain the meaning of the terms seek time, latency, and transfer time. [4 marks]

(b) For the following disk track request queue, diagram (on graph paper) and calculate the head movement required under TWO of the following disk scheduling algorithms. Request queue: 27 129 110 186 147 41 10 64 120 Where necessary assume that the disk head is initially at track 100, is moving toward track 0, and maximum track number is 200. [6 marks] (i) First-in First-out; (ii) C-Scan; (iii) Look. For both algorithms chosen, briefly discuss their fairness and efficiency. [4 marks]

(c) Fully describe the operation of the Direct Memory Access (DMA) function. [6 marks] Explain how the use of DMA increases the efficiency of the CPU use. [3 marks] [Total: 25 marks]