Page 1 of 2
who can join me and help me?
Posted: Sat Mar 01, 2008 11:51 pm
by chenrvmldd
Now,I have an idea。I want to add virtual memory management to minix,but I encount a lot of problems,for example:we all know that minix does not have paging mechanism,the first step I should do is that adding paging mechanism to minix ,but I am not very familiar with the booting of minix,
about boothead.s and bootblock.s,because of lacking of concrete materials
about minix ,if who knows the booting of minix,or has some materials,or
is interested in this can contact me and help me,my email is:
[email protected]
thank you the people will help me and god bless you!
Posted: Sun Mar 02, 2008 2:05 am
by speal
You're actually mistaken. MINIX does have virtual memory support - this is an integral component to the isolation of drivers and processes from the kernel code (and each other).
Maybe I misunderstood what you plan to implement?
Posted: Sun Mar 02, 2008 2:48 am
by chenrvmldd
minix does not have virtual memory management now
Posted: Sun Mar 02, 2008 3:01 am
by JamesM
Are you absolutely certain? How then, does MINIX3 support the isolation of processes?
MINIX was intended as a teaching tool, and seeing as Tanenbaum wrote about VMM in his book, I would assume it to be implemented in minix too. Plus, you can't really go very far without it... :S
Posted: Sun Mar 02, 2008 3:10 am
by chenrvmldd
yes,I am very sure ,because I am in a project part of which is to add virtual
memory management to minix, I also have read the book writen by Tanenbaum,and in the book it refers that minix does not have virtual memory management
Posted: Sun Mar 02, 2008 3:40 am
by JackScott
I believe he says that no paging to disk is done, IIRC.
Posted: Sun Mar 02, 2008 7:24 am
by xyzzy
As far as I'm aware, it doesn't actually use paging, but instead segmentation.
Posted: Sun Mar 02, 2008 10:27 am
by speal
I'm looking at the MINIX source code right now, and I see this block of code in src/kernel/arch/i386/memory.c
Code: Select all
PRIVATE void vm_enable_paging(void)
{
u32_t cr0;
cr0= read_cr0();
write_cr0(cr0 | I386_CR0_PG);
}
So yes, minix uses virtual memory, and paging at that.
Posted: Sun Mar 02, 2008 10:42 am
by JamesM
From reading the wiki pages etc, I get the impression they use "virtual memory" to mean swapspace or a pagefile.
Posted: Sun Mar 02, 2008 9:03 pm
by chenrvmldd
Hi ,speal ,maybe I read the source code that is an old version,I don't know what version you have read,can you tell me what you read?thank you
Posted: Sun Mar 02, 2008 11:00 pm
by B.E
I think he's using Minix 3, just look at Minix 2 and it doen't seem to have it.
Posted: Mon Mar 03, 2008 1:28 am
by xyzzy
speal wrote:I'm looking at the MINIX source code right now, and I see this block of code in src/kernel/arch/i386/memory.c
Code: Select all
PRIVATE void vm_enable_paging(void)
{
u32_t cr0;
cr0= read_cr0();
write_cr0(cr0 | I386_CR0_PG);
}
So yes, minix uses virtual memory, and paging at that.
Was that code from SVN (from the fact that the arch dir is there I'd probably say yes) or from a released version? I know definitely that the original 3.0 release didn't have paging, as well as the version in OSDI 3rd edition and possibly 3.1.2 as well
Posted: Mon Mar 03, 2008 3:30 pm
by speal
I found the code in the subversion source tree of MINIX 3.
Minix 1 and 2 use segmentation, but an announcement was made with the release of MINIX 3 that virtual memory would be used. Whether they mean paging or paging to disk, I'm not sure. I'm not extremely familiar with the structure of MINIX, but paging memory to disk certainly seems like a task for a user-mode server, and not the kernel itself. In his book "Modern Operating Systems," Tanenbaum advocates for paging-to-disk code running in user-space. I don't know if they already have this or not.
I'd look at the original release of MINIX 3 to see if there is paging code there, but they only seem to provide easy access to code for the development version, and older releases (1 and 2).
Posted: Mon Mar 03, 2008 8:12 pm
by iammisc
IIRC, MINIX 3 uses paging but doesn't support on-demand paging like copy-on-write and lazy page allocation. Maybe this is what you are trying to implement?
Posted: Tue Mar 04, 2008 1:16 am
by xyzzy
speal wrote:I'd look at the original release of MINIX 3 to see if there is paging code there, but they only seem to provide easy access to code for the development version, and older releases (1 and 2).
Look in the branches/tags directories in SVN. Although, the Minix SVN seems to be not working for me...