0
2.3kviews
What are the problems associated with critical region? How to overcome the problems using semaphore?

Mumbai University > Information Technology > Sem5 > Operating System

Marks: 10M

Year: May 15

1 Answer
0
4views
  • A 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.

Structure of process

{ Do

enter image description here

} while (TRUE)

A solution to the critical-section problem must satisfy the following three requirements:

a) Mutual Exclusion: If process Pi is executing in its critical section, then no other processes can be executing in their critical sections.

b) 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.

c) 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.

Please log in to add an answer.