Unit II Process Management Upc Questions - Final
Unit II Process Management Upc Questions - Final
1. a) What is a process? How does the OS maintain information about a process. Explain the
various states in which a process can be using a process state transition diagram.
b) Describe the actions taken by a kernel to switch context between processes.
2. a) Consider the following set of processes, with the length of the CPU burst time and arrival
time in milliseconds.
Draw Gantt charts illustrating execution of these processes using (i) FCFS (ii) SJF preemptive (iii) Non
preemptive SJF (iv) Priority (preemptive and low value implies high priority) and (v) Round Robin
(Quantum = 1) scheduling. Calculate the waiting time and turnaround time of the scheduling
algorithms.
b) What is a critical section? What are the requirements that a solution to a critical section problem
should satisfy? Give and explain a two-process solution that satisfies all the above requirements.
3. i) Explain the multithread models in threads and discuss the various issues in threads.
ii) Explain how mutual exclusion is achieved using Test-and-set instruction.
4. a) Explain classic problems of process synchronization.
b) A dentist has a consultancy room in his residence. The room can accommodate ten patients
maximum. The doctor goes to adjacent hall if no patients are waiting. The patients also go
back if all ten chairs are occupied. If the doctor is available and there are free chairs the patient
occupies one chair. If the doctor is in the adjoining hall, patient calls him for consultancy. Write
an algorithm to synchronize both doctor and patient.
5. What is a monitor? Write a monitor solution to dining philosopher problem and discuss.
6. (a) Draw a resource-allocation-graph for the scenario given below:
Set of resources: {R1, R2, R3, R4, R5}
Set of processes: (P1, P2, P3, P4, P5}
R1 is allotted to P2 and requested by P1; R2 is allotted to P1 and requested by P4;
R3 is allotted to P5 and requested by P2; R4 is allotted to P3 and requested by P2;
Provide the corresponding wait-for-graph and comment on the presence of deadlock. (6)
b) Consider the following snapshot of a system: (7)