<!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.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>the well respected german computer magazine
</FONT><FONT face=Arial size=2>c't reports </FONT><FONT face=Arial size=2>in an
article</FONT></DIV>
<DIV><FONT face=Arial size=2>of its </FONT><FONT face=Arial size=2>release 26/03
on page 214, that the .Net </FONT><FONT face=Arial size=2>multithreading
support</FONT></DIV>
<DIV><FONT face=Arial size=2>currently suffers from several strangeness
factors.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The class ThreadPool suffers from several
anomalies:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The thread pool of a process is limited by 25
threads per </FONT><FONT face=Arial size=2>processor.</FONT></DIV>
<DIV><FONT face=Arial size=2>GetMaxThreads() and GetAvailableThreads() deliver
</FONT><FONT face=Arial size=2>the values 25/25</FONT></DIV>
<DIV><FONT face=Arial size=2>with .Net 1.0 </FONT><FONT face=Arial size=2>and
25/1000 with .Net 1.1.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The n</FONT><FONT face=Arial size=2>ew
threads obey to a pretty ackward activation pattern, </FONT><FONT
face=Arial size=2>new</FONT></DIV>
<DIV><FONT face=Arial size=2>threads are started with individual offsets of
500ms to each other!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The garbage collector starts after one minute
after the demise </FONT><FONT face=Arial size=2>of a</FONT></DIV>
<DIV><FONT face=Arial size=2>thread. If new threads are requested in
between, one again </FONT><FONT face=Arial size=2>suffers</FONT></DIV>
<DIV><FONT face=Arial size=2>the 500ms penalties from above.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Further experiments trying to start all
required threads in </FONT><FONT face=Arial size=2>advance</FONT></DIV>
<DIV><FONT face=Arial size=2>suffered from being queued automatically from
thread 25 </FONT><FONT face=Arial size=2>on, so</FONT></DIV>
<DIV><FONT face=Arial size=2>this didn't help so much either.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Running one thread under full load, makes
the system take </FONT><FONT face=Arial size=2>up to</FONT></DIV>
<DIV><FONT face=Arial size=2>5 seconds to start another thread.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Attempts to work without ThreadPool suffered
also from several</FONT></DIV>
<DIV><FONT face=Arial size=2>anomalies and could even crash the .Net
executive:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The executive is quiet sensitive when one
tries to Resume() an</FONT></DIV>
<DIV><FONT face=Arial size=2>already running process etc, which might mean some
extra</FONT></DIV>
<DIV><FONT face=Arial size=2>private bookkeeping.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Attempts with subclassing BaseThread worked but
occasionally</FONT></DIV>
<DIV><FONT face=Arial size=2>resulted in a termination </FONT><FONT face=Arial
size=2>with return code 0 with .Net 1.0 and a</FONT></DIV>
<DIV><FONT face=Arial size=2>reported stack overflow with</FONT><FONT
face=Arial size=2> .Net 1.1.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Closing a window while one owns
homemade background thread</FONT></DIV>
<DIV><FONT face=Arial size=2>is running </FONT><FONT face=Arial size=2>creates a
zombie thread.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Altogether the authors hope, that further releases
of .Net like</FONT></DIV>
<DIV><FONT face=Arial size=2>.Net 2.0 will help to improve the
situation.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial
size=2>
Martin</FONT></DIV></BODY></HTML>