Академический Документы
Профессиональный Документы
Культура Документы
Fred Kuhns
fredk@cse.wustl.edu
Applied Research Laboratory,
Department of Computer Science and Engineering,
Washington University in St. Louis
Washington
WASHINGTON UNIVERSITY IN ST LOUIS
Introduction to Threads
Multithreaded Process Model
Single-Threaded
Thread Thread Thread
Process Model
Thread Thread Thread
Control Control Control
Process User Block Block Block
Control Stack
Block
Process User User User
Control Stack Stack Stack
User Kernel Block
Address Stack
Space User Kernel Kernel Kernel
Address Stack Stack Stack
Space
P P P P P P
proc_t
p_tlist
kthread_t
t_procp
t_lwp
klwp_t t_forw
lwp_thread
lwp_procp
Process 1 Process 2
user
L L L L Int kthr
kernel ......
...
P P P
hardware
Fred Kuhns (01/17/09) CS422 – Operating Systems Concepts 21
Solaris User Level Threads
Stop
Runnable Wakeup
Continue
Stop
Stopped Sleeping
Preempt Dispatch
Blocking
Runnable System Stopped
Call
Continue
Wakeup
Stop
Blocked