written 6.9 years ago by | modified 2.9 years ago by |
Subject: Operating System
Topic: PROCESS COORDINATION
Difficulty: Hard
written 6.9 years ago by | modified 2.9 years ago by |
Subject: Operating System
Topic: PROCESS COORDINATION
Difficulty: Hard
written 6.7 years ago by |
Critical Section is a code segment that accesses shared variables and has to be executed as an atomic action.
It means that in a group of cooperating processes, at a given point of time, only one process must be executing its critical section. If any other process also wants to execute its critical section, it must wait until the first one finishes.
A solution to the critical-section problem must satisfy the following three requirements:
Mutual Exclusion:
If process Pi is executing in its critical section, then no other processes can be executing in their critical sections.
Progress:
If no process is executing in its critical section and there exist some processes that wish to enter their critical section, then the selection of the processes that will enter the critical section next cannot be postponed indefinitely.
Bounded Waiting:
A bound must exist on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.