

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Os Exam From beginning all the way to processes
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Page 1 of 2
a. Explain interrupts and traps, and provide a detailed account of how the operating system handles an interrupt. [5 marks] b. Define context switching. Outline all the activities of context switching. [5 marks] c. Define the five (5) states of a process. Draw the process state diagram from its creation to termination, including all transitions, and briefly describe every state and every transition. [5 marks] d. A good solution to the critical section problem must satisfy the three conditions; mutual exclusion, progress and bounded waiting. Both progress and bounded waiting involve some form of waiting. Differentiate the waiting in progress and bounded waiting. [5 marks]
Page 2 of 2
a. Describe the Producer/Consumer problem. [5 marks] b. Describe the problems associated with producing a software solution to the producer/consumer problem. [5 marks] c. Show a possible solution to the above problem, stating any assumptions that you make [5 marks] d. Define the meaning of a race condition. Using an execution sequence illustrate how a race condition can occur. [5 marks] QUESTION THREE a) Describe the following scheduling algorithms: i) Non-preemptive First Come First Serve [2 marks] ii) Round Robin [2 marks] iii) Shortest Job First [2 marks] b) Given the following processes and burst times, Process Burst Time P1 10 P2 6 P3 23 P4 9 P5 31 P6 3 P7 19 Calculate the average wait time when each of the above algorithms is used. Assume that a quantum of 8 is being used. [10 marks] c) Giving reasons, which scheduling algorithm as an operating systems designer would you implement? [4 marks]