Hi snell,
I'm reading the code in vm these days, and i'm trying to answer your questions.
Correct me if I'm wrong on something.
On Wed, May 13, 2009 at 9:15 PM, snell <
snel...@gmail.com> wrote:
>
> Hi all,
>
> I wanted to know what all is different in 3.1.4 as compared to 3.1.2.
>
> 1) A completely new module vm has been added in the 3.1.4 version of
> minix.
> which implements virtual memory. Is paging also implemented???
Yes, a complete module named vm is added in 3.1.4, kudo to Ben.
Paging is implemented, so you can call it modern virtual memory support.
>
> 2) what is the use of fork and exec in pm when we have already have
> exec and fork in vm.
They do different jobs in different servers. in pm, fork() has to setup a slot
in the data structure and do some initialization, e.g. setup pid, gid.
etc. While in vm,
the job is more specific, it inherits the memory from the parent
process in a word,
technically speaking, copying the page tables. (map proc copy).
>
> 3) there is no alloc in pm .... does that mean the memory allocation
> for the main memory is also done in vm.
I think it's yes.
Let's take the brk() system call as an example, since brk() is a very
primitive memory allocation utility.
when you invoke brk() system call, it will first send a message to PM
server (server/pm/break.c:do_brk), it then send the message to VM
server(vm_brk()), then later, the VM gets the call from PM server, it
does the real job.(servers/vm/break.c:do_brk()->real_brk()).
HTH.
>
>
>
>
> >
>
--
Guanqun