[erlang-questions] Asynchronous Messaging support in the OS

Wink Saville wink@REDACTED
Wed Jan 24 08:04:34 CET 2007


Hello,

I have been working with a messaging framework for the last
4+ years and like many of the properties it has, but feel that
a significant empediment is that asynchronous messaging is
not directly supported by the kernel. For instance, I'd like to open
a file or network socket and receive a series of messages with
data asynchronously rather than having to "read" the data synchronously.

Anyway, I have implemented a proof of concept asynchronous
messaging system for the Linux kernel. This code adds the notion
of an "mproc", which is a thread with a queue plus messages and
auxiliary memory. Messages are sent to an mproc by placing the message
on its queue. At some time in the future the mproc will be awoken because
its queue is not empty. The mproc removes the next message from the
queue and performs any processing necessary. It then frees the message
and checks for another message. It will continue to process messages
until there are none at which time it will wait for more messages.

I was wondering if such a messaging system could be used with the
Erlang send/receive operations? Could someone point me to any
documentation that describes how Erlang implements its message passing?

For those interested, my proof of concept code is here
http://www.saville.com/linux/async/. I apologize in advance for the
lack
of documentation. Also, if you visit that page you'll find a little
documentation
on a technique I call ACE (Atomic Code Execution). I've documented that
as it is fundamental to my implementation and allows the kernel to
efficiently and asynchronously send messages to user space.

Thanks,

Wink Saville



More information about the erlang-questions mailing list