|
|
|
|
|
|
|
|
|
|
|
|
ä |
Example
1: a file server on a LAN
|
|
|
ä |
It
needs to handle several file requests over
|
|
|
|
a
short period
|
|
|
ä |
Hence
more efficient to create (and destroy)
|
|
|
a
single thread for each request
|
|
|
ä |
On a
SMP machine: multiple threads can
|
|
|
|
possibly
be executing simultaneously on
|
|
|
|
different
processors
|
|
|
ä |
Example
2: one thread display menu and
|
|
|
|
read
user input while the other threads
|
|
|
|
execute
user commands
|
|