



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















-^
3
-^
5
-^
-^
-^
6
-^
-^
-^
8
key
olderUNIXes
addressspace
one thread/processmany processes
one thread/process
one process
thread
Java
Mach NT
many threads/process
many threads/process
Mach
Chorus,Linux, …
many processes
one process
9
0xFFFFFFFF
thread 1 stack
thread 2 stack
address space
thread 3 stack
heap(dynamic allocated mem)
0x
static data(data segment)code
11
code(text segment)
-^
12
14
olderUNIXes
addressspace
one thread/processmany processes
one thread/process
one process
thread
Java
Mach NT
many threads/process
many threads/process
Mach
Chorus,Linux, …
many processes
one process
15
user
level
user
-level thread library
address
Mach, NT,Chorus,
(thread create, destroy,signal, wait, etc.)
add essspace
Linux, …
os kernel
thread
os kernelCPU
17
user
level
user
-level thread library
address
Mach, NT,Chorus,
(thread create, destroy, signal, wait,etc.)
add essspace
Linux, …
os kernel
kernel threads
thread
os kernel
( kernel
thread create, destroy, signal, wait, etc.)
18
OS now manages threads and processes
ll h
d^
i^
i^
l^
d i
h^
k^
l
knows about it and can run other threads from thatknows about it, and can run other threads from thatprocess
Kernel threads are cheaper than processes– less state to allocate and initialize
-^
But, they’re still pretty expensive for fine-grained use (e.g.,orders of magnitude more expensive than a procedure call)
thread operations are all system calls
must maintain kernel state for each thread
20
-^
-^
21