develooper Front page | perl.perl6.language | Postings from April 2005

Re: Sun Fortress and Perl 6

Thread Previous
From:
Nigel Sandever
Date:
April 27, 2005 05:14
Subject:
Re: Sun Fortress and Perl 6
Message ID:
1103_1114604045@nntp.perl.org
On 27 Apr 2005 08:21:27 -0000, rgarciasuarez@mandriva.com (Rafael Garcia-Suarez) 
wrote:
> Autrijus Tang wrote in perl.perl6.language :
> >
> > 4. Software Transaction Memory
> >
> > Like GHC Haskell, Fortress introduces the `atomic` operator that takes a
> > block, and ensures that any code running inside the block, in a
> > concurrent setting, must happen transactionally -- i.e. if some
> > precondition is modified by another thread before this block runs
> > completely, then it is rolled back and tried again.  This slides covers
> > some aspects of STM as used in GHC:
> >
> >     http://homepages.inf.ed.ac.uk/wadler/linksetaps/slides/peyton-jones.ppt
> >
> > In Fortress, there is also an `atomic` trait for functions, that
> > declares the entire function as atomic.
> 
> Interesting; and this rolling-back approach avoids the deadlock issues
> raised by the use of semaphores (like in Java's synchronization
> approach).
> 
> But, as the slides point out, you can't do I/O or syscalls from an
> atomic function; and in Haskell you can ensure that with the wise use of
> monads. Perl 6 has no monads, last time I checked...
> 

For an alternative approach to concurrency control, that sets out to be a 
possible future standard; specifically designed to address the shortcomings of 
Java's semaphores; that is in the public domain; has already been ported to 
several platforms in several langauges and is known to be implementable on both 
linux and win32; please see 

	http://gee.cs.oswego.edu/dl/cpjslides/util.pdf

for the potted overview, and 

http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html

for a fairly comrehensive examination.

Perl 6/Parrot probably doesn't need everything there, but it might form the 
basis for them.

njs



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About