Memory Safety Simplifies Microprocessor Design

Tags: , , , , , , , , , , ,

Contemporary microprocessor designs are based on pervasively shared mutable state. This introduces numerous vulnerabilities that have been exploited to violate the security of our computing platforms. Mechanisms to mitigate these hazards, such as Memory Management Units (MMUs), increase the complexity and power-consumption of CPUs. The movement to multicore processors amplifies the problem and adds more […]

Continue reading » 2 Comments

Serializers Revisited

Tags: , , , , , , , , , , ,

2021-06-08 EDIT: Added serializer implementation using only the actor message-event queue. One of the earliest concepts explored on this blog was the Serializer, which is a mechanism for providing exclusive access to a group of actors [1]. More recently, Carl Hewitt has referred to an extended version of this mechanism (with holes) as “Swiss Cheese”. […]

Continue reading » 1 Comment

Producer/Consumer Rate-Matching

Tags: , , , , , , , , , , , , , , ,

Flow control is a critical feature in a network of asynchronous communicating processes. Our fanciful exploration of a yak-shaving barber’s shop provided us with patterns we can apply to more general problems. The bounded-buffer mechanism is a generalization of our barber’s waiting room. It mediates between producers and consumers, matching the rate of production with […]

Continue reading » No comments

“Sleeping Barber” in Humus

Tags: , , , , , , , , , ,

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 […]

Continue reading » 5 Comments

Futures and Capabilities

Tags: , , , , , , , , , , , , , , , ,

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. […]

Continue reading » 2 Comments

Implementing Actors in Kernel

Tags: , , , , , , , , , , ,

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, […]

Continue reading » No comments

Erlang-style Mailboxes

Tags: , , , , , ,

One significant difference between message-passing in Erlang and the pure Actor Model is the Erlang concept of mailboxes. Actors don’t have mailboxes, at least not in the sense that they can be queried. Messages simply arrive at some non-deterministic time after they are asynchronously sent, invoking the current behavior of the actor. However, in Erlang, […]

Continue reading » No comments

Evaluating Expressions, part 7 – Transactions and Exceptions

Tags: , , , , , , , , , ,

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’ […]

Continue reading » 1 Comment

Evaluating Expressions, part 6 – Actor Primitives

Tags: , , , , , , , , , , ,

In part 6 of our series implementing programming language constructs with actors, we explore meta-circular definition of imperative actor primitives. We have now moved beyond expressions which yield values, and focus on statements which cause effects. The constructs explored here are the heart of any actor-based system. In order to support actor primitive statements, our […]

Continue reading » 5 Comments

Evaluating Expressions, part 5 – Recursion

Tags: , , , , , , , , , , ,

Some language environments provide an interactive interface called a Read-Eval-Print-Loop (abbreviated REPL). One key characteristic of a REPL is the ability to incrementally define, extend and re-define your environment. This is particularly challenging in a pure-functional context, such as the evaluator we have developed so far. Modularity and incremental development seems to imply the need […]

Continue reading » 4 Comments

“Dining Philosophers” in Humus

Tags: , , , , , , ,

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 […]

Continue reading » 2 Comments

Message Passing, part 1 – Synchronous Rendezvous

Tags: , , , , , , ,

What do we mean when we say “message-passing”. For Object-Oriented developers from the Smalltalk tradition, message-passing involves a dynamic method lookup, invocation of that method with the target object as an implicit parameter, and return of a result object. By contrast, message-passing in synchronous communication models (such as Ï€-calculus) involves “rendezvous” between sender and receiver, […]

Continue reading » 3 Comments

Composing Actors

Tags: , , , , , ,

A significant challenge in developing concurrent systems is the problem of composability. We create a solution that works properly in isolation, but when composed with other solutions leads to interference. The actor model ensures that individual actors may be composed without changing their behavior. Interference is prevented by definition, keeping the system consistent. In order […]

Continue reading » 16 Comments