Question:medium

Consider a typical process P in the critical section. Arrange the following statements of code to make a valid general structure.
(A). Critical section
(B). Remainder section
(C). Entry section
(D). Exit section

Show Hint

In the general structure of critical section code, Entry comes before Critical, and Exit comes after Critical, followed by the Remainder section.
Updated On: Mar 7, 2026
  • (C), (B), (A), (D)
  • (C), (A), (B), (D)
  • (C), (A), (D), (B)
  • (C), (B), (D), (A)
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Section Definitions.
- Critical section (C): Accesses shared resources. 
- Entry section (A): Requests access to the critical section. 
- Remainder section (B): Performs other tasks after the critical section. 
- Exit section (D): Manages the exit from the critical section. 
 

Step 2: Correct Sequence. 
A process follows this order for critical section management: 

- Enters Entry section (A) to check conditions. 

- Proceeds to Critical section (C) to access shared resources. 

- Moves to Exit section (D) to release resources. 

- Completes other tasks in the Remainder section (B).

Step 3: Final Order. 
The correct sequence of sections is (A), (C), (D), (B). 

Was this answer helpful?
0