Multithreading Models

Ultimately, a relationship must exist between user threads and kernel threads.

Many to One Model

  • The many-to-one model maps many user-level threads to one kernel thread.
  • Thread management is done by the thread library in user space, so it is efficient.
  • Also, because only one thread can access the kernel at a time, multiple threads are unable to run in parallel on multicore systems

One to One Model

  • The one-to-one model (Figure 4.6) maps each user thread to a kernel thread.
  • The only drawback to this model is that creating a user thread requires creating the corresponding kernel thread.

Many to Many Model

  • The many-to-many model multiplexes many user-level threads to a smaller or equal number of kernel threads.
  • Developers can create as many user threads as necessary, and the corresponding kernel threads can run in parallel on a multiprocessor

results matching ""

    No results matching ""