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)

Last updated

Was this helpful?