dynamic reconfiguration

ba_f ba_f at rbg.informatik.tu-darmstadt.de
Wed Aug 10 16:31:30 CEST 2016


Am 2016-08-08 23:51, schrieb Adam Lackorzynski:
> On Mon Aug 08, 2016 at 12:32:02 +0200, ba_f wrote:
>> Am 2016-08-05 15:08, schrieb Matthias Lange:
>> > Hi,
>> >
>> > On 08/04/2016 03:05 PM, ba_f wrote:
>> > > But, is it also possible to do some configuration during run-time i.e.
>> > > dynamic reconfiguration?
>> > > Here are two examples I can think of:
>> >
>> > Well, it depends ...
>> >
>> > > - IPC-Channels: Instead of defining Server and its Clients in conf.cfg
>> > > statically, is it possible to create IPC-Channel during run-time?
>> > > Let's
>> > > say, I have a L4re-App in conf.cfg defined as IPC-Server but, no
>> > > Clients, yet. Now, may any L4re-App create a IPC-Channel by itself and
>> > > such link to that IPC-Server?
>> >
>> > The answer is 'Yes.' and 'No'. The answer to the first question is that
>> > this is exactly what ned is doing. Ned creates an IPC gate object and
>> > maps it into the tasks as specified in the provided Lua configuration.
>> >
>> > The second is not possible for multiple reasons. The first one is, that
>> > the server side already needs the IPC gate object to bind its server
>> > loop to. Another task has no means to "lookup" the existing IPC gate
>> > object. In fact that's the idea behind a capability system.
>> 
>> So, what you are saying is this: In fact, Ned maps the IPC-Channels at
>> run-time but practically, one has to configure all IPC-Channels 
>> possible in
>> Lua.cfg, statically.
>> An ordinary L4Re-App is not able to link to an IPC-Server App if this
>> channel hasn't been configured in Lua.cfg, right?
> 
> Yes.
> 
>> In this case, the L4Re-App also cannot manipulate Ned or something at
>> run-time to create an IPC-Channel, afterwards.
> 
> It cannot because Ned does not have an interface to do that.
> Generally, if two tasks want to communicate, both need to have a cap on
> the ipc-channel. As those two cannot communicate (yet), there has to be
> a third component (with appropriate access to the two that want to
> communicate) to establish the connection.
> 
> Adam


Ok, I see it's not possible.
But, maybe I can take the chance for a deeper understanding.

This is how I understand things, now.
Please, correct me if I'm wrong:

1.) Moe starts first, followed by Ned.
2.) Ned parses lua.cfg and, on 'new_channel()' it creates a new IPC-Gate 
with
     l4_msgtag_t l4_factory_create_gate( l4_cap_idx_t factory, 
l4_cap_idx_t target_cap, l4_cap_idx_t thread_cap, l4_umword_t label).
3.) The IPC-Gate is a Kernel-Object and thus stored into the Kernel. 
(Does Moe help here?)
     'thread_cap' is stored/pushed into the servers capability table and 
'target_cap' is for the client task, aren't they?
4.) With l4re_env_get_cap() client & server look for a matching 
capability in their own cap-tables.

If I got it right, any Task can create an IPC-Gate at run-time and thus 
create child tasks with ipc-server or ipc-client capabilities, don't 
they?



Thanks,


ba_f



More information about the l4-hackers mailing list