Changes between Version 30 and Version 31 of replication_distribution


Ignore:
Timestamp:
Sep 20, 2017, 1:59:51 PM (5 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • replication_distribution

    v30 v31  
    33[[PageOutline]]
    44
    5 The replication / distribution policy has two goals: enforce locality (as much as possible), and avoid contention (it is the main goal).
    6  * The read-only segment containing the user code is replicated in all clusters where there is a thread using it.
     5The replication / distribution policy of user processes has two goals: enforce locality (as much as possible), and avoid contention (it is the main goal).
     6 * The read-only segment containing the user code is replicated in all clusters where there is one thread using it.
    77 * The private  segment containing the stack for a given thread is placed in the same cluster as the thread using it.
    88 * The shared segment containing the global data is distributed on all clusters as regularly as possible to avoid contention.
    9  * The segments dynamically allocated by the mmap() system call are placed in a specific cluster as described below.
     9 * The segments dynamically allocated by the mmap() system call are placed as described below.
    1010
    1111To actually control data placement on the physical memory banks, the kernel uses the paged virtual memory MMU to map a virtual segment to a given physical memory bank.
     
    1313This replication / distribution policy is implemented by the Virtual Memory Manager (in the vmm.h / vmm.c files).
    1414
    15 A '''vseg''' is a contiguous memory zone in the process virtual space such as all adresses in this '''vseg''' can be accessed by the process without segmentation violation: if the corresponding is not mapped, the page fault will be handled by the kernel,
     15A '''vseg''' is a contiguous memory zone in the process virtual space, such as all adresses in this '''vseg''' can be accessed by the process without segmentation violation: if the corresponding is not mapped, the page fault will be handled by the kernel,
    1616and a physical page will be dynamically allocated and initialized if required. A '''vseg''' contains always an integer number of pages. Depending on its type, a '''vseg''' has some specific attributes regarding access rights, replication policy, and distribution policy. The vseg descriptor is defined by the structure vseg_t in the ''vseg.h'' file.
    1717
     
    4040 1. '''ANON''' : This type of vseg is dynamically created by ALMOS-MK to serve an anonymous mmap() system call executed by a client thread running in a cluster X. The first vseg registration and the physical mapping are done by the reference cluster Z, but the vseg is mapped in the client cluster X.
    4141 1. '''FILE''' : This type of vseg is dynamically created by ALMOS-MK to serve a file based mmap() system call executed by a client thread running in a cluster X. The first vseg registration and the physical mapping are done by the reference cluster Z, but the vseg is mapped in cluster Y containing the file cache.
    42  1. '''REMOTE''' : This type of vseg is dynamically created by ALMOS-MK to serve a remote mmap() system call executed by a client thread running in a cluster X. The first vseg registration and the physical mapping are done by the reference cluster Z, but the vseg is mapped in cluster Y specified by the user.
     42 1. '''REMOTE''' : This type of vseg is dynamically created by ALMOS-MK to serve a remote mmap() system call where a client thread running in a cluster X request to create a new vseg mapped in another cluster Y. The first vseg registration and the physical mapping are done by the reference cluster Z, but the vseg is mapped in cluster Y specified by the user.
    4343
    4444
     
    4848 * A GPT(P,K) contains all mapped entries corresponding to private vsegs. For public vsegs, it contains only the entries corresponding to pages that have been accessed by a thread running in cluster K. Only the reference cluster Z contains the complete  GPT(P,Z) page table of all mapped entries for process P.
    4949
    50 Therefore, the process descriptors - other than the reference one - are used as read-only caches.
     50Therefore, the process descriptors - other than the reference one - can be considered as read-only caches.
    5151When a given vseg or a given entry in the page table must be removed by the kernel, this modification must be done first in the reference cluster, and broadcast to all other clusters for update.
    5252
    5353== __2) User process virtual space organisation__ ==
    5454
    55 The virtual space of an user process P in a given cluster K is split in 5 fixed size zones, defined by configuration parameters.  Each zone contains one or several vsegs, as described below.
     55The virtual space of an user process P is split in 5 fixed size zones, defined by configuration parameters.  Each zone contains one or several vsegs, as described below.
    5656
    5757=== The ''utils'' zone ===
     
    6565
    6666=== The ''heap'' zone ===
    67 It is located on top of the ''elf'' zone, and starts at address defined by the CONFIG_VSPACE_HEAP_BASE  parameter. It contains one single ''heap'' vseg, used by the malloc() library.
    68 
    69 === The ''mmap'' zone ===
    70 It is located on top of the ''heap'' zone, and starts at address defined by the CONFIG_VSPACE_MMAP_BASE parameter. It contains all vsegs of type ANON, FILE, or REMOTE that are dynamically allocated / released by the user application. The VMM implements a specific MMAP allocator for this zone, implementing the ''buddy'' algorithm.
     67It is located on top of the ''elf'' zone, and starts at address defined by the CONFIG_VSPACE_HEAP_BASE  parameter. It contains all vsegs dynamically allocated or released  by the mmap() / munmap() system calls (i.e. FILE / ANON / REMOTE).he VMM implements a specific MMAP allocator for this zone, implementing the ''buddy'' algorithm.
    7168
    7269=== The ''stack'' zone ===
    73 It is located on top of the ''mmap'' zone and starts at address defined by the CONFIG_VSPACE_STACK_BASE parameter. It contains an array of fixed size slots, and each slot contain one ''stack'' vseg. The size of a slot is defined by the CONFIG_VSPACE_STACK_SIZE. In each slot the first page is not mapped to detect stack overflow.
    74 As threads are dynamically created and destroyed, the VMM implement a specific STACK allocator for this zone, using a bitmap vector.
     70It is located on top of the ''mmap'' zone and starts at address defined by the CONFIG_VSPACE_STACK_BASE parameter. It contains an array of fixed size slots, and each slot contain one ''stack'' vseg. The size of a slot is defined by the CONFIG_VSPACE_STACK_SIZE. In each slot the first page is not mapped to detect stack overflow. As threads are dynamically created and destroyed, the VMM implement a specific STACK allocator for this zone, using a bitmap vector.
     71