Changeset 672 for trunk/kernel/mm/vmm.h


Ignore:
Timestamp:
Nov 19, 2020, 11:49:01 PM (4 years ago)
Author:
alain
Message:

1) Introduce up to 4 command lines arguments in the KSH "load" command.
These arguments are transfered to the user process through the
argc/argv mechanism, using the user space "args" vseg.

2) Introduce the named and anonymous "pipes", for inter-process communication
through the pipe() and mkfifo() syscalls.

3) Introduce the "chat" application to validate the two above mechanisms.

4) Improve printk() and assert() fonctions in printk.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vmm.h

    r657 r672  
    33 *
    44 * Authors   Ghassan Almaless (2008,2009,2010,2011, 2012)
    5  *           Alain Greiner (2016,2017,2018,2019,2020))
     5 *           Alain Greiner    (2016,2017,2018,2019,2020))
    66 *
    77 * Copyright (c) UPMC Sorbonne Universites
     
    5353 *   corresponding bit in the bitmap.
    5454 * - 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.
    5557 ********************************************************************************************/
    5658
     
    9395/*********************************************************************************************
    9496 * This structure defines the Virtual Memory Manager for a given process in a given cluster.
    95  * This local VMM 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.
    9799 * 2) It contains the local copy of the generic page table (GPT), only complete in reference.
    98100 * 3) The stack manager dynamically allocates virtual memory space for the STACK vsegs.
     
    141143
    142144/*********************************************************************************************
    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().
    149152 * - The "file", "anon", "remote" vsegs are dynamically registered by the mmap() syscall.
    150153 *********************************************************************************************
     
    155158
    156159/*********************************************************************************************
    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.
    165169 *********************************************************************************************
    166170 * @ process   : pointer on process descriptor.
Note: See TracChangeset for help on using the changeset viewer.