Question 26
Which type of thread is managed entirely by a user-level library?
User-level threads are managed by a user-space thread library rather than directly by the kernel.
Which type of thread is managed entirely by a user-level library?
User-level threads are managed by a user-space thread library rather than directly by the kernel.
Which problem can occur when multiple threads access shared data without synchronization?
A race condition occurs when the result depends on the timing of concurrent accesses to shared data.
A critical section is a part of a program where:
Critical sections require synchronization to prevent inconsistent shared-state updates.
Which synchronization primitive is commonly used to control access to a critical section?
A mutex provides mutual exclusion so that only one thread enters a protected critical section at a time.
A semaphore initialized to 1 can commonly be used as:
A semaphore with values restricted to 0 and 1 can provide mutual exclusion.