Question:

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: Sep 25, 2025
  • (C), (B), (A), (D)
  • (C), (A), (B), (D)
  • (C), (A), (D), (B)
  • (C), (B), (D), (A)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understanding the sections. 
- **Critical section** (C): This is the section where the process accesses shared resources. 
- **Entry section** (A): This is the section before the critical section, where the process requests entry. 
- **Remainder section** (B): The section after the critical section, where the process releases the resource and performs other tasks. 
- **Exit section** (D): This section handles the exit process from the critical section. 
 

Step 2: Arrange the sections correctly. 
To form a valid structure for a process in the critical section: 

- The process first enters the **Entry section** (A), checks for any conditions (if needed), and then moves to the **Critical section** (C). 

- After completing its task in the **Critical section**, the process moves to the **Exit section** (D) to release the resource. 

- Finally, the process moves to the **Remainder section** (B) for other tasks.

Step 3: Conclusion. 
The correct order of statements is **(C), (B), (A), (D)**. 
 

Was this answer helpful?
0
0

Questions Asked in CUET PG exam

View More Questions