sriram srinivasan

What is Kilim?

Kilim is a message-passing framework for Java that provides ultra-lightweight threads and facilities for fast, safe, zero-copy messaging between these threads.

It consists of a bytecode postprocessor (a "weaver"), a run time library with buffered mailboxes (multi-producer, single consumer queues) and a user-level scheduler and a type system that puts certain constraints on pointer aliasing within messages to ensure interference-freedom between threads.


Hardware facilities are getting distributed, from the micro to the macro levels -- increasing numbers of cores, CPUs in a box, boxes in a data center to a multitude of data centers. The current crop of software architectures, languages and idioms are not suited to this trend. Here are a few reasons:

The combination of lightweight threads plus message-passing is a good fit for the emerging world. It permits us to blur the line between concurrency and distribution -- the API (send/receive) is the same (although the failure modes and frequencies may be different), and allows a uniform set of tools for debugging, profiling, and verification. For example, the most common verification tool in practice, the SPIN model checker, is based on a message passing mindset. There is a good reason why Tony Hoare used "communicating sequential processes" as a model for verification.


The software is released under a MIT-style open source license. I have removed the isolation type system from this version because I've decided to rewrite it.

Sources+docs+bugs on github: kilim

Discussions at the kilimthreads google group

Please send feedback, suggestions, fixes to kilim @


Kilim: A server framework with lightweight actors, isolation types and zero-copy messaging
University of Cambridge Tech Report [UCAM-CL-TR-769], and PhD dissertation.

Kilim: Isolation-Typed Actors for Java. [ pdf ]
Sriram Srinivasan, Alan Mycroft
European Conference on Object Oriented Programming ECOOP 2008, Cyprus.

A Thread of One's Own. [ pdf ]
Sriram Srinivasan
New Horizons in Compilers Workshop, HIPC, Bangalore 2006


Kilim: Isolation-typed actors for Java [PDF]
These slides accompany a Google tech talk ([Google Video])