Changeset 672 for trunk/kernel/mm/vmm.h
- Timestamp:
- Nov 19, 2020, 11:49:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/vmm.h
r657 r672 3 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011, 2012) 5 * Alain Greiner (2016,2017,2018,2019,2020))5 * Alain Greiner (2016,2017,2018,2019,2020)) 6 6 * 7 7 * Copyright (c) UPMC Sorbonne Universites … … 53 53 * corresponding bit in the bitmap. 54 54 * - The de-allocator reset the corresponding bit in the bitmap. 55 * 56 * An architecture dependant hal_vmm_display() function is defined in <hal_vmm.h> file. 55 57 ********************************************************************************************/ 56 58 … … 93 95 /********************************************************************************************* 94 96 * This structure defines the Virtual Memory Manager for a given process in a given cluster. 95 * This localVMM implements four main services:96 * 1) It contains the local copy of vseg list (VSL), only complete in referrence.97 * This VMM implements four main services: 98 * 1) It contains the local copy of the vseg list (VSL), only complete in reference cluster. 97 99 * 2) It contains the local copy of the generic page table (GPT), only complete in reference. 98 100 * 3) The stack manager dynamically allocates virtual memory space for the STACK vsegs. … … 141 143 142 144 /********************************************************************************************* 143 * This function makes only a partial initialisation of the VMM attached to an user 144 * process: It intializes the STACK and MMAP allocators, and the VSL lock. 145 * - The GPT has been previously created, with the hal_gpt_create() function. 146 * - The "kernel" vsegs are previously registered, by the hal_vmm_kernel_update() function. 147 * - The "code" and "data" vsegs arlmmmmmme registered by the elf_load_process() function. 148 * - The "stack" vsegs are dynamically registered by the thread_user_create() function. 145 * This function makes a partial initialisation of the VMM attached to an user process. 146 * It intializes the STACK and MMAP allocators, the VSL lock, and the instrumentation 147 * counters, but it does not register any vseg in the VSL: 148 * - The "kernel" vsegs are registered, by the hal_vmm_kernel_update() function. 149 * - The "args" & "envs" vsegs are registered by the process_make_exec() function. 150 * - The "code" and "data" vsegs are registered by the elf_load_process() function. 151 * - The "stack" vsegs are registered by process_make_exec() / thread_user_create(). 149 152 * - The "file", "anon", "remote" vsegs are dynamically registered by the mmap() syscall. 150 153 ********************************************************************************************* … … 155 158 156 159 /********************************************************************************************* 157 * This function re-initialises the VMM attached to an user process to prepare a new 158 * call to the vmm_user_init() function after an exec() syscall. 159 * It removes from the VMM of the process identified by the <process> argument all 160 * all user vsegs, by calling the vmm_remove_vseg() function. 161 * - the vsegs are removed from the VSL. 162 * - the corresponding GPT entries are removed from the GPT. 163 * - the physical pages are released to the relevant kmem when they are not shared. 164 * The VSL and the GPT are not modified for the kernel vsegs. 160 * This function is called by the process_make_exec() function to re-initialises the VMM 161 * attached to an user process: 162 * - It removes from the VMM of the process identified by the <process> argument all user 163 * vsegs, by calling the vmm_remove_vseg() function: the vsegs are removed from the VSL, 164 * the corresponding GPT entries are removed from the GPT, and the physical pages are 165 * released to the relevant kmem when they are not shared. 166 * - The VSL and the GPT are not modified for the kernel vsegs. 167 * - Finally, it calls the vmm_user_init() function to re-initialize the STAK and MMAP 168 * allocators, and the lock protecting GPT. 165 169 ********************************************************************************************* 166 170 * @ process : pointer on process descriptor.
Note: See TracChangeset
for help on using the changeset viewer.