Im familiar with the actor pattern but completely naive to their implementation. I’m having trouble imagining a few things and might be way off the mark. A few questions that might help others resolve my confusion:
1. Are there as many processes as there are cores on the CPU?
2. Is there a single message queue shared across cores?
3. Presumably two networking actors or two filesystem actors could be processing different messages on different cores and hardware resources can still be contested?
I'm only familiar with implementing run-to-completion actors. If a message is sent to an actor, the actor's behavior needs to run to process the message. You could have a message queue per thread (physical or logical core), or a message queue per actor, with a separate scheduler to decide when each actor should get a chance to run. There are obvious performance benefits to keeping communication local to a core, so hierarchical architecture where there are core-local actor networks and cross-core networks can make sense.
As to your final question, actors processing messages is a computation, i/o of any kind would involve sending messages to other lower-level i/o actors that multiplex or coordinate access to individual hardware resources.
1) Typically the number of actors and hardware threads are disconnected and it uses some MxN scheduler. There's a lot of related techniques here, green threads, user threads, coroutines, fibers, etc. Though the implementation under discussion here only uses one hardware thread, and looks a lot like the single threaded models like how node wraps libuv.
2) It can be thought of as at least one message queue per actor.
3) Yep.
> 3. Presumably two networking actors or two filesystem actors could be processing different messages on different cores and hardware resources can still be contested?
I won't presume this is how DbgOS works, but considering that the author mentions writing drivers as actors, I would imagine that two actors would not be allowed to represent the same underlying resource. You would have one actor for each device, then and only then can any number of other concurrent actors build functionality on top of it through message passing.