wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

A section of code that may only be executed by one process at any one time is?

A
CPM
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Critical resource
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Critical region
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Gray code
No worries! We‘ve got your back. Try BYJU‘S free classes today!
E
None of the above
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C Critical region

A section of code that may only be executed by one process at any one time is Critical region

In concurrent programming, concurrent accesses to shared resources can lead to unexpected or erroneous behavior, so parts of the program where the shared resource is accessed are protected. This protected section is the critical section or critical region.

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.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Informal workers
CIVICS
Watch in App
Join BYJU'S Learning Program
CrossIcon