Process Scheduling-2
Process Scheduling-2
Process Scheduling
The OS uses scheduling algorithms to manage process execution efficiently. There
are three main types of schedulers:
C. Medium-Term Scheduler
Swaps processes in and out of memory to optimize CPU usage.
Shortest Job Next (SJN) – The process with the shortest execution time runs first.
Priority Scheduling – The process with the highest priority runs first.
8. Process Synchronization
When multiple processes run concurrently, synchronization is needed to avoid race
conditions. Synchronization mechanisms include:
🔹 Semaphores – Used to control access to shared resources.
🔹 Mutex (Mutual Exclusion) – Allows only one process at a time to access a
resource.
🔹 Monitors – High-level synchronization mechanism.
9. Deadlocks in Processes
A deadlock occurs when two or more processes are waiting for resources that are
held by each other, preventing further execution.
10. Conclusion
Processes are a crucial part of an OS, enabling multitasking and efficient resource
utilization. The OS manages processes using scheduling, synchronization, and
communication techniques to ensure smooth system operation.