Message from discussion So, multithreading...
Subject: Re: So, multithreading...
References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
From: Uri Guttman <u...@stemsystems.com>
Organization: Stemsystems, Inc.
X-Newsreader: Gnus v5.6.44/Emacs 20.3
Date: Thu, 21 Feb 2002 07:24:37 GMT
X-Trace: typhoon.ne.ipsvc.net 1014276277 22.214.171.124 (Thu, 21 Feb 2002 02:24:37 EST)
NNTP-Posting-Date: Thu, 21 Feb 2002 02:24:37 EST
>>>>> "DF" == David Frauzel <n...@weathersong.net> writes:
DF> lo...@cs.utexas.edu (Logan Shaw) wrote in message news:<email@example.com>...
>> There's also the fact that some problems are expressed more easily
>> in terms of threads. If you have are handling several interactive
>> sessions or several concurrent web requests, it makes things easier
>> if you have a thread associated with each session or request.
DF> Wow, that was a very clear explanation, and the reasoning makes
DF> perfect sense. Thanks. :)
and you can do any threaded application with multiple processes and
IPC. threads are not some cure all thing. they have their limitations
too. some are small stack sizes as they are allocated with a fixed
size. processes have virtual ram for a stack so they can
grow. synchronizing threads can be a pain. interlocks too.
you can run processes under event driven multiplexors and get all the
advantages of threads with few of the problems. stem does just that for
i am not saying threads don't have their uses but to say they are always
better than anything else is misleading. many things are harder in
threads because of the shared space and locking issues. cooperative
multitasking (event driven) has no locks or sync issues. i/o is easier
to share. managing processes is easier too.
just my view. i have been hacking event systems for a long time.
Uri Guttman ------ u...@stemsystems.com -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org