Page 1 of 1

Recursive adress space construction in L4

Posted: Thu Jun 23, 2011 2:15 pm
by cet
Hi,

i am new to OS Design, and i started poking around with L4. Now i am very confused about the MM part of L4, especially the recursive model for adress space construction.

What i understand is that initially there is sigma 0, which inherits all physical memory. All the initial mappings are indempotent, that means the corresponding virtual adress maps directly to a physical adress and both adresses are equal.

Now for adress space manipulation at user level one has three basic operations: map, unmap and grant, which allow for recursively constructing an adress space, as well as sharing memory (from what i understood).

So if have 2^32 aka 4 GB of virtual memory, 4 GB phyiscal memory, and i elevate all physical memory to a pager, let's say sigma 1, is it then not possible to map items in a new adress space anymore ? Because sigma1 would just be that whole adress space, no new adress spaces can be constructed ? Or do i understand wrong.

Greetings
cet

Re: Recursive adress space construction in L4

Posted: Fri Jun 24, 2011 10:44 am
by cet
berkus wrote:sigma1 can grant (or map) address space to its clients.
Hi,

yeah, so that means in the specific case above, that means when all virtual memory adresses are assigned to adress space sigma 1, you will not be able to map an item to a new adress space anymore ?

Re: Recursive adress space construction in L4

Posted: Fri Jun 24, 2011 12:23 pm
by xenos
IIRC, granting memory in L4 means that it is unmapped from the granter's address space (sigma1 in this case). So initially sigma1 owns the whole memory, but through granting it donates this memory ownership to child processes.

Re: Recursive adress space construction in L4

Posted: Fri Jun 24, 2011 3:24 pm
by cet
It is hard to explain, so i try again. When i have 4GB of physical memory and 4GB of virtual memory, aka i am on 32 bit and cannot adress more than 4GB of virtual memory. Now when sigma1 has all the memory beeing granted from sigma0, then it has full control over all the memory beeing available in the system. There exists a page table which describes the adress space of sigma1. It will possess entries of every single (virtual) adress available in the system.

Now when you want to map some parts of this adress space to a client, then what happens is that there will be a mapping like this. V -> sigma1. But the problem is, that V shouldn't exist, since there are no more adresses available in the system. Sigma1 has ALL. Now does this sound weird ? It is a virtual adress outside of adress space sigma1, which shouldn't be possible, since sigma1 is the only, overall adress space in the system.

Now when i understand correct, you wouldn't be able to perform a mapping operation anymore, in such a case. Only granting would be possible. And that was the question. I think on a 4GB physical/virtual memory system, you cannot map any items anymore, only granting ?

Re: Recursive adress space construction in L4

Posted: Fri Jun 24, 2011 4:00 pm
by cet
Ok thanks for the help.

cet

Re: Recursive adress space construction in L4

Posted: Sat Jun 25, 2011 5:35 pm
by Love4Boobies
All this stuff is explain in this paper and others. Do your research. :roll: