<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all:<br>by the way this must be a top one if you want cross platform compatibility rather than built-in platform specific fixes, why just we can make another thread runtime and put everything on it, e.g make this threading behavior consistent with the rest of pthread unsupported platforms (say DECthreads, or any other thread safe interface, was this ever supported i.e for SPIN trends threads or as now Pthreads are as thread safe?), at lower layer level, i.e like it was with the user threads, perhaps it is like the counter example you would need to test more deeply in the implementation not other ones' implementations, perhaps?<br>Is there any test invalid currently, or any of it correct, if there isn't a "safe" pattern in the code why do you test unsafe threaded code (i.e all behave odly bad or all behave the same bad? This is to make another system thread
safe implementation, like it was SPIN, sadly uniprocessor platform, this is better to test in an uniprocessor rather than multiprocessor indeed as its a simulation of the real code is running on it), still very impressive bench marks time in the user level or kernel level for DEC system SPIN , is like the same for both user level ones and besides it behaves like it was a Mach 3.0 kernel user or a DECThreads client, as it had it underneath it layered, this proves a better runtime makes even better for correctness and efficiency, at least is what I see in the benchmarks, who knows with SMP systems, but just a point on it.<br>Besides this SPIN trends threads were more abstract and more specialized e.g allow to select scheduling policy (currently at compile time in pthreads) and timing selected values. I wonder how anything of this would be manageable on a SMP machine, still worth the value to check as it is really faster than anything on the market
for those days, see:<br>http://qstream.org/~krasic/cs508-2006/summaries/paper17/SpinOS.ppt<br>
http://www.cs.cornell.edu/People/egs/papers/spin-strands.pdf<br><br>Yet another hint for your thread testing, there is a static checker for threading, it used thread states in object oriented programs written in path expression constraints and proved to check threads synchronization consistency, one would be able to compile it to thread primitives to check for semantic analysis and optimization, just in case the references see below at the end of this paragraph, I must say this looks very interesting so your work would be to create annotations not trace them, or trace them if needed for create them, but still very promising if one is capable of creating the abstract annotations to some extent ahead of time or later if in execution time, as it was in some intelligent debuggers, at some extent should be the call graphs make the path expressions, perhaps abstract as through a Trestle Locking level abstraction and a thread safe
condition?<br>http://www.informatik.fh-luebeck.de/Seehusen/Publications/OS92/osna.ps<br>http://130.203.133.150/viewdoc/versions;jsessionid=6B086982E4C53F40A01EDA48A003EE3A?doi=10.1.1.34.1092<br>(let it <a href="http://www.cs.rug.nl/%7Ewim/pub/whh217.ps.gz" title="http://www.cs.rug.nl/~wim/pub/whh217.ps.gz">
http://www.cs.rug.nl/~wim/pub/whh217.ps.gz</a>
)<br>and <br>http://www.cs.rug.nl/~wim/pub/whh233.ps.gz<br>and so<br>http://books.google.com/books?id=Hb_pOpI8mJ8C&lpg=PP1&dq=Concurrent%20programming&pg=PA221#v=onepage&q&f=false<br>http://www.cs.brown.edu/people/spr/fieldbook/fieldbook.html<br><br>Thanks in advance<br><br>--- El <b>jue, 10/2/11, jay.krell@cornell.edu <i><jay.krell@cornell.edu></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: jay.krell@cornell.edu <jay.krell@cornell.edu><br>Asunto: Re: [M3devel] threading on Windows?<br>Para: "Tony Hosking" <hosking@cs.purdue.edu><br>CC: "m3devel" <m3devel@elegosoft.com>, "Jay K" <jay.krell@cornell.edu><br>Fecha: jueves, 10 de febrero, 2011 06:01<br><br><div id="yiv641253676"><div>1. I never understood why this any better.<br>2. It how things are currently.</div><div>3. Why not m3cg.alloca? (but see
#2)</div><div><br> - Jay/iPad</div><div><br>On Feb 9, 2011, at 9:48 PM, Tony Hosking <<a rel="nofollow" ymailto="mailto:hosking@cs.purdue.edu" target="_blank" href="/mc/compose?to=hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>What happened to fixing this with runtime hooks?<div><br>
<br><div><div>On Feb 9, 2011, at 11:40 PM, Jay K wrote:</div><br class="yiv641253676Apple-interchange-newline"><blockquote type="cite"><span class="yiv641253676Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><div class="yiv641253676hmmessage" style="font-size: 10pt; font-family: Tahoma;">Of course not.<br>It is a made-up function that the frontend generates a call to.<br>That it never previously did.<br>Using the general function call interface.<br>You need to add a special case, in the general function call code, to do something different and specific<br>for this specific function.<br> <br> <br> - Jay <br> <br><hr id="yiv641253676stopSpelling">From:<span
class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:rcolebur@SCIRES.COM" target="_blank" href="/mc/compose?to=rcolebur@SCIRES.COM"></a><a rel="nofollow" ymailto="mailto:rcolebur@SCIRES.COM" target="_blank" href="/mc/compose?to=rcolebur@SCIRES.COM">rcolebur@SCIRES.COM</a><br>To:<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:jay.krell@cornell.edu" target="_blank" href="/mc/compose?to=jay.krell@cornell.edu"></a><a rel="nofollow" ymailto="mailto:jay.krell@cornell.edu" target="_blank" href="/mc/compose?to=jay.krell@cornell.edu">jay.krell@cornell.edu</a>;<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com"></a><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank"
href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Date: Wed, 9 Feb 2011 22:28:45 -050<br>Subject: Re: [M3devel] threading on Windows?<br><br><div class="yiv641253676ecxWordSection1"><div style="margin: 0px; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">Jay:</span></div><p class="yiv641253676ecxMsoNormal" style="margin: 0px; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;"> </span></p><div style="margin: 0px; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">I looked thru the 4,618 lines of M3x86.m3, but I don’t see any reference to “m3_alloca” or even “alloc” in this file.</span></div><p class="yiv641253676ecxMsoNormal" style="margin: 0px; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size:
11pt;"> </span></p><div style="margin: 0px; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">Regards,</span></div><div style="margin: 0px; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">Randy</span></div><p class="yiv641253676ecxMsoNormal" style="margin: 0px; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;"> </span></p><div><div style="border-style: solid none none; border-width: 1pt medium medium; border-top: 1pt solid rgb(181, 196, 223); padding: 3pt 0in 0in;"><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><b><span style="font-family: Tahoma,sans-serif; font-size: 10pt;">From:</span></b><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"><span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:jayk123@hotmail.com"
target="_blank" href="/mc/compose?to=jayk123@hotmail.com"></a><a rel="nofollow" ymailto="mailto:jayk123@hotmail.com" target="_blank" href="/mc/compose?to=jayk123@hotmail.com">jayk123@hotmail.com</a><span class="yiv641253676Apple-converted-space"> </span>[mailto:jayk123@hotmail.com]<span class="yiv641253676Apple-converted-space"> </span><b>On Behalf Of<span class="yiv641253676Apple-converted-space"> </span></b>Jay K<br><b>Sent:</b><span class="yiv641253676Apple-converted-space"> </span>Wednesday, February 09, 2011 9:01 PM<br><b>To:</b><span class="yiv641253676Apple-converted-space"> </span>Coleburn, Randy; m3devel<br><b>Subject:</b><span class="yiv641253676Apple-converted-space"> </span>RE: [M3devel] threading on Windows?</span></div></div></div><p class="yiv641253676ecxMsoNormal" style="margin: 0px 0px 0px 0.5in; padding: 0px;"> </p><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span style="font-family:
Tahoma,sans-serif; font-size: 10pt;">In m3back/src/M3x86.m3.<br> <br> - Jay<br><br> </span></div><div class="yiv641253676ecxMsoNormal" style="text-align: center; margin-left: 0.5in;" align="center"><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"><hr id="yiv641253676ecxstopSpelling" align="center" size="2" width="100%"></span></div><p class="yiv641253676ecxMsoNormal" style="margin: 0px 0in 12pt 0.5in; padding: 0px;"><span style="font-family: Tahoma,sans-serif; font-size: 10pt;">From:<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:rcolebur@SCIRES.COM" target="_blank" href="/mc/compose?to=rcolebur@SCIRES.COM"></a><a rel="nofollow" ymailto="mailto:rcolebur@SCIRES.COM" target="_blank" href="/mc/compose?to=rcolebur@SCIRES.COM">rcolebur@SCIRES.COM</a><br>To:<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com"
target="_blank" href="/mc/compose?to=m3devel@elegosoft.com"></a><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Date: Wed, 9 Feb 2011 18:22:56 -0500<br>Subject: Re: [M3devel] threading on Windows?</span></p><div><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">I am certainly willing to work on the problem, but need more context info about what caused it in order to know how to resolve.</span><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"></span></div><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">All I know is that everything was working fine until I checked out the HEAD repository.</span><span style="font-family: Tahoma,sans-serif; font-size:
10pt;"></span></div><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">When you say “special case” calls “m3_alloca”, where do I go about finding this “special case”?</span><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"></span></div><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">Are we talking Modula-3 code, C code, Assembler, what? What package/module?</span><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"></span></div><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">Regards,</span><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"></span></div><div style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span
style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;">Randy</span><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"></span></div><p class="yiv641253676ecxMsoNormal" style="margin: 0px 0px 0px 0.5in; padding: 0px;"><span style="font-family: Calibri,sans-serif; color: rgb(31, 73, 125); font-size: 11pt;"> </span><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"></span></p><div><div style="border-style: solid none none; border-width: 1pt medium medium; border-top: 1pt solid rgb(181, 196, 223); padding: 3pt 0in 0in;"><div style="margin: 0px 0px 0px 1in; padding: 0px;"><b><span style="font-family: Tahoma,sans-serif; font-size: 10pt;">From:</span></b><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"><span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:jayk123@hotmail.com" target="_blank" href="/mc/compose?to=jayk123@hotmail.com"></a><a
rel="nofollow" ymailto="mailto:jayk123@hotmail.com" target="_blank" href="/mc/compose?to=jayk123@hotmail.com">jayk123@hotmail.com</a><span class="yiv641253676Apple-converted-space"> </span>[mailto:jayk123@hotmail.com]<span class="yiv641253676Apple-converted-space"> </span><b>On Behalf Of<span class="yiv641253676Apple-converted-space"> </span></b>Jay K<br><b>Sent:</b><span class="yiv641253676Apple-converted-space"> </span>Wednesday, February 09, 2011 5:59 PM<br><b>To:</b><span class="yiv641253676Apple-converted-space"> </span>Coleburn, Randy; Mika Nystrom; m3devel<br><b>Subject:</b><span class="yiv641253676Apple-converted-space"> </span>RE: [M3devel] threading on Windows?</span></div></div></div><p class="yiv641253676ecxMsoNormal" style="margin: 0px 0px 0px 1in; padding: 0px;"><span style="font-family: Tahoma,sans-serif; font-size: 10pt;"> </span></p><div style="margin: 0px 0px 0px 1in; padding: 0px;"><span
style="font-family: Tahoma,sans-serif; font-size: 10pt;">Maybe someone else can do it?<br>The fix is: special case calls to the function "m3_alloca".<br>Change it to call "_chkstk" (or maybe "chkstk", whatever works).<br>The one parameter is an unsigned 32bit quantity, passed in eax, and the return value is a pointer, returned in esp.<br>To some extent I drag my feet hoping anyone else might become motivated enough to do it and start learning how.<br> <br> - Jay<br> <br>> From:<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:rcolebur@SCIRES.COM" target="_blank" href="/mc/compose?to=rcolebur@SCIRES.COM"></a><a rel="nofollow" ymailto="mailto:rcolebur@SCIRES.COM" target="_blank" href="/mc/compose?to=rcolebur@SCIRES.COM">rcolebur@SCIRES.COM</a><br>> To:<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:mika@async.caltech.edu" target="_blank"
href="/mc/compose?to=mika@async.caltech.edu"></a><a rel="nofollow" ymailto="mailto:mika@async.caltech.edu" target="_blank" href="/mc/compose?to=mika@async.caltech.edu">mika@async.caltech.edu</a>;<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com"></a><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Date: Wed, 9 Feb 2011 17:25:20 -0500<br>> Subject: Re: [M3devel] threading on Windows?<br>><span class="yiv641253676Apple-converted-space"> </span><br>> Mika:<br>><span class="yiv641253676Apple-converted-space"> </span><br>> Sorry, but my Windows build is broken. Jay seems to indicate he is working on a "fix" and that this fix is relatively simple, but so far no solution has been checked in.<br>><span
class="yiv641253676Apple-converted-space"> </span><br>> I've been wanting to run your program ever since you first checked it in, but that was about same time the HEAD branch update introduced a build problem. Problem is an unresolved symbol during link.<br>><span class="yiv641253676Apple-converted-space"> </span><br>> As soon as I can get the build problem resolved, I'll try out your test program.<br>><span class="yiv641253676Apple-converted-space"> </span><br>> Regards,<br>> Randy Coleburn<br>><span class="yiv641253676Apple-converted-space"> </span><br>> -----Original Message-----<br>> From: Mika Nystrom [mailto:mika@async.caltech.edu]<span class="yiv641253676Apple-converted-space"> </span><br>> Sent: Wednesday, February 09, 2011 5:01 PM<br>> To:<span class="yiv641253676Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank"
href="/mc/compose?to=m3devel@elegosoft.com"></a><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Subject: [M3devel] threading on Windows?<br>><span class="yiv641253676Apple-converted-space"> </span><br>> Hi m3devel,<br>><span class="yiv641253676Apple-converted-space"> </span><br>> I'm just curious if anyone out there who's running CM3 on Windows has had<br>> a chance to try my thread testing program yet. Current status on Unix<br>> (Linux, FreeBSD) appears to be that there are problems in pthreads (but<br>> I think only under heavy load) and that user threading works perfectly.<br>> So I now wonder how things are on the third threading platform (Windows).<br>> The thread testing program is at m3-libs/m3core/tests/thread .<br>><span class="yiv641253676Apple-converted-space"> </span><br>> (Note however that
there is a memory leak in TRY-EXCEPT in the current<br>> head so don't try to update everything to the CVS head. The previous<br>> release should be OK.)<br>><span class="yiv641253676Apple-converted-space"> </span><br>> Also has anyone else noticed that debugging information has recently<br>> broken? m3gdb is very unhappy on all platforms for me...<br>><span class="yiv641253676Apple-converted-space"> </span><br>> Mika</span></div></div></div></div></span></blockquote></div><br></div></div></blockquote></div></blockquote></td></tr></table><br>