Tag Archives: concurrency

“Same Fringe” Revisited

The fringe of a binary tree is simply the sequence of leaves reading from left to right [1]. Comparing the fringe of two binary trees to see if they are the same has been described as the simplest problem that requires multiprocessing or coroutines to easily solve [2]. The challenge is to stop the comparison […]

Posted in Uncategorized | Also tagged , , , , , , , , , | 1 Comment

“Sleeping Barber” in Humus

The “Sleeping Barber” problem is another classic concurrency example. As with our previous discussion of “Dining Philosophers”, actors allow a novel approaching to solving this problem. We will adjust a few of the details to enhance the metaphor and have a bit of fun with it. Our metaphorical barber provides yak shaving services. Yaks arrive […]

Posted in Uncategorized | Also tagged , , , , , , , , | 5 Comments

Futures and Capabilities

In the Actor Model, concurrency is the default. Sequencing must by arranged explicitly. An important case of sequencing occurs when there is a data dependency between different parts of a system. One part produces a value that another part needs to perform its function. One mechanism for sequencing data-dependent operations is to create a Future. […]

Posted in Uncategorized | Also tagged , , , , , , , , , , , , , , , | 2 Comments

Implementing Actors in Kernel

Now is the time we come full-circle in our exploration of Kernel/Scheme/LISP and show how Actors can be implemented on this foundation. This should dispel the notion that Actors are just functions/procedures. Sure, when an Actor receives a message you could say that the message is “applied” to the Actor’s current behavior. In that sense, […]

Posted in Uncategorized | Also tagged , , , , , , , , , , | Leave a comment

Playing the Stooge with Humus

Happy New Year and welcome to 2011. With the coming of the new year, I’m happy to announce the availability of a simulator/debugger environment for Humus, currently hosted at http://dalnefre.com/humus/sim/humus.html Please note that this is a simulator of the Humus language written in JavaScript, so it runs very slowly. It is intended to allow experimentation […]

Posted in Uncategorized | Also tagged , , , , , , | 1 Comment

Evaluating Expressions, part 7 – Transactions and Exceptions

In part 7 of our series implementing programming language constructs with actors, we implement parallel execution of block statements. Parallel execution motivates the use of single-assignment data-flow variables. We also introduce transactions and exception handling. The only extension required to our grammar from part 6 is the inclusion of a THROW statement: stmt ::= ‘LET’ […]

Posted in Uncategorized | Also tagged , , , , , , , , , | 1 Comment

Evaluating Expressions, part 3 – Pairs and Parallelism

In part 3 of our series implementing programming language constructs with actors, we explore parallel evaluation of sub-expressions and introduce pairs.  Pairs allow the construction of tuples, generalizing structured multi-part patterns and values. In order to support pair expressions and patterns, we’ve refactored the grammar from part 2 to separate out literal constants expressions and […]

Posted in Uncategorized | Also tagged , , , , , , , , | 5 Comments

“Dining Philosophers” in Humus

The “Dining Philosophers” problem is a classic example used to illustrate various challenges with concurrency. We will approach this problem by incrementally designing the actors which model the problem and its solution in Humus. Through this example we will explore the avoidance of deadlock and starvation in the design of actor-based systems. Basic Thinking/Eating Cycle […]

Posted in Uncategorized | Also tagged , , , , , , | 2 Comments

Solving “Same Fringe” with Stream Generators

A classic problem in concurrent programming is known as the “same fringe” problem [1]. What is the same fringe problem? As described by Richard Gabriel [2]: The samefringe problem is this: two binary trees have the same fringe if they have exactly the same leaves reading from left to right. There are many different approaches […]

Posted in Uncategorized | Also tagged , , , , , , | 8 Comments