Page 1 of 1

Actor Model OS

Posted: Fri Jan 18, 2008 2:06 pm
by jvff
Hello,

lately I was wondering about "everything is a file" concept and if it would be possible to extend to "everything is an actor" metaphor. It seemed interesting because it possibly allows a more abstract and general abstraction (?). It also seems to suit well for an OS for concurrency.

However it seems that messages are passed to actors blindly (ie. anonymous messages). This prohibits an execution model similar to co-routines (where values are returned) and requires a more flexible continuation forwarding model. Are there design complexities or difficulties about adapting everything to such model?

Also, I assume it should be possible to nest actors. Having a file system of actors allow named addressing of the actors, possibly a standard interface and sand-boxing. However actor sharing could be difficult. Consider for example an actor "/dev/floppy", if a user logs in, it would be more secure to fork a new sand-boxed tree for the user, however how would he share the floppy? Would it be a symlink? Would it be a "portal" actor, redirecting messages? How secure would that be? Maybe it's more secure to have the parent actor tree have it's fork nested and probing for changes to store later.

Probing seems more secure, since the parent has control, however probing introduces overhead. For a tree actor model it would be nicer to have a floppy tree containing listener changes (ie. writes are forwarded to listeners). But again, because the listeners are contained in a forked tree it can't access the real floppy without a portal actor or parent probing.

Other problems arose in the idea. Files. How are files actors? The stub solution is to have a "view" message which receives an actor address to forward all of it's contents (or a range of it) and to have a "update" message which would be like a diff patch.

Another thought: if the actors are nested, wouldn't it be better to have child helper actors that receive specific messages. Then there's less message parsing overhead. Example: in the above file actor, it would have two children: file.view, file.update . Then the message would be simply the arguments.

One last thought: actor componentry. Perhaps it would be nice to have some atomic actors (if-then-else, screen.out, screen.pixels, keyboard, mouse, and basic datatypes and functions (like map, cat, cascade, list, node, timer, etc.) and build actors through wiring of these atomic actors. For speeds sake, a partial evaluated would compile the static parts.

As you can see, I quite like the idea, however I'm still struggling on an implementation plan, which is why I need all the feedback I can get. Thanks,

JVFF

Posted: Fri Jan 18, 2008 3:07 pm
by mathematician
I'm not sure if I am understanding you aright, but there are already event driven operating systems in existence. When somebody strikes a key, or clicks a mouse button, that can be used as a cue to send a message to an application. Probably only if an application requests it, the PIT can similarly be an actor in sending a message; first to the OS's interrupt handler, and then to the application. The problem with having files as "actors" is that there is no hardware support for it, and no obvious way in which they could actively attract the OS's attention.

Posted: Fri Jan 18, 2008 5:41 pm
by jvff
Not necessarily hardware level actors. Actors would substitute processes, threads and possibly API calls. Similar to a microkernel, you request what you need, but in this case, the servers are Actors. Hope it clears it up a bit,

JVFF

Posted: Fri Jan 18, 2008 10:42 pm
by Telgin
Sounds like a little change in terminology for the most part. For common objects such as files and devices anyway, it's not much of a change.

Extending it to things like processes and users however might be useful. I could see how this could be beneficial and logical, but on the other hand it might possibly make the OS considerably harder to develop. Lots more design in store, I'd imagine. Plus, it would probably incur a performance penalty, but that might not be so different from a traditional microkernel.

If it's just a standardized means of representing objects of all types internally, then it sounds like a reasonable and practical idea.

Posted: Sat Jan 19, 2008 4:42 am
by jvff
Internally it would be just a data structure (trees), a standard interface (message passing), and a specialised scheduler to handle the actors. I still don't know how specialised, but I assume it would be similiar to standard models that support a very large number o lightweight threads. Thanks for the replies,

JVFF