Critical section problem

Critical Section Problem:
1. Each process in a system has a segment of code, called a critical section, in which the process may be changing common variables, updating a table, writing a file, and so on.
2. When one process is executing in its critical section, no other process is to be allowed to execute in its critical section is known as critical-section problem.
3. Each process must request permission to enter its critical section and the code implementing this request is the entry section.
4. The critical section is followed by an exit section and the remaining code is the remainder section.

 

A solution to the critical-section problem must satisfy the following three requirements:
I) Mutual Exclusion:
 If process Pi is executing in its critical section, then no other processes can be executing in their critical sections.
II) Progress:
 If no process is executing in its critical section and there exist some processes that wish to enter their critical section.
 Then only those processes that are not executing in their remainder sections can participate in the decision on which will enter its critical section next, and this selection cannot be postponed indefinitely.
III) Bounded Waiting:
 There exists a bound, or limit, 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.

Contributor's Info

Created:
0Comment