<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>So how does Python do context switching,
[anybody]?</FONT></DIV>
<DIV><BR>--
<BR><BR>---------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV>Elliott Chapin http://
www3.sympatico.ca/echapin</DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Doug Fort" <<A
href="mailto:dougfort@downright.com">dougfort@downright.com</A>> wrote in
message <A
href="news:3ADA06B9.A2292921@downright.com">news:3ADA06B9.A2292921@downright.com</A>...</DIV>
<BR>Our website load testing system system, <A
href="http://www.stressmy.com">http://www.stressmy.com</A> is very much like
an agent-based simulation. My experience in running on Linux is
that the system bogs down on a few hundred threads. (This is the 2.2
kernel, 2.4 is supposed to be better). We recently started using
select() in a single threaded model for this reason. What platform are
you running on? How many threads did your prototype manage?
<P><FONT face=Arial
size=2>...........................................................................................snipped</FONT>
<P>In retrospect, it's the lack of a true continuation model in C++ which is
to <BR>blame. The C++ implementation suffers from extensive context-switching
<BR>burden, having to frequently swap out all the registers and manage the
<BR>stacks for all the threads, whereas Python-with-Continuations does not.
<BLOCKQUOTE TYPE="CITE">
<P>at the heart of the Python system was an optimized C-extension.
<P>Joe Kraska <BR>BBN Technologies <BR>San Diego CA</P></BLOCKQUOTE><PRE>--
Doug Fort <DOUGFORT@DOWNRIGHT.COM>
Senior Meat Manager
Downright Software LLC</PRE> </BLOCKQUOTE></BODY></HTML>