Lisp HUG Maillist Archive

Actors package

I just completed version 1.0 of a new Actors package. This implements a system of Green threads across a dynamically expandable pool of OS Executive threads. Executive pools are created on first demand whenever an Actor exchange is initiated. Written entirely in LW Lisp, no external C libraries needed.

Initial benchmarks showed that a simple message send + thread teardown across 10 million Actors took about 82 seconds on my Mac Mini with 4 CPU cores. That’s 8 usec per context switch. The Mac remained responsive during that test, and the pool never needed to augment the original 4 Executives in the pool. The CPU meter showed a steady 270% utilization across all 4 cores.

The performance scales linearly from 1,000 Actors to 10 Million Actors. Below 1,000 Actors the test is too fast to get timings, and I didn’t bother attempting more than 10 Million Actors.

The Executive pool implements a system for managing the OS threads that allows for blocking activity in Actor green threads, whether the result of blocking I/O calls, or just compute bound Actors. A system watchdog keeps an eye on things to automatically spawn off additional Executive red pool threads if it detects that all of the pool Executives have been tied up for too long while Actors await in the ready queue. 

So this also solves the problem of deadlocks arising from Actor messaging loops. Most of the time, with normal activity, even with blocking I/O, things run happily given the other available Executives living in the pool. I put a limit of 1,000 Executives when growing before barking at the user. The system is very fluid and does not seem to bind up and become unresponsive.

SMP coordination is only needed in the Executive pool, the ready queue, global shared data (when you really must), and each Actor object when you need to read / write consistent data in the object itself. Actors otherwise maintain their own persistent state in closure bindings so that the code in their body can assume single thread unencumbered access to local state. Reentrant code is never needed in Actor bodies because they can only be instantiated for running on one OS thread. That’s a huge burden lifted from most complex code. So much so that portions of the Actor system were migrated to Actors when possible.

[ I’m too much of a lamer to deal successfully with GitHub after just trying to upload for the past half hour. I give up. ]

The Actor system benefits greatly from Doug Hoyte’s DLAMBDA and the Optima MATCH, although neither is mandated by the Actor system. These two just make life much nicer for you.

My earlier Butterfly system was entirely OS thread based and is quite versatile for distributed computing here in the lab and elsewhere. But it was always heavy compared to Erlang. Now we have the potential for the best of Lisp, combined with lightweight and simple to use concurrent programming.

- DM

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: Actors package

You can download a copy from refined-audiometrics.com/tekram/Actors.zip (25 KB)


Re: Actors package

I have received a number of e-mails worrying about the restrictiveness in my implied license. Apparently, somewhere in the code is found the statement: 

"Copyright (c) 2017 by Refined Audiometrics Laboratory, LLC. All rights reserved.”

That means nothing in reality. To repeat what I said to one person:

Fear not… I have no intention of limiting the use of the code contained in that Actors system. I know there has been a ton of commentary about various licenses, but honestly, it all makes my head spin. I’m a scientist, and I believe that knowledge belongs to no one, and to everyone. Let’s please unbind the wheels of progress. Use the code as you will, hack it to death, etc.


Any license stands as a warning to poachers, but it is toothless without resources to mount a challenge against inevitable poaching. I have that same issue with the Patents that I now hold. To me these are just trophies. And as an individual, I am powerless to mount a defense against a Google or an Apple. So come on, see the realities at hand.

- DM


On Oct 22, 2017, at 15:25, David McClain <dbm@refined-audiometrics.com> wrote:

Hi Zach,

Fear not… I have no intention of limiting the use of the code contained in that Actors system. I know there has been a ton of commentary about various licenses, but honestly, it all makes my head spin. I’m a scientist, and I believe that knowledge belongs to no one, and to everyone. Let’s please unbind the wheels of progress. Use the code as you will, hack it to death, etc.

Cheers,

- DM


On Oct 22, 2017, at 15:17, Zach Beane <xach@xach.com> wrote:

The license in the system file looks quite restrictive - is that what you had in mind? It is such that I'm not even going to look at the rest of the code for fear of unintentional copying.

Zach

On Sat, Oct 21, 2017 at 3:57 PM, David McClain <dbm@refined-audiometrics.com> wrote:
You can download a copy from refined-audiometrics.com/tekram/Actors.zip (25 KB)





RE: Actors package

It would probably be better to just make the license explicit. See, for example, the story of BusyBox:

 

https://torquemag.io/2013/03/busybox/

 

BSD/MIT/Apache are usually good choices.

 

-- 

Steve Nunez

Senior Director, Field Technical Services, APAC

+65 9623 5172

 

MapR_technologies_logo_signature_transparent

 

 

From: owner-lisp-hug@lispworks.com [mailto:owner-lisp-hug@lispworks.com] On Behalf Of David McClain
Sent: 23 October, 2017 06:34
To: Lispworks HUG <lisp-hug@lispworks.com>
Subject: Re: Actors package

 

I have received a number of e-mails worrying about the restrictiveness in my implied license. Apparently, somewhere in the code is found the statement: 

 

"Copyright (c) 2017 by Refined Audiometrics Laboratory, LLC. All rights reserved.”

 

That means nothing in reality. To repeat what I said to one person:

 

Fear not… I have no intention of limiting the use of the code contained in that Actors system. I know there has been a ton of commentary about various licenses, but honestly, it all makes my head spin. I’m a scientist, and I believe that knowledge belongs to no one, and to everyone. Let’s please unbind the wheels of progress. Use the code as you will, hack it to death, etc.

 

 

Any license stands as a warning to poachers, but it is toothless without resources to mount a challenge against inevitable poaching. I have that same issue with the Patents that I now hold. To me these are just trophies. And as an individual, I am powerless to mount a defense against a Google or an Apple. So come on, see the realities at hand.

 

- DM

 

 

On Oct 22, 2017, at 15:25, David McClain <dbm@refined-audiometrics.com> wrote:

 

Hi Zach,

 

Fear not… I have no intention of limiting the use of the code contained in that Actors system. I know there has been a ton of commentary about various licenses, but honestly, it all makes my head spin. I’m a scientist, and I believe that knowledge belongs to no one, and to everyone. Let’s please unbind the wheels of progress. Use the code as you will, hack it to death, etc.

 

Cheers,

 

- DM

 

 

On Oct 22, 2017, at 15:17, Zach Beane <xach@xach.com> wrote:

 

The license in the system file looks quite restrictive - is that what you had in mind? It is such that I'm not even going to look at the rest of the code for fear of unintentional copying.

 

Zach

 

On Sat, Oct 21, 2017 at 3:57 PM, David McClain <dbm@refined-audiometrics.com> wrote:

You can download a copy from refined-audiometrics.com/tekram/Actors.zip (25 KB)

 

 

 

 

 

Re: Actors package

Already done. Zip file contains MIT License terms.

- DM


On Oct 22, 2017, at 16:58, Steven Nunez <snunez@mapr.com> wrote:

It would probably be better to just make the license explicit. See, for example, the story of BusyBox:
 
https://torquemag.io/2013/03/busybox/
 
BSD/MIT/Apache are usually good choices.
 
-- 
Steve Nunez
Senior Director, Field Technical Services, APAC
+65 9623 5172
 
<image002.png>

Updated at: 2020-12-10 08:30 UTC