A critical section is a program segment
(A) which should run in a certain amount of time
(B) which avoids deadlocks
(C) where shared resources are accessed
(D) which must be enclosed by a pair of semaphore operations P and V
Explanation: 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 .
So, option (C) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.