[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Threads (was: mod_lisp for guile)
From: |
Tomas Zerolo |
Subject: |
Threads (was: mod_lisp for guile) |
Date: |
Tue, 20 Sep 2005 06:44:55 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
On Mon, Sep 19, 2005 at 11:24:34PM -0400, Alan Grover wrote:
> Neil Jerram wrote:
> (much elision)
[...]
> > How would using threads reduce resource usage? Otherwise this all
> > makes sense.
AFAIU inter-thread communication is just easier. And forking a thread
might be easier on VM than forking a process. On some bad process
implementations much more so.
> A thread doesn't require an entire process (like a fork does), in
> particular, memory is shared. I think you could limit a thread's
> resource requirements to just an execution "thread" (PC, registers,
> stack), otherwise sharing everything within the one process. Being
> light-weight/cheap is one of the major motivations for threads.
>
> Though I read something recently that claimed some thread
> (mis-)implementations are more costly than a fork, and often more costly
> than you'd hope. Apparently, the Linux 2.6 thread implementation is in
> user-space, which means it isn't very thrifty (and causes some other
> interesting issues).
On Linux 2.6 and with glibc 2.0 you have native Posix threads, and a
quite spiffy implementation at that. See e.g.
<http://kerneltrap.org/node/422>
Newer Guiles try to take advantage of that.
Regards
-- tomas
signature.asc
Description: Digital signature