Book:Support:Launch

Not logged in

Launching applications and components

Starting child components

True to its philosophy, Genode does not have a 'global' launching authority : once booted into its static 'init' configuration, new components can be launched dynamically, but they will have to do so with resources transferred from the parent -- i.e. you're not "scripting" another component to handle the load for you.

ToDo: look at...


Reliability, monitoring

Some related topics of interest are that of monitoring children for health, and/or automatically relaunching them when they fail -- something akin to linux's launchd, or to Haiku's launch_daemon.

The app itself generally won't deal with the problem on its own, with a few exceptions:

 In the few cases where an
application intents to adapt itself the its resource budgets, Genode
allows a component to request its available budgets
(Env.pd().avail_ram()) but this is a special case.

One particular flavor of that problem on Genode is when a component runs out of resources (RAM, capabilities..). If launched from the static 'init', the quota exhaustion simply leads to a LOG message and the app hanging forever (Genode::sleep_forever() ?).

Some apps may need to handle that scenario with a view on improving reliability. For instance automatically restart the component that has run out of memory (of course the component must be able to "find its bearings" and resume work where it was left off, otherwise that solution is not valid).

* todo: look at repos/os/src/app/sequence -- and in the latest 19.05, the new "keep_going" configuration flag could allow its use as a "launch_daemon" for automatically restarting an app that has crashed and exited? though does it have a "loop" mode or does it require duplicating entries 10 times for 10 restarts e.g. ?)

==> sequence only restarts the child app once it has exited/quit; it's not going to detect that the child is stuck asking for resources.

Very interesting discussion of the problem by Norman here:

https://lists.genode.org/pipermail/users/2019-September/006902.html

I.e. take a page from Sculpt and use a second 'init' process that works more dynamically, and in tandem with a 'manager' process.

Then one possibility is to kill-restart the component (writing an incremented field in the rom/config section for said component).

xx ToDo