0% found this document useful (0 votes)
15 views2 pages

Unit II Process Management Upc Questions - Final

Unit II of the document covers process management, including concepts of processes, scheduling algorithms, inter-process communication, and synchronization issues. It discusses critical-section problems, deadlock handling methods, and provides exercises on process scheduling and synchronization algorithms. Additionally, it explores multithreading models, monitors, resource allocation graphs, and the Banker's algorithm for deadlock detection and prevention.

Uploaded by

5G Fiber
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Unit II Process Management Upc Questions - Final

Unit II of the document covers process management, including concepts of processes, scheduling algorithms, inter-process communication, and synchronization issues. It discusses critical-section problems, deadlock handling methods, and provides exercises on process scheduling and synchronization algorithms. Additionally, it explores multithreading models, monitors, resource allocation graphs, and the Banker's algorithm for deadlock detection and prevention.

Uploaded by

5G Fiber
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIT II PROCESS MANAGEMENT

Processes - Process Concept - Process Scheduling - Operations on Processes - Inter-process


Communication; CPU Scheduling - Scheduling criteria - Scheduling algorithms: Threads - Multithread
Models – Threading issues; Process Synchronization - The Critical-Section problem - Synchronization
hardware – Semaphores – Mutex - Classical problems of synchronization - Monitors; Deadlock -
Methods for handling deadlocks, Deadlock prevention, Deadlock avoidance, Deadlock detection,
Recovery from deadlock.

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.

Process Burst time Priority Arrival time


P1 10 3 0
P2 1 1 8
P3 2 5 10
P4 1 4 12
P5 5 2 13

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)

Maximum Allocation Available


A B C D A B C D A B C D
P1 3 3 2 2 1 2 2 1 3 1 1 2
P2 1 2 3 4 1 0 3 3
P3 1 1 5 0 1 1 1 0

Answer the following questions using the Banker's algorithm:


i. Provide the content of the matrix Need.
ii. Is the system in a safe state? Provide all the necessary calculations to support your
answer.
iii. If the maximum request of process P1 changes to (3, 4, 3, 2), will the state of the
system change? Provide all the necessary calculations to support your answer.
7. Explain about deadlock prevention and recovery mechanisms.
8. What are the inter process communication mechanisms supported in a typical Operating
System?

You might also like