[TriLUG] Questions about Threading
John F Davis
johndavi at us.ibm.com
Tue Mar 26 13:10:05 EST 2002
Apache typically runs more than one process. With multiple cpu's you most
certainly get a benefit since
the different process's can be distributed across the different cpu's.
0.02
BTW, nice table of process vs thread.
"M. Mueller at Signalnetware.com" <mmueller at signalnetware.com>@trilug.org
on 03/26/2002 12:55:36 PM
Please respond to trilug at trilug.org
Sent by: trilug-admin at trilug.org
To: trilug at trilug.org
cc:
Subject: Re: [TriLUG] Questions about Threading
On Tuesday 26 March 2002 12:08 pm, you wrote:
> I'm not a programmer, but I am curious about threading and the advantage
> to having a multi-processor linux box (I guess running an smp kernel).
> Do programs have to be written to take advantage of a dual-processor, or
> will cycles be distributed evenly during a process? How do you know if
> your program will support multiple processors?
The kernel can use multiple processors to run more than one single threaded
program.
A program can be composed of:
process threads
---------------------------
single single
single multiple
mutiple single || multiple
Programs that are multi-process, multi-threaded might run faster in a
multi-processor environment. A programmer could write a multi-process,
multi-thread operation that passes a semephore that allows execution only
with possesion of the semaphore, thus rendering multi-processors to be of
less value to such an application.
In general, it pays to understand the kernel scheduling function and design
a
program to take advantage of that algorithm.
Running a web server with multiple processes could probably be improved
using
a multiple processor server.
<stuff sniped>
More information about the TriLUG
mailing list