Professional Documents
Culture Documents
Threads Vs Processes: Andrew Tridgell
Threads Vs Processes: Andrew Tridgell
Andrew Tridgell
tridge@samba.org
Aren't threads faster?
Systems programming
What is in a tas?
Instructions to execute
File descriptors
&redentials
'ocs
(etwor resources
)elationship to &*+s
-hreads
???
*rocesses
???
The key differences
-hreads
*rocesses
???
"et#ork $edia server %%%%
"emory manipulation
File I/
.atabase access?
'ocing
(etwor I/
&redential handling
"emory allocation
???
a!!oc&'
???
a!!oc&'
???
;intA &ommon I/ system calls
ssiCe1t read#int fd0 void Dbuf0 siCe1t count%E
ssiCe1t write#int fd0 const void Dbuf0 siCe1t count%E
read&'/#rite&'
httpA//sambaForg/Gtridge/Huncode/thread1perfFc
-hread library
thread1perf result
Why??
$eory +ootprint
-hreads
(on$obvious choice