[M3devel] lock performance, random thoughts

Daniel Alejandro Benavides D. dabenavidesd at yahoo.es
Wed Apr 7 05:30:38 CEST 2010


Hi all:
I remember that someone inside Acorn reported their use was overwhelming if running in user mode and gave an interesting idea about that in terms of operating system development. They wrote a huge amount of Modula-2+ code even with GUI in Acorn (Olivetti) for the Acorn Archimedes workstation in middle end eighties for its development
As the language primitives were the same in use at DEC SRC I guess they didn't consider the language as the problem, but a machine architecture lack of performance factor and in turn affect programs performance by itself. However this got into the development of the ARM architecture introduced since then for the Archimedes ARM and the OS itself.
http://lists.cloud9.co.uk/pipermail/bbc-micro/2010-January/007795.html
http://www.chiark.greenend.org.uk/~theom/riscos/docs/ultimate/a252swp.txt

As a new operating system belongs to a new era the SPIN OS was ahead of its time in terms of performance improvements and no been hit by itself (in terms of performance) which was not an issue because of its nature of safety but still they addressed the use of other operating system code at the operating system level which of course gave problems of performance  but didn't  play a important issue by itself as non safe code could be extra checked or run in space of kernel with no user rights to modify heap allocated space or if not needed to be run in kernel space as a client of an extern library OS in user space with no use in kernel space

IMO both approaches either hardware level and operating system level have pros and cons as the operating system level threading is a plus nowadays in multi threaded programs running on multi core equipped hardware but in most cases the use of it could be not a winning situation because not all hardware by its own is multi core in new computer Minis (net books) or systems run in hardware assisted virtualization and not to forget old machines which in most cases can run many applications no multi threaded of today like we use in normal with no performance improvement in new ones on tasks which may no benefit of the extra hardware that may still have at hand so there could be a balance that could benefit most of all cases. Therefore not to say that we may suck user level threading but still considering as a important part of it and needing a new development for the cases of lack of performance an improvement over the cases it lacks and better use of the
 better hardware like in Acorn did use of the new development to aid it.

Probably the best solution is a matter of match between the underlying hardware with proper system-level handling of it to best performance and less penalty in favour of the language developer and final user just to get easier of development and performance gain  solution.
    
My vote for operating system level threading (i.e of SPIN) if lacks of performance of faster user threading as a solution for the performance hit problems and user level threading for the systems with no gain over it   so we may gain of language and hardware capabilities to extract the best of both.  


--- El lun, 5/4/10, Jay K <jay.krell at cornell.edu> escribió:

De: Jay K <jay.krell at cornell.edu>
Asunto: Re: [M3devel] lock performance, random thoughts
Para: dragisha at m3w.org, "Tony" <hosking at cs.purdue.edu>
CC: "m3devel" <m3devel at elegosoft.com>
Fecha: lunes, 5 de abril, 2010 19:13




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/20100407/0e1630e2/attachment-0002.html>


More information about the M3devel mailing list