Download presentation
Presentation is loading. Please wait.
Published byKerrie Greene Modified over 8 years ago
1
Threads, SMP and Microkernels Process vs. thread: –Unit of resource ownership (process has virtual address space, memory, I/O channels, files) –Unit of dispatching process execution path through one or more programs process has execution state, process is dispatched.
2
Process/Threads Unit of dispatching=thread/lightweight process Unit of resource ownership: process/task
3
Multithreading Support multiple threads execution within one process (one process, one thread is single threading) Within a process, have >1 thread. Thread has (a) thread execution state, (b) saved thread context, © execution context, (d) per-thread storage
4
Multithreading; continued All threads of a process –share state and resources of that process –reside in same address space and have same access –one thread alters data=> others see change –one thread opens file=> other threads have access
5
Benefits of multithreading Performance: –far less time to create, terminate and switch between threads –factor of 10 improvement in performance –example: server –>1 CPU? –IPC more time consuming
6
Thread operations Spawn (first thread created automatically) Block waiting for an event Unblock -- event occurs finish-- thread completes
7
Thread implementations User level threads (ULT) Kernel level threads (KLT) Combined approach
8
MS-DOS One process One thread
9
Many UNIX OS Multiple processes One thread/process Process 1 Process 2
10
Java Runtime Environment One process; Multipe threads
11
Solaris Multiple processes; multiple threads We are interested in this
12
Multithreading Process = unit of protection + unit of resource allocation has virtual address space; protected access to processor, other processes (IPC), files,, I/O resources… Within a process, have more than one thread.
13
Symmetric MultiProcessing SIMD MIMD –Distributed memory –Shared memory master/slave Symmetric (each process self schedules)
14
Microkernels Small OS core; provides foundation for modular extension Benefits: –uniform interfaces –extensibility –flexibility –portability –Distributed OS support
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.