CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
3
You visited us 3 times! Enjoying our articles? Unlock Full Access!
Question

Critical section is a program segment

A
which should run in a certain specified amount of time
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
which avoids deadlock
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
where shared resources are accessed
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
which must be endorsed by pair of semaphore operation P and v
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C where shared resources are accessed

Critical section is a program segment where shared resources are accessed.

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. It cannot be executed by more than one process at a time.

Critical section:-

A Critical Section is the part of a program that accesses shared resources. Only when a process is in its Critical Section can it be in a position to disrupt other processes. We can avoid race conditions by making sure that no two processes enter their Critical Sections at the same time.



flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
State Legislature
CIVICS
Watch in App
Join BYJU'S Learning Program
CrossIcon