IBM 10 SP1 EAL4 Manuale Utente

Pagina di 246
address returned by arch_get_unmapped_area() to contain a linear address that is part of another 
process’s address space.  
In addition to this process compartmentalization, the do_mmap() routine also makes sure that when a new 
memory region is inserted it does not cause the size of the process address space to exceed the threshold set 
by the system parameter rlimit.  The do_mmap() function only allocates a new valid linear address to the 
address space of a process.  Actual page-frame allocation is deferred until the process attempts to access that 
address for a write operation. This technique is called demand paging.  When accessing the address for a read 
operation, the kernel gives the address an existing page called Zero Page, which is filled with zeros.  When 
accessing the address for a write operation, the kernel invokes the alloc_page() routine and fills the new 
page frame with zeros by callig memset(), thus satisfying the object reuse requirement.
The following diagram describes a simplified view of what occurs when a process tries to increase its address 
space and, if successful, tries to access the newly allocated linear address.
129
Figure 5-68: Object reuse handling while allocating new linear address