Writing to two different dataspaces at the same time

Martin Stein martin.stein at ...1...
Thu Jan 21 14:57:22 CET 2016


Hi David,

Am 21.01.2016 um 14:14 schrieb David Werner:
> My goal is to have access to the memory content of a component at a 
> certain point of time without stopping the component (the threads of the 
> component). So my idea was to maintain a second dataspace (same size, 
> same content) for each dataspace that is attached to the RM session of 
> the component as a copy. So when i want to inspect the memory content i 
> just stop writing to the second dataspace and inspect this dataspace 
> instead of the "main" dataspaces. This way the component would be able 
> to keep running.

I wonder why you don't want to pause the component? You would have to
stop your carbon-copy code anyway to get a consistent state.

In general, I think the problem with your idea is not Genode but the
hardware. Genode only manages the mapping from physical to virtual
memory. As soon as this mapping is available to the MMU, the access to a
virtual address is completely handled by hardware and there is no way
for Genode to interpose itself except by removing the mapping again. So,
as long as the hardware doesn't provide such multi-accesses, Genode
can't change this for mapped addresses.

That said, the instruction-emulation solution I mentioned uses the fact
that you can interpose every memeory access to a virtual address if you
never map it. So, on every access you get a fault that is forwarded to
the code that does the carbon-copy.

Another solution would be a second component that polls for the memory
state of the supervised component. This might be efficient if your
interest is restricted to a small range of the target address space.

Cheers,
Martin




More information about the users mailing list