[M3devel] lock performance, random thoughts

Jay K jay.krell at cornell.edu
Tue Apr 6 02:13:07 CEST 2010


pthread_mutex_lock/unlock does not imply a kernel call. !

pthreads can synchronize in usermode just as well (or only almost as well?) as Tony's design.

Only upon contention is a kernel call needed, in both.

 

 

That's not to say that everyone implements this well.

Linux does.

Win32 does.

The others I don't know.

 

 

Also Tony avoids even atomic operations often.

I'm not sure how others compare there.

I'm just referring to kernel/syscalls.

Are they really so terrible?

 

 

 - Jay

 
> From: dragisha at m3w.org
> To: hosking at cs.purdue.edu
> Date: Tue, 6 Apr 2010 01:57:07 +0200
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] lock performance, random thoughts
> 
> I've used Java for one project, "GUI" app frontend for mobile phones...
> What I saw first was their mixup of mutex/condition/cheese in single
> root object... But, ok... offtopic there :)
> 
> What I think is important about whole idea is it's simplicity and
> (almost) obvious efficiency. It also needs nothing fancy (not today, at
> least) and nothing maybe-it-works to implement. Nothing comparable to
> early implementations of kernel space threading/thread suspending for
> gc/...
> 
> Any takers? :)
> 
> 
> On Mon, 2010-04-05 at 19:45 -0400, Tony Hosking wrote:
> > Yes, that's pretty much what modern Java implementations do.
> > 
> > 
> -- 
> Dragiša Durić <dragisha at m3w.org>
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100406/e8ca6a52/attachment-0002.html>


More information about the M3devel mailing list