Tag Archives: Manycore

The Price of the Free Lunch: Programming in the Multicore Era

Last Friday was the annual Lab event of our Software Languages Lab. Like last year, many people related to the lab in one or the other way came to get an overview of what the current topics of our research are.

This year, we presented our research in the form of a Pecha Kucha talk. That means every presenter got 20 slides to present and each of the slides was shown exactly 20 seconds. That gives enough time to convey the general idea, but avoids boring the people with endless technical details.

All in all, that worked out pretty well.

My talk gave an overview of what the Parallel Programming Group is up to, on a very high level. It motivates why we are doing research in languages and language runtimes/virtual machines, and names our approaches to tackle the challenges. Well, for researchers in the field that is probably to vague, but everyone else might get just enough out of it to see in which direction we are going.

 

 

RoarVM: The Manycore SqueakVM

We are happy to announce, now officially, RoarVM: the first single-image manycore virtual machine for Smalltalk.

The RoarVM supports the parallel execution of Smalltalk programs on x86 compatible multicore systems and Tilera TILE64-based manycore systems. It is tested with standard Squeak 4.1 closure-enabled images, and with a stripped down version of a MVC-based Squeak 3.7 image. Support for Pharo 1.2 is currently limited to 1 core, but we are working on it.

A small teaser:
1 core   66286897 bytecodes/sec;  2910474 sends/sec
8 cores 470588235 bytecodes/sec; 19825677 sends/sec

RoarVM is based on the work of David Ungar and Sam S. Adams at IBM Research. The port to x86 multicore systems was done by me. They open-sourced their VM, formerly know as Renaissance VM (RVM), under the Eclipse Public License. Official announcement of the IBM source code release: http://www.stefan-marr.de/rvm-open-source-release/

The source code of the RoarVM has been released as open source to enable the Smalltalk community to evaluate the ideas and possibly integrate them into existing systems. So, the RoarVM is meant to experiment with Smalltalk systems on multi- and manycore machines.

The open source project, and downloads can also be found on GitHub:

http://github.com/smarr/RoarVM
http://github.com/smarr/RoarVM/downloads

For more detailed information, please refer to the README file.
Instructions to compile the RoarVM on Linux and OS X can be found in the INSTALL file.
Windows is currently not supported, however, there are good chances that it
will work with cygwin or pthreads for win32, but that has not be verified in
anyway. If you feel brave, please give it a shot and report back.

If the community does not object, we would like to occupy the
vm-dev@lists.squeakfoundation.org mailinglist for related discussions. So, if
you run into any trouble while experimenting with the RoarVM, do not hesitate
to report any problems and ask any questions.

You can also follow us on Twitter @roarvm.

RVM Open Sourced, Soon to be known as RoarVM

Just a brief heads up before the actual announcement of RoarVM.

The Renaissance VM has been open sourced. The official contribution of IBM Research to the open source community can be found here: The Renaissance Virtual Machine: Open Source Release Announcement.

The code is already posted to GitHub and somewhat extended to make it actually useful. Please feel free to head over to http://github.com/smarr/RoarVM, play with the code, try the VM with your image, and report back.

The official announcement will be send out in the next couple of days, but any feedback we could get before hand would allow to fix issues before the community gets started with the VM.

SPLASH’10 Main Conference

 

Tuesday – Evolution, Onward!, FPGAs, and the Hera-JVM

On Tuesday the main conference started with its keynotes and research tracks.

The keynote of Stephanie Forrest was an interesting introduction to how evolutionary approaches could be used in software development. One goal they are currently pursuing is fixing of certain types of bugs by reordering, deleting, and/or copying of parts in an AST. Well, that can not fix every bug, but might be interesting for many typical problems. Certainly the type of bugs I run into most frequently…

Onward! started with three interesting talks in the area of languages. The first on Registration-Based Language Abstractions presented an IDE approach to bringing high-level constructs to existing code-bases. You basically have an “imaginary” view only present in your IDE of what the low-level implementation details actually are meant to represent. Examples were simple standard Java for-loops using C-like notation getting replaced by for-each loops, or even whole class bodies getting simplified by abstracting from typical getter/setter patterns, or even delegation patterns. Neat!

Toon’s talk on Pinocchio: Bringing Reflection to Life with First-Class Interpreters advocated fully reflective systems that make it easy to build bug-specific debuggers. Thats a great idea, unfortunately not feasible in VMs which are not build in a meta-circular fully reflective way, I think. :( We definitely need something more sophisticated for RoarVM than printf…

The last talk on this track was on Concurrency by Modularity: Design Patterns, A Case in Point. Well, on the one hand I agree, there are certain design patterns from the gang of four which can be parallelized, however, that does not solve the problem of share state… The point that increased modularity will increase you degree of possible parallelism might be appealing but it is only a correlation and not a strict causal relationship.

The presentations after lunch were addressing performance from the angle of FPGAs. The presentation on Lime: a Java-Cpmpatible and Synthesizable Language for Heterogenous Architectures made a case for object-oriented programming for FPGAs. The idea is to have a superset of Java, with a few additional keywords, that is than mappable to hardware. As far as I understood, Lime is basically a stream-based language and thus favors data-oriented programming. The second talk was titled From OO to FPGA: Fitting Round Objects into Square Hardware? Interesting for me were the challenges they had to overcome to actually implement an OO language on top of an FPGA. The problem is mainly today’s available tool chains, that usually support only a very restricted subset of C.

The second session in the afternoon included the most related talk to my own research, a presentation on a port of the JikesRVM to the Cell processor: Hera-JVM: A Runtime System for Heterogeneous Multi-Core Architectures. The heterogenous instruction set was not the biggest challenge here, but the restricted local memory of the SPEs required them to pull a few tricks. Not only the size, but also the non-shared memory approach gave problems. To support the full semantics of the JMM, they had to implement a coherence mechanism in software. Have seen something similar for the read-mostly heap in our RoarVM before ;)

Afterwards, I arranged the necessary details for our Birds of a Feather meeting on Non-deterministic Programming.

Wednesday – Assertions tested by the GC, Dynamic Parallelization

On the OOPSLA track, I followed a talk on What Can the GC Compute Efficiently? This was an interesting talk, since I haven’t heard about anything similar before. The general idea is, that the GC supports an assertion system which allows to express a certain number of directly determinable properties. While the GC is doing its normal job, it can also check those assertions and verifies the described invariants almost for free. Again, neat :) Of course, the system has certain restrictions and the assertion language basically needs to ensure that the assertions can be checked in a single pass.

In the second session, Charlotte gave her talk on Dynamic Parallelization of Recursive Code. Have seen a presentation on her idea before, so most of the time I was think how could that be made fast. Would be great if she would purse the same idea in a Tracing JIT setting *sigh* Just for the fun of it, I suppose :) I bet there could be something in the idea of moving all the tracing, branch-prediction and speculative execution out of the CPU into the software. If they are really going for dump and small cores in the many-many-core world, we could squeeze at least some speedup out of those sequential algorithms. See the workshop paper by András Vajda and Per Stenström. Cool stuff, all that automatic parallelization non-sense with out the speculating part won’t work anyway ;)

Thursday – Search without Objectives,

The day started with a very interesting keynote. The take-away point is, if your goal is not reachable in a number of steps you can already predetermine, i.e., if you don’t have all the basic ingredients, than the typical goal-driven search approaches do not deliver good results. Instead of using a metric of whether your search brings you closer to your goal, you should us a metric that rewards novelty, interestingness, or just the differentness from the points you have reached in your search before. Searching with such a metric leads much more probable and typically a lot faster towards your initial goal. Kenneth Stanley present a number of very convincing arguments, but in the end he had also to admit that this approach is somehow constraint in its applicability by the rules of society. But at least we should try. So, on to something new!

The second keynote of the day was a bit too, ehm, applied? Well, it was certainly interesting to see what the influence of the F# team was on the .NET platform, but well, there was not really meat in that talk. From a theoretic perspective the CIL of .NET appeals to me much more than the JVM Bytecode set, but well, he was not talking about such low-level questions…

Afterwards, I followed the last OOPSLA session. Mainly out of curiosity what ownership types are all about. Now I have seen three talks, and can be reassured, they are not relevant for my VM design. Good. Well, the point is, such a type system just does not fit with a VM. Dynamic languages can not be sensibly compiled to such a type system, I think. Thats more a gut feeling than a great insight, but I don’t see how they match.

The last session of SPLASH for me was the short paper session of the Onward! track. It started very interesting with an experiment on how performance metrics can be turned to sound: Sonifying Performance Data to Facilitate Tuning of Complex Systems. I should try that for our VM, any approach is better than the one I use now… no at all *sigh* Well, our boids simulation already indicated a bug once, but well, if it is not used… Anyway, the talk was interesting, and the results could inspire further experiments.

The last talk was David’s: Harnessing Emergency for Manycore Programming: Early Experience Integrating Ensembles, Adverbs, and Object-based Inheritance. What should I say, of course David mentioned the RoarVM :) Thats great. But if it comes to the language, there are still a lot of open questions. Interestingly, David really managed to get the people thinking about the problem he presented. It was a small little puzzle of language design, something that seemed to appeal to the audience. He got some suggestions, but well, no ground breaking new idea as far as I could see. Hope they will follow up on it offline.

And that was SPLASH’10. Should have went to Lake Tahoe, saw some nice pictures of the nature, but hadn’t had the time :( Conclusion, Reno was just the right place to focus on work…

 

Towards an Actor-based Concurrent Machine Model

Already quite a while ago, I was involved in writing a workshop paper about an actor model for virtual machines. Actually, the main idea was to find a concurrency model for a VM which supports multi-dimensional separation of concerns. However, AOP is not that interesting for me at the moment, so I am focussing on the concurrency, especially the actor-based VM model.

After one year, I am back looking at that paper, and it still looks like a great model. Think, I will incorporate it into my manycore VM now :)

Abstract

In this position paper we propose to extend an existing delegation-based machine model with concurrency primitives. The original machine model which is built on the concepts of objects, messages, and delegation, provides support for languages enabling multi-dimensional separation of concerns (MDSOC). We propose to extend this model with an actor-based concurrency model, allowing for both true parallelism as well as lightweight concurrency primitives such as coroutines. In order to demonstrate its expressiveness, we informally describe how three high-level languages supporting different concurrency models can be mapped onto our extended machine model. We also provide an outlook on the extended model’s potential to support concurrency-related MDSOC features.

  • Towards an Actor-based Concurrent Machine Model, Hans Schippers, Tom Van Cutsem, Stefan Marr, Michael Haupt, Robert Hirschfeld, Proceedings of the fourth workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS), New York, NY, USA, ACM (2009), p. 4–9.
  • Paper: PDF
    ©ACM, 2009. This is the author’s version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ICOOOLPS’09 July 6, 2009, Genova, Italy. http://doi.acm.org/10.1145/1565824.1565825
  • BibTex: BibSonomy