The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Wednesday, May 23, 2007

More forays into multiprocessor programming

From
"andrew cooke" <XXXXXXXXXXXXXXXXX>
To
sean@conman.org
Subject
Erlang bugs
Date
Wed, 23 May 2007 08:12:35 -0400 (CLT)

Hi,

Found your page (which references my Erlang Sudoku solver) via Technorati.

I can't for the life of me remember exactly what the cause was for the bug that you mention in that post, but I am pretty sure it wasn't to do with messaging or otherwise related to concurrency. A better explanation of why it was hard to track down is that the program is largely “indeterminate” in that the flow of control is unpredictable (because of random choices rather than concurrency itself).

However, when I added extra communication for the “community” version—http://www.acooke.org/cute/CommunityS0.html—that did have serious deadlock issues that were directly related to concurrency. And I was surprised at how easy they were (ie how easy it was to introduce errors)—I had somehow convinced myself that Erlang made everything much safer. In retrospect its advantage is not that Erlang's message passing somehow magically avoids deadlocking, but that (1) it provides a clean framework for thinking about message passing that's nicely isolated and easy to read and manage and (2) assuming you stick to the pure functional parts of the language, state is already explicit and so easier to reason about.

Andrew

(Couldn't see a way to comment on the page, so emailing instead)

Just another datapoint that writing concurrent programs, even in a langauge like Erlang which makes it easy, isn't easy.

Obligatory Picture

[The future's so bright, I gotta wear shades]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.