Question about memory management in L4 Fiasco O.C + L4re

Adam Lackorzynski adam at os.inf.tu-dresden.de
Mon Sep 21 00:33:14 CEST 2015


Hi,

On Wed Sep 16, 2015 at 11:45:06 +0200, Mahdi Aichouch wrote:
> I updated the schema of the memory mapping of L4Linux and Fiasco O.C
> according to your corrections.
> Could you please take a look at it and tell me if everything is correct.

Looks ok. The upper middle box should also carry the L4Linux task colors
because the L4Linux kernel also has this memory.
 
> I have some questions about the way Fiasco O.C µ-kernel loads the L4 tasks
> into physical memory.
> 
> If I correctly understood, when Fiasco O.C creates a new L4 task it uses a
> copy-on-write
> mechanism to allocate physical pages in memory, right?

No, the microkernel has nothing to do with allocating pages to tasks, it
just offers the mechanisms to do so. The runtime environment does
however, and yes, moe, which is providing memory to tasks, provides a
copy-on-write mechanism to allocate memory for tasks.

> That means, the physical memory region allocated to an L4 task might not be
> formed
> by a contiguous set of physical pages.

It is true that the memory pages allocated to a task might not be
physically contiguous.

> Is it possible to make Fiasco O.C reserves a physical memory region
> composed by a
> set of contiguous physical memory pages when creating an L4 task?
> 
> If the answer is yes, could you please suggest an example showing the way
> to do it.

An application is typically composed of multiple memory regions in
virtual memory. Do you mean you want all those regions to be physically
contiguous, such as text-segment, bss and stacks? This should be
possible by using a memory allocator that makes sure this is the case.
However, currently, there is only the possibility to have dataspaces
physicall contiguous.

> My second question concerns the L4Linux tasks. Could you please tell me some
> explanation about the way L4Linux and Fiasco O.C load into physical memory
> the L4Linux tasks,
> and where can I find the code that is doing these operations.

Loading Linux programs is done by the Linux kernel as usual, there's no
difference for L4Linux. All the L4-specific memory adaptions are under
arch/l4, and you probably want to look at least into lib/pte.c,
kernel/dispatch.c and include/asm/generic/memory.h.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list