[MLton] Parallel Runtime System

Eric McCorkle ericmcc at cs.brown.edu
Wed Jun 13 20:55:01 PDT 2007


As part of my graduate work, I'm now working on a standalone runtime  
for concurrent functional languages.  My goal is to provide a  
compact, highly-parallel scheduler and memory manager which can be  
used as a runtime for languages like Standard ML.  I'm hoping to tie  
this system into MLton as an alternate runtime (if nothing else, to  
test other ideas I'm investigating, but I'd be more than happy for  
others to use it too).

This is the basic idea (I'll try to keep it succinct):  The scheduler  
system is an M:N approach.  The user scheduler can be either  
interactive (an epoch-based algorithm), or non-interactive (basic  
round robin).  Each system thread maintains its own structure, and  
shares work using a lock-free fifo.  The memory manager at the top  
level allocates large slices, which are managed using either garbage  
collection or a lock-free explicit malloc (Michael04, source code is  
in the paper).  The latter is necessary for the scheduler itself, and  
also to interact with C libraries.  The garbage collector (assuming I  
have time to do it) will be the Cheng-Blelloch algorithm, but with  
some sort of lock-free structure in lieu of the room/stack approach  
(which should eliminate the largest chokepoint for parallelism).

As of now, I have the non-interactive scheduler mostly implemented  
(as well as some CML code whose parallelism I'd really love to test).

I'm interested in the following:
* Anything I should know about how MLton allocates frames (I'm  
assuming you heap-allocate frames, of which I'm almost 100% certain,  
but if I'm wrong, let me know!)
* Does MLton use safe-points, and if not, what would it take to add  
them?
* How exactly do I start an MLton program (at the low level), what  
scheduler hooks do I need to provide, and what garbage collection/ 
allocation hooks do I need?
* Anything else I should know.

I'll probably be back with more questions/updates as I progress.

-- 
Eric McCorkle
Brown University
CS Graduate Student



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20070613/19f65202/attachment.htm


More information about the MLton mailing list