Feb 21 2010

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

Feb 7 2010

Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from Concrete Concurrency Models

Finally, my first workshop paper got published, which was a little odyssey with some misunderstandings, but anyway, now it is out. It is just a position paper, thus, do not expect to many insights. However, what it describes is my big plan, and hopefully the story of my PhD. Am working on it…

Abstract

The upcoming many-core architectures require software developers to exploit concurrency to utilize available computational power. Today’s high-level language virtual machines (VMs), which are a cornerstone of software development, do not provide sufficient abstraction for concurrency concepts. We analyze concrete and abstract concurrency models and identify the challenges they impose for VMs. To provide sufficient concurrency support in VMs, we propose to integrate concurrency operations into VM instruction sets.

Since there will always be VMs optimized for special purposes, our goal is to develop a methodology to design instruction sets with concurrency support. Therefore, we also propose a list of trade-offs that have to be investigated to advise the design of such instruction sets.

As a first experiment, we implemented one instruction set extension for shared memory and one for non-shared memory concurrency. From our experimental results, we derived a list of requirements for a full-grown experimental environment for further research.

Slides of the Talk at PLACES09


Aug 3 2009

Theory and Practice of Language Implementation, part 2

The second part of the summer school was a bit more applied and more in the direction of my own interests. Chandra Krintz talked about managed runtime environments. Yannis Smaragdakis introduced multi-threaded programming and transactional memory. Sumit Gulwani as the third lecturer taught us symbolic bounds computation.

As a cherry on the cake, Oliver Danvy talked about general tips and tricks for PhD students.

Managed Runtime Environments: Implementations and Opportunities

The content-part of her lecture started with an overview of how VMs execute programs. Well, as usual, it was limited to Java, Python, and Ruby. This gives me the feeling, that there are only very few people looking into the similarities between runtimes for functional and imperative languages. She talked about stack-based VM instruction sets and briefly mentioned register-based as well as register-memory-based designs, but mainly referring to CPU instruction set architectures. Interpretation techniques, just-in-time compilation, problems associated with profiling and instrumentation had been discussed, but neither of them in detail.

One topic, she was spending more time on was her own research, i.e., communication between independent JVM instances via shared memory. It was interesting, especially her approach to share classes between the VM instances by using shared pages and direct pointers from the instances.

The last lecture was a broad overview of cloud computing, available techniques and the current challenges, but not really technical.

Multi-Threaded Programming and Transactional Memory

Yannies gave more or less a hands-on introduction to locks and threads with programming examples/exercises. From the poll in the audience, there are actually people, which never have used threads before. I thought this is just one of the assumptions professors usually get wrong, but well… From my point of view, I have heard a lot of it already before, but it was still nice to be reminded of some of the details we discussed. The primitives for monitor-style/traditional shared-memory concurrency he identified were lock/unlock, wait, signal, and broadcast. They allow building any kind of more complex critical sections on top.

The basic points he emphasized are to use while-loops on all conditions and the rule for single signals vs. broadcast signals. In short, a single signal, i.e., a notify, can only be used when all threads waiting on a condition are equal, but only one at a time can make progress. If more then one can make progress, a broadcast, i.e., a notifyAll has to be used to avoid livelocks.

After some typical examples of problems with locks, for instance, locking order leading to deadlocks, he introduced transactional memory. His focus was on the implications of this programming model, the different variations, performance questions, and the problem of irreversible operations.

Art of Invariant Generation applied to Symbolic Bound Computation

The computation of bounds for e.g. loops has a broad range of applications. The knowledge about bounds allows estimating the necessary runtime or memory utilization, thus in general resource utilization. Furthermore, it can be used to identify secrecy properties in terms of information leakage due to repetitive patterns and problems of robustness due to errors and uncertainty for instance introduced by rounding.

After a short introduction and a simple example, he introduced a countless number of approaches to this problem and explained how to apply them to specific problems. His lectures was stuffed with a lot of content, think much more then any other lecturer tried to convey. Moreover, he managed to speak with an incredible speak. Have never heard someone before, putting an infinite number of words into one minute. Sometimes less is more…

Edutainment for the Night Lecture

Oliver was giving a Tips and Tricks lecture about being a PhD student, writing and reviewing papers, and giving talks. Presented in a quite entertaining style :)