[FreeVMS] pager question
BERTRAND Joël
joel.bertrand at systella.fr
Sat Jun 29 18:10:16 CEST 2013
Guido a écrit :
> On Saturday 29 June 2013 12:44:23 BERTRAND Joël wrote:
>> I agree. For kernel itself, sys_pagefault always returns new
>> ressources. For an unprivilegied process, pager has to save a list of
>> allocated pages for this process. Pagefault handler only has to return
>> new pages when process is loaded in memory, when stack is growing or
>> when process uses something like mmap() or brk(). In all other cases,
>> pagefault has to raise a new syscall to kill process.
>
> OK, but could you explain why a page fault (essentially a hardware generated
> error condition) and a memory allocation request (software generated, on
> purpose) are handled by the same function (the pagefault handler) when they
> are to be handled differently? Wouldn't it be easier to have separate IPC calls
> and handlers?
When a process try to access to a unmapped page, it generates a
pagefault IPC. This IPC is received by an event handler loop in its
parent (for example, PAGER.SYS sends L4_PAGEFAULT IPC to VMSKERNEL.SYS
and all IPC are caught in sys/sys_loop.c).
Child process does not know if its request can or will be done. It only
sends L4_PAGEFAULT IPC to its parent and waits for an answer. This
answer can be a new L4_MapItem() or a L4_AbortIpc_and_stop(). Thus, I
don't see why we need to separate L4_PAGEFAULT IPC in two IPC calls.
Regards,
JKB
More information about the FreeVMS
mailing list