Generating prime numbers with Erlang and Java

During my work with the course-ware of a new Erlang course, I experimented with one of the programming assignments to compare the threading performance of Erlang versus Java. The assignment is one of the classical programs from teaching concurrent programming: How to generate prime numbers using a pipeline of sieve threads. The algorithm is based on the Sieve of Eratosthenes, but modified to use threads instead. The primes in [2..N]…
Read more...The critical section problem in Erlang

The programming language Erlang is based on micro-threads and asynchronous message passing. There is a (naive) belief that critical section problems cannot arise in languages based solely on message passing. The justification for this stand-point is the absence of mutex synchronization primitives, which is absolutely essential in shared-data based concurrent languages. As we will shortly see, it’s more about the design of the data operations than what means of thread…
Read more...The ups and downs of Erlang

I just finished reading the paper A History of Erlang by its inventor Joe Armstrong. It’s really a fascinating story and I can really recommend reading Joe’s own words regarding the invention and development of the language. Back in the late 80′s and beginning of the 90s I spent some time with Joe and the other guys around Erlang. I wasn’t an Erlang advocate myself, rather the oppsite and we…
Read more...

