Concepting a new IPC (was Re: "DBus Embedded" - a clean break)
mardy at users.sourceforge.net
Thu Feb 3 23:32:36 PST 2011
On 02/03/2011 11:28 PM, Lennart Poettering wrote:
> On Mon, 31.01.11 22:16, Alberto Mardegan (mardy at users.sourceforge.net) wrote:
>> - making the D-Bus daemon create and maintain the shared memory
>> objects with the list of registered service names and match rules;
>> then implement direct p2p message passing, via sockets only
> How to you plan to make the SHM stuff safe? Lock-free? If not lock-free,
> how do you plan to ensure that arbitrary clients are unable to lock up
> the entire system by taking a lock and never giving it up?
I (maybe vaguely) explained that in my blog post .
It would be lock free. The tables could only grow, and deleted records would
just be marked for deletion and never reused. When the daemon thinks it's time
to compact the table, it would create a new one with the compacted data, write
its handle on a well-defined offset on the current table and finally flag the
current table as deleted.
This simple algorithm can work because only the daemon would have write access
to these tables.
http://blog.mardy.it <-- geek in un lingua international!
More information about the dbus