Main menu

Media Coverage

<div class="small-4 columns">media 1</div>

<div class="small-4 columns">media 2</div>

<div class="small-4 columns">media 3</div>

Reach to Us

Consider a user level threading library that multiplexes N > 1 user level threads over M ≥ 1 kernel threads.

by Pritam on 10 Jan 2018

Consider a user level threading library that multiplexes N > 1 user level threads over M ≥ 1 kernel threads. The library manages the concurrent scheduling of the multiple user threads that map to the same kernel thread internally, and the programmer using the library has no visibility or control on this scheduling or on the mapping between user threads and kernel threads. The N user level threads all access and update a shared data structure. When (or, under what conditions) should the user level threads use mutexes to guarantee the consistency of the shared data structure?

(A) Only if M > 1
(B) Only if N ≥ M
(C) Only if the M kernel threads can run in parallel on a multi-core machine.
(D) User level threads should always use mutexes to protect shared data.

Answer: D

User level threads should always use mutexes to protect shared data.

0Comment