Question

A critical section in multithreaded programming is a code segment that:

A Can be executed by multiple threads simultaneously without any issues.
B Must be executed by only one thread at a time to prevent race conditions.
C Contains only I/O operations and no shared data.
D Is protected by a semaphore with an initial value greater than 1.
E Is always executed in kernel mode.
Practice Next

Hey! Ask a query