Message from discussion
the evil of continuations
From: sper...@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Subject: Re: the evil of continuations
Date: 2000/06/22
Message-ID: <y9lzoodlswn.fsf@informatik.uni-tuebingen.de>#1/1
X-Deja-AN: 637629139
Content-Transfer-Encoding: 8bit
References: <3949E0DC.8E428904@eurocontrol.fr> <3dmdy739.fsf@alum.mit.edu> <4Pu25.84$4p1.1925@burlma1-snr2> <394A7C71.F1F75FE7@acm.org> <ln05wha8.fsf@alum.mit.edu> <394A860B.360DFBE@acm.org> <d7lhwcv5.fsf@alum.mit.edu> <ey3ln04335t.fsf@cley.com> <871z1wqqzz.fsf@orion.dent.isdn.cs.tu-berlin.de> <y9l8zw2szb1.fsf@informatik.uni-tuebingen.de> <8ipt1q$2umv$1@counter.bik-gmbh.de> <y9lwvjjqvn7.fsf@informatik.uni-tuebingen.de> <w4o66r3kran.fsf@lovecraft.irtnog.org> <u03dm6a1y7.fsf@hana.kurims.kyoto-u.ac.jp> <p2tya3x3kvr.fsf@ruebe.zrz.tu-berlin.de>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: usenet@newsserv.uni-tuebingen.de
X-Trace: newsserv.zdv.uni-tuebingen.de 961682276 32451 134.2.12.25 (22 Jun 2000 13:57:56 GMT)
Organization: Zentrum fuer Datenverarbeitung
Mime-Version: 1.0
User-Agent: Gnus/5.0804 (Gnus v5.8.4) XEmacs/21.1 (Acadia)
NNTP-Posting-Date: 22 Jun 2000 13:57:56 GMT
Newsgroups: comp.lang.scheme
>>>>> "Jost" == Jost Boekemeier <josto...@calvados.zrz.tu-berlin.de> writes:
Jost> Matthias Blume <s...@my.sig> writes:
>> > Michael> Both are usually too heavyweight.
>> >
>> > What do you mean by "heavyweight"?
>>
>> High overhead for creation and context switching.
Jost> Hmm, and I thought that only processes have high overhead. Threads
Jost> (created by the Linux clone() call for example) essentially share
Jost> their top-level environment and their code.
But not their continuations.
Jost> Why is that more "heavyweight" than continuations?
It's not a question of "than continuations": Any thread system needs
to keep track of the continuation of each thread to do context
switching. It just so happens that OS threads (no matter if userland
or kernel space) usually work with a very expensive representation for
continuations (a stack) as compared with systems that use
heap-allocated continuation frames, or a combination of that with a
stack cache.
I seem to remember Marc Feely has done measurements of his upcoming
release of Gambit-C against Linux threads, and came up with a factor
of 1000 difference in "weight".
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla