[M3devel] [M3commit] CVS Update: cm3 (windows condition variables)

Jay K jay.krell at cornell.edu
Fri Jun 8 11:23:38 CEST 2012


sorry -- clarification, we are similar to the widely used Sun/Oracle JVM.Not necessarily state-of-the-art, but not bad.  Our locks map pretty directly to underlying pthread mutex, Win32 critical section.Maybe not 100% directly. Maybe we delay-heap-allocate-and-initialize, i.e. so lock declaration/creation is super cheap -- just leave room for a pointer -- but there is a small extra code per lock acquire/release.  Our condition variable functionaliy maps pretty directly to pthread condition variables.Prior to Vista, there were no Win32 condition variables, but what we do is pretty good, better than many implementations out there (e.g. older Modula-3, Boost) and similar to widely used implementations, e.g. Sun/Oracle Java. In particular we do not have a giant lock for condition variable operations, which some literature says you need.  Historically the Win32 Modula-3 threading library had a giant lock to aid in condition variable implementation.It was pretty bad.  Since pthread
  and Win32 are widely used, hopefully they are really good, and if not, will be improved for the vast majority of code to reuse. Tony, in your research, you should be sure to compare against Win32 SRWLOCK and newer versions of Windows (i.e. newer than XP). I'll try to read your paper.   - Jay> Subject: Re: [M3devel] [M3commit] CVS Update: cm3 (windows condition variables)
> From: antony.hosking at gmail.com
> Date: Fri, 8 Jun 2012 04:38:20 -0400
> CC: jay.krell at cornell.edu; m3devel at elegosoft.com
> To: dragisha at m3w.org
> 
> 
> On Jun 8, 2012, at 4:06 AM, Dragiša Durić wrote:
> 
> > Please explain this more, and if you can - draw parallel to *nix.
> > 
> > TIA
> > 
> > On Jun 8, 2012, at 4:05 AM, Jay K wrote:
> > 
> >> Note though that "LOCK" doesn't map directly to EnterCriticalSection and more significantly, m3core provides essentially condition variables, which don't map directly to Win32, prior to Vista.
> >>  (LOCK at least does a delay-heap-allocation-and-initialize before EnterCriticalSection, but also interacts with the condition variables I recall.)
> >>  
> >>  
> >> I did a bunch of "research" and our condition variable substitution is pretty good now, equivalent to what Java implementations do.
> >> Definitely better than others e.g. Boost.
> 
> We are certainly NOT equivalent to state-of-the-art Java implementations.  Take a look at http://dx.doi.org/10.1145/2093157.2093184 for example.
> 
> - Tony
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120608/9d54fc0d/attachment-0002.html>


More information about the M3devel mailing list