ActiveJava

Copyright Tristan Aubrey-Jones May 2008.

Abstract: A project investigating and developing an implicitly concurrent programming language, based on a metaphor taken from the physical world is reported. Uses a programming paradigm where programs consist of systems of autonomous agents, or active objects which communicate via message passing. A language enhancing Java with actors and linear types is presented. Example programs are written, compiled, and executed to evaluate the usefulness of the language. The language found to provide a familiar notation for implicit parallelism, and a compelling new model for concurrency, combining the performance of shared variables with the elegance of message passing.

Introductory Slides (PDF), Report (PDF),
ActiveJava compiler prototype (ajavac), ActiveJava runtime library (ajava_lang).

Examples:

calc - pocket calculator actor program
dining - dining philosophers actor program (never deadlocks)
sort - parallel quicksort implementation ("SortBenchmark" sorts 10,000 random integers using actors, java threads, and sequentially and compares)
To compile examples use:
compile.bat ./calc
compile.bat ./sort
compile.bat ./dining
To run examples use:
run ./calc Main
run ./dining Main
run ./dining Main fast
run ./sort Main
run ./sort SortingBenchmark

sortingBenchmarkResults.txt

home Home   up Up   ( Download )


Sorting Benchmark
Actors: 612ms
Threads: 693ms
Sequential: 972ms

12:51 16/04/2008 On Roo with 6 Processors
100 repetitions, array size: 1000,000 with identical arrays
MIN_PARTITION_SIZE 100,000

--

Sorting Benchmark
Actors: 554ms
Threads: 564ms
Sequential: 547ms

13:00 16/04/2008 On Tristan-64 with 1 Processor
100 repetitions, array size: 1000,000 with identical arrays
MIN_PARTITION_SIZE 100,000

---

Sorting Benchmark
Actors: 658ms
Threads: 691ms
Sequential: 1019ms

12:51 16/04/2008 On Roo with 6 Processors
100 repetitions, array size: 1000,000 with identical arrays
MIN_PARTITION_SIZE 100,000; Process priority high

---

Sorting Benchmark
Actors: 67ms
Threads: 73ms
Sequential: 77ms

12:39 16/04/2008 On Roo with 6 Processors
100 repetitions, array size: 100,000 with identical arrays
MIN_PARTITION_SIZE 10,000

--

Sorting Benchmark
Actors: 51ms
Threads: 54ms
Sequential: 52ms

12:41 16/04/2008 on Tristan-64 with 1 Processor
100 repetitions, array size: 100,000 with identical arrays
MIN_PARTITION_SIZE 10,000

--

Sorting Benchmark
Actors: 6ms
Threads: 21ms
Sequential: 3ms


13:15 16/04/2008 On Tristan-64 with 1 Processor
100 repetitions, array size: 10,000 with identical arrays
MIN_PARTITION_SIZE 500

---

Sorting Benchmark
Actors: 30ms
Threads: 37ms
Sequential: 7ms

13:20 16/04/2008 On Roo with 6 Processors
100 repetitions, array size: 10,000 with identical arrays
MIN_PARTITION_SIZE 500