Threads, SMP, and Microkernels
Download Threads, SMP, and Microkernels
Preview text
Threads, SMP, and Microkernels
Chapter 4
Contents
?Processes and threads ?Symmetric multiprocessing ?Microkernels ?Window 2000 thread and SMP
management ?Solaris thread and SMP management ?Linux process and thread management
Processes of yesterday
?Unit of resource ownership
?process is allocated a virtual address space to hold the process image
?Unit of dispatching
?scheduled and dispatched by the OS ?execution may be interleaved with other processes
?These two characteristics are treated independently by today’s operating system
Processes of today
?Process or task
?unit of resource ownership ?virtual address space, main memory, I/O
devices, and files
?Thread or light weight process
?unit of dispatching ?scheduled and dispatched by the OS
Multithreading
?Refers to the ability of an OS to support multiple threads of execution within a single process
?MS-DOS supports a single user process and a single thread
?UNIX supports multiple user processes but only supports one thread per process
?Windows 2000, Solaris, Linux, Mach, and OS/2 support multiple threads
Processes in Multithreaded environment
?A process is the unit of resource allocation and a unit of protection
?have a virtual address space that holds the process image
?protected access to processors, other processes, files, and I/O resources
?Per Process Items
?address space, global variable, open files, child processes, timers, signals, semaphores, account
Threads
?Within a process, there may be one or more threads, each with the followings
?thread execution state(running, ready,...) ?saved thread context
?program counter, stack, register set, child threads, memory for local variables
?access to the memory and resources of its process
?all threads of a process share this
Benefits of Threads
?Takes less time to create a new thread than a process
?no need to allocate a virtual address space
?Less time to terminate a thread than a process ?Less time to switch between two threads within
the same process ?Since threads within the same process share
memory and files, they can communicate with each other without invoking the kernel
Chapter 4
Contents
?Processes and threads ?Symmetric multiprocessing ?Microkernels ?Window 2000 thread and SMP
management ?Solaris thread and SMP management ?Linux process and thread management
Processes of yesterday
?Unit of resource ownership
?process is allocated a virtual address space to hold the process image
?Unit of dispatching
?scheduled and dispatched by the OS ?execution may be interleaved with other processes
?These two characteristics are treated independently by today’s operating system
Processes of today
?Process or task
?unit of resource ownership ?virtual address space, main memory, I/O
devices, and files
?Thread or light weight process
?unit of dispatching ?scheduled and dispatched by the OS
Multithreading
?Refers to the ability of an OS to support multiple threads of execution within a single process
?MS-DOS supports a single user process and a single thread
?UNIX supports multiple user processes but only supports one thread per process
?Windows 2000, Solaris, Linux, Mach, and OS/2 support multiple threads
Processes in Multithreaded environment
?A process is the unit of resource allocation and a unit of protection
?have a virtual address space that holds the process image
?protected access to processors, other processes, files, and I/O resources
?Per Process Items
?address space, global variable, open files, child processes, timers, signals, semaphores, account
Threads
?Within a process, there may be one or more threads, each with the followings
?thread execution state(running, ready,...) ?saved thread context
?program counter, stack, register set, child threads, memory for local variables
?access to the memory and resources of its process
?all threads of a process share this
Benefits of Threads
?Takes less time to create a new thread than a process
?no need to allocate a virtual address space
?Less time to terminate a thread than a process ?Less time to switch between two threads within
the same process ?Since threads within the same process share
memory and files, they can communicate with each other without invoking the kernel
Categories
You my also like
BSPT (British Standard Pipe Thread)
76.7 KB15.6K4.2KHELICOIL plus repairing of damaged threads
906.4 KB4780u Processing: Concurrency and Sharing COS 318: Operating
847 KB2.5K250OPERATING SYSTEMS Threads
93.7 KB2K959Thread Identification Guide Metric Port & JIC Technical
605.1 KB16.9K3.2KPipe Threads, 60 deg, General Purpose
796.7 KB34.9K12.6KUsability improvements for std::thread
117.5 KB53.2K16.5KThe History of Concurrency Support in Java
8.4 MB53.2K7.5KConcurrency, Atomic Sequences, Virtual Memory
242.5 KB60.6K26K