When a process is executed in a critical section, then no other process can be executed in their critical section. It consists of a single process temporarily excluding all others from using a shared resource in a way that guarantees the integrity of the system. It assures that when one thread is functioning read or write operation, then others avoided to doing the same on shared data.
There are four conditions applied on mutual exclusion. These are the following:
- Mutual exclusion must be guaranteed between the different processes when accessing the shared resource. There cannot be two processes within their respective critical sections at any time.
- No assumptions should be made as to the relative speed of the conflicting processes.
- No process that is outside its critical section should interrupt another for access to the critical section.
- When more than one process wants to enter its critical section, it must be granted entry in a finite time, that is, it will never be kept waiting in a loop that has no end.
What did you think?
Similar Reads
-
Advantages and Disadvantage of User level and Kernel Level Threads
User-Level Threads Advantages of User-Level Threads Speed and Efficiency: Operations such as thread creation, switching, and destruction are faster because… -
Difference Between User-level and kernel-level thread
User-level and kernel-level threads represent two approaches to thread management in operating systems. Both have some differences Difference Between User-level… -
What is Deadlock in OS? Explain with the help of a diagram.
A deadlock is a condition where each of the processes is waiting for a resource which is allotted to other… -
Preemptive and Non-Preemptive Algorithm in Operating System
Preemptive Scheduling Algorithm Here, a scheduler can preempt a running low-priority process at any time when a high-priority process enters… -
CPU scheduling algorithms Criteria in Operating System
There are different criteria for the CPU scheduling algorithm. CPU scheduling algorithms Criteria are CPU utilization: The main purpose of… -
Sleeping Barber Problem of Synchronization in Operating System
It is a synchronization and inter-process communication problem. This problem is based on a barbershop. A barbershop has a single… -
Reader-Writer Problem in Operating System with Code
The readers and writers problem based on an object like a file which is shared in different processes. Some processes… -
Discuss the Classical problem of synchronization
Using semaphores for synchronization is the traditional way to present the solutions. There are four types of the classical problem… -
Semaphore in Operating System and its types
A semaphore is simply an integer variable that is shared between multiple threads. We can also say A semaphore is… -
Critical Section Problem in Operating System
A contention situation arises if two independent programs or processes want to access common data, and this can lead to…