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
_______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user