[ale] threads and apache
stephen
stephen at phynp6.phy-astr.gsu.edu
Fri Oct 11 12:41:47 EDT 2002
On Fri, Oct 11, 2002 at 10:52:42AM -0400, Michael D. Hirsch wrote:
> On Friday 11 October 2002 10:01 am, stephen wrote:
> > On Fri, Oct 11, 2002 at 04:13:28AM -0700, Stephen Turner wrote:
> > > hey, i was reading about how threads use less resources than actual
> > > applications, well that makes sense and all but why hasnt apache
> > > adopted this before? and how much resources do you think it saves?
> >
> > This depends on the OS, but linuxthreads in glibc is implemented
> > in userspace so threads in linux are not lightweight processes
> > scheduled by the kernel.
>
> Huh? The linux pthreads implementation for the last 4-5 years has been
> exactly the opposite. It is all done in the kernel via a very clever
> hack so that the kernel cannot tell the difference between a thread and
> a process. Threads are scheduled in the kernel exactly like processes.
> Thread creation takes about the same amount of time as process
> creation, too. It is only a little faster.
Oh ok, you're right. I remember now. This is where pthreads uses
__clone() to create a new process.
thanks,
stephen
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list