Operating System
  • Introduction
  • Chapter 1 Introduction
  • Chapter 2 Operating System Structures
  • Chapter 3 Processes
    • 3.1 Process Concept
    • 3.2 Process Scheduling
    • 3.3 Operation on Processes
    • 3.4 Interprocess Communication
  • Chapter 4 Threads
    • Summary: slides
    • 4.1 Overview
    • 4.2 Multithreading Models
    • 4.3 Thread Libraries
    • 4.4 Threading Issues
  • Chapter 6 Process Synchronization
    • 6.1 Background
    • 6.2 Critical-section problem
    • 6.3 Peterson's Solution
    • 6.4 Synchronization Hardware
    • 6.5 Semaphores
  • Summary ch1
  • Summary ch2
  • Summary ch3
  • Summary ch4
  • Summary ch5
  • Summary ch7
  • Summary ch6
  • Summary ch8
Powered by GitBook
On this page

Was this helpful?

  1. Chapter 4 Threads

4.2 Multithreading Models

Previous4.1 OverviewNext4.3 Thread Libraries

Last updated 5 years ago

Was this helpful?

  1. Many-to-One Model It is efficient; but the entire process will block if a thread makes a blocking system call. Also, because only one thread can access the kernel at a time, multiple threads are unable to run in parallel on multiprocessors.

  2. One-to-One Model

  3. Many-to-Many Model Whereas the many-to-one model allows the developer to create as many user threads as she wishes, true concurrency is not gained because the kernel can schedule only one thread at a time.

  4. (1) The one-to-one model allows for greater concurrency, but the developer has to be careful not to create too many threads within an application (and in some instances may be limited in the number of threads she can create). (2) The many-to-many model suffers from neither of these shortcomings: developers can create as many user threads as necessary, and the corresponding kernel threads can run in parallel on a multiprocessor. (3) Also, when a thread performs a blocking system call, the kernel can schedule another thread for execution.