Unit 2 Oss
Unit 2 Oss
Process Concept – Process Scheduling – Operation on Processes, Inter-process Communication – Threads – Overview –
Multithreading models – Threading issues; CPU Scheduling – Scheduling criteria, Scheduling algorithms; Process
Synchronization – critical-section problem, Synchronization hardware, Mutex locks, Semaphores, Critical regions, Monitors;
Deadlock – System model, Deadlock characterization, Methods for handling deadlocks, Deadlock prevention, Deadlock
avoidance, Detection, Recovery.
1. Process Concept
Question: Explain the process states and Process Control Block.
Answer Structure:
o New
o Ready
o Running
o Waiting
o Terminated
• Draw Diagram:
• Explain PCB:
o Process ID
o Registers
o Program Counter
o I/O status
o Accounting info
Answer Structure:
o FCFS
o Priority Scheduling
o Round Robin
Answer Structure:
• Types:
o Shared Memory
o Message Passing
o Pipes / Sockets
• Operations on Processes:
o Create (fork())
o Execute (exec())
o Terminate (exit())
o Wait (wait())
Answer Structure:
• Models:
o Many-to-One
o One-to-One
o Many-to-Many
(Draw diagrams with arrows between user & kernel threads)
5. Process Synchronization
Answer Structure:
• Conditions:
o Mutual Exclusion
o Progress
o Bounded Waiting
• Solutions:
o Semaphores:
▪ wait(), signal()
Answer Structure:
• 4 Necessary Conditions:
o Mutual Exclusion
o No Preemption
o Circular Wait
• Handling Methods:
• Draw at least one diagram (process state, thread model, Gantt chart).
• Write at least 1 example or table (e.g., SJF Gantt chart or Banker’s table).