Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion So, multithreading...

Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!chnws02.mediaone.net!cyclone.ne.ipsvc.net!24.128.8.70!typhoon.ne.ipsvc.net.POSTED!not-for-mail
Sender: u...@home.sysarch.com
Newsgroups: comp.lang.perl.misc
Subject: Re: So, multithreading...
References: <b96fa891.0202201329.2f34d3e3@posting.google.com> <a518eg$bpg$1@charity.cs.utexas.edu> <b96fa891.0202202303.4eb5dbce@posting.google.com>
From: Uri Guttman <u...@stemsystems.com>
Message-ID: <x7lmdn8fmp.fsf@home.sysarch.com>
Organization: Stemsystems, Inc.
Lines: 37
X-Newsreader: Gnus v5.6.44/Emacs 20.3
Date: Thu, 21 Feb 2002 07:24:37 GMT
NNTP-Posting-Host: 66.31.124.101
X-Complaints-To: abuse@mediaone.net
X-Trace: typhoon.ne.ipsvc.net 1014276277 66.31.124.101 (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:<a518eg$bpg$1@charity.cs.utexas.edu>...
  >> ...
  >> 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
you. 

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

-- 
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