[M3devel] threading on Windows?

Daniel Alejandro Benavides D. dabenavidesd at yahoo.es
Fri Feb 11 00:13:57 CET 2011


Hi all:
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?
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.
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:
http://qstream.org/~krasic/cs508-2006/summaries/paper17/SpinOS.ppt

http://www.cs.cornell.edu/People/egs/papers/spin-strands.pdf

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?
http://www.informatik.fh-luebeck.de/Seehusen/Publications/OS92/osna.ps
http://130.203.133.150/viewdoc/versions;jsessionid=6B086982E4C53F40A01EDA48A003EE3A?doi=10.1.1.34.1092
(let it 
	http://www.cs.rug.nl/~wim/pub/whh217.ps.gz
        
        
        )
and 
http://www.cs.rug.nl/~wim/pub/whh233.ps.gz
and so
http://books.google.com/books?id=Hb_pOpI8mJ8C&lpg=PP1&dq=Concurrent%20programming&pg=PA221#v=onepage&q&f=false
http://www.cs.brown.edu/people/spr/fieldbook/fieldbook.html

Thanks in advance

--- El jue, 10/2/11, jay.krell at cornell.edu <jay.krell at cornell.edu> escribió:

De: jay.krell at cornell.edu <jay.krell at cornell.edu>
Asunto: Re: [M3devel] threading on Windows?
Para: "Tony Hosking" <hosking at cs.purdue.edu>
CC: "m3devel" <m3devel at elegosoft.com>, "Jay K" <jay.krell at cornell.edu>
Fecha: jueves, 10 de febrero, 2011 06:01

1. I never understood why this any better.
2. It how things are currently.3. Why not m3cg.alloca? (but see #2)
 - Jay/iPad
On Feb 9, 2011, at 9:48 PM, Tony Hosking <hosking at cs.purdue.edu> wrote:

What happened to fixing this with runtime hooks?


On Feb 9, 2011, at 11:40 PM, Jay K wrote:
Of course not.
It is a made-up function that the frontend generates a call to.
That it never previously did.
Using the general function call interface.
You need to add a special case, in the general function call code, to do something different and specific
for this specific function.
 
 
 - Jay 
 
From: rcolebur at SCIRES.COM
To: jay.krell at cornell.edum3devel at elegosoft.com
Date: Wed, 9 Feb 2011 22:28:45 -050
Subject: Re: [M3devel] threading on Windows?

Jay: 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. Regards,Randy From: jayk123 at hotmail.com [mailto:jayk123 at hotmail.com] On Behalf Of Jay K
Sent: Wednesday, February 09, 2011 9:01 PM
To: Coleburn, Randy; m3devel
Subject: RE: [M3devel] threading on Windows? In m3back/src/M3x86.m3.
 
 - Jay

 From: rcolebur at SCIRES.COM
To: m3devel at elegosoft.com
Date: Wed, 9 Feb 2011 18:22:56 -0500
Subject: Re: [M3devel] threading on Windows?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.All I know is that everything was working fine until I checked out the HEAD repository.When you say “special case” calls “m3_alloca”, where do I go about finding this “special case”?Are we talking Modula-3 code, C code, Assembler, what?  What package/module?Regards,Randy From: jayk123 at hotmail.com [mailto:jayk123 at hotmail.com] On Behalf Of Jay K
Sent: Wednesday, February 09, 2011 5:59 PM
To: Coleburn, Randy; Mika Nystrom; m3devel
Subject: RE: [M3devel] threading on Windows? Maybe someone else can do it?
The fix is: special case calls to the function "m3_alloca".
Change it to call "_chkstk" (or maybe "chkstk", whatever works).
The one parameter is an unsigned 32bit quantity, passed in eax, and the return value is a pointer, returned in esp.
To some extent I drag my feet hoping anyone else might become motivated enough to do it and start learning how.
 
 - Jay
 
> From: rcolebur at SCIRES.COM
> To: mika at async.caltech.edum3devel at elegosoft.com
> Date: Wed, 9 Feb 2011 17:25:20 -0500
> Subject: Re: [M3devel] threading on Windows?
> 
> Mika:
> 
> 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.
> 
> 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.
> 
> As soon as I can get the build problem resolved, I'll try out your test program.
> 
> Regards,
> Randy Coleburn
> 
> -----Original Message-----
> From: Mika Nystrom [mailto:mika at async.caltech.edu> Sent: Wednesday, February 09, 2011 5:01 PM
> To: m3devel at elegosoft.com
> Subject: [M3devel] threading on Windows?
> 
> Hi m3devel,
> 
> I'm just curious if anyone out there who's running CM3 on Windows has had
> a chance to try my thread testing program yet. Current status on Unix
> (Linux, FreeBSD) appears to be that there are problems in pthreads (but
> I think only under heavy load) and that user threading works perfectly.
> So I now wonder how things are on the third threading platform (Windows).
> The thread testing program is at m3-libs/m3core/tests/thread .
> 
> (Note however that there is a memory leak in TRY-EXCEPT in the current
> head so don't try to update everything to the CVS head. The previous
> release should be OK.)
> 
> Also has anyone else noticed that debugging information has recently
> broken? m3gdb is very unhappy on all platforms for me...
> 
> Mika



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110210/df6ecab3/attachment-0002.html>


More information about the M3devel mailing list