ambiguous services of children

Norman Feske norman.feske at ...1...
Wed Sep 24 14:31:21 CEST 2014

Hi David,

thank you for giving a bit more background about your work.

According to your description, the parent process spawns several
services as its children and wants to invoke any of those services in
any order. To accommodate this pattern (a parent uses a child as a
service), we introduced the so-called 'Slave' utility. To illustrate how
to realize a scenario like your's using this API, I have put together
the following example:

The example consists of two parts. The 'test-slave_master' is the parent
process, the 'test-slave_child' is the child that provides a "LOG"
service. In the example, the parent starts two instances of the child
service and subsequently invokes each of them. Hopefully, the example
guides you to the right direction. If you have questions about the code,
please don't hesitate to ask.

That said, let me point out a potential risk of this design. By having
the parent use its own children as services, the parent has to
inherently trust those children to respond to the RPC calls. In the
example, the parent calls the 'write' function at the child. If the
write function had bug (e.g., it keeps stuck in an infinite loop), the
parent would wait infinitely for the response of the function.
Consequently, the parent must trust the child in this respect.

If this is a problem for your scenario, I recommend to turn the
client-server relationship upside-down: Implement a service in the
parent where each child can pick up messages. So the each child calls
the parent but not vice versa.


Dr.-Ing. Norman Feske
Genode Labs ·

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

More information about the users mailing list