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?

Summary ch4

  1. Process:

    (1)A virtual address space which holds the process image

    (2)Protected access to processors, other processes

  2. Multithreading:To support multiple, concurrent paths of execution within a single process

    Advantages:

    (1)Information sharing

    (2)Modular program structure

    (3)Speed of execution

    (4)Convenience

  3. Benefits of threads:

    (1)Takes less time to create a new thread than a process

    (2)Less time to terminate a thread than a process

    (3)Less time to switch between two threads within the same process

  4. User-Level threads:

    (1)Thread library entirely executed in user mode

    (2)Kernel is not involved!

    (3)Cheap to manage threads

    (4)Cheap to do context switch

    (5)A blocking system call blocks all peer threads

  5. Kernel-Level threads:

    (1)Kernel is aware of and schedules threads

    (2)A blocking system call, will not block all peer threads

    (3)Kernel maintains context information for the process and the threads

    (4)Scheduling is done on a thread basis

  6. User vs. Kernel-level threads:

    User-level threads:

    (1)Cheap to manage and to do context switch

    (2)A blocking system call blocks all peer threads

    Kernel-level threads:

    (1)A blocking system call will not block all peer threads

    (2)Expensive to manage and to do context switch

  7. LWP features:

    (1)Cheap thread management

    (2)A blocking system call may not suspend the whole process

    (3)LWPs are transparent to the application

    (4)LWPs can be easily mapped to different CPUs

    (5)Managing LWPs is expensive (like kernel threads)

PreviousSummary ch3NextSummary ch5

Last updated 5 years ago

Was this helpful?