← BYTES
Unix IPC·Starter·Ref: 15.1.66

What is a 'critical section' in concurrent programming?

Have a question about this video? Mention reference 15.1.66 when you contact us.

a.The part of a program that runs fastest
b.A section of code that accesses shared data and must not be executed by more than one thread at the same time, to avoid a race condition
c.A section of a hard drive reserved for the operating system
d.A section of code that can never contain any bugs
A critical section is any piece of code that touches shared, mutable state in a way that would be unsafe if two threads ran it simultaneously -- exactly what a mutex, spinlock, or semaphore is used to protect, by ensuring only one thread is inside it at a time.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES15166#UnixIPC