Changes between Version 13 and Version 14 of replication_distribution


Ignore:
Timestamp:
Oct 13, 2016, 5:27:00 PM (6 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • replication_distribution

    v13 v14  
    1919== 1)  User segments types and attributes  ==
    2020
    21  * A vseg is '''public''' when it can be accessed by any thread of the process, whatever the cluster where the thread is running.  It is '''private''' when it can only be accessed by the threads running in the cluster containing the physical memory bank where this vseg is mapped. A '''private''' vseg is entirely mapped in one single cluster K. It is registered in the VMM(P,K) segment list, but not in the other VMM(P,X) segment lists.
    22 
    23  * A vseg can be '''localised''' (all vseg pages are mapped in the same cluster), or '''distributed''' (different pages are mapped on different clusters, using the virtual page number (VPN) least significant bits as distribution key). A '''private''' vseg is always '''localised'''.
     21 * A vseg is '''public''' when it can be accessed by any thread of the process, whatever the cluster where the thread is running.  It is '''private''' when it can only be accessed by the threads running in the cluster containing the physical memory bank where this vseg is mapped. A '''private''' vseg is entirely mapped in one single cluster K. For a '''public''' vseg ALMOS-MK implement a global mapping : a virtual address is mapped to the same physical address in all clusters. For a '''private''' vessel, ALMOS-MK implement a local mapping : the same virtual address can be mapped to different physical addresses, in different clusters.
     22 * A vseg can be '''localized''' (all vseg pages are mapped in the same cluster), or '''distributed''' (different pages are mapped on different clusters, using the virtual page number (VPN) least significant bits as distribution key). A '''private''' vseg is always '''localized'''.
    2423
    2524ALMOS-MK defines seven vseg types:
    26 || type        ||               ||                  ||                                                                                                     ||
    27 || CODE     ||  private   || localised   || one per active cluster / same virtual addresses / same content    ||
    28 || DATA       ||  public   || distributed || one per process / replicated in all active clusters                         ||
    29 || STACK    ||  private  || localised    || one per thread / in same cluster as the thread                              ||
    30 || MMAP     ||  public   || distributed || one per mmap(anon)                                                                    ||
    31 || FILE        ||  public   || localised    || one per mmap(file) / in same cluster as the file                             ||
    32 || MALLOC ||  public   || distributed || used by the malloc() library / dynamically extensible                    ||
    33 || REMOTE ||  public   || localised    || one per remote_malloc() / in cluster specified by user                  ||
     25|| type        ||               ||                  ||                                                                                  ||
     26|| CODE     ||  private   || localized   || Read Only one per cluster / replicated in all active clusters        ||
     27|| DATA       ||  public   || distributed || Read/Write one per process / non replicated                              ||
     28|| HEAP      ||  public   || distributed || Read/Write one per process / non replicated                              ||
     29|| STACK    ||  private  || localized    || Read/Write one per thread / in same cluster as the thread          ||
     30|| MMAP     ||  public   || distributed || one per mmap(anon)                                                 ||
     31|| FILE        ||  public   || localized    || one per mmap(file) / in same cluster as the file         ||
     32|| REMOTE ||  public   || localized    || one per remote_mmap() / user defined placement     ||
     33
     34 1.'''CODE''' : This vseg contains the user application code. ALMOS-MK creates one CODE vseg per cluster. For a process P, the CODE vseg is registered in the VSL(P,Z) when the process is created in reference cluster Z. In the other clusters X, the CODE vseg is registered  in VSL(P,X) when a page fault is signaled by a thread of P running in cluster X.
     35
     36 1. '''DATA''' : This vseg contains the user application global data. ALMOX-MK creates one single DATA vseg per process, that is registered in the reference VSL(P,Z) when the process P is created in reference cluster Z.  In the other clusters X, the DATA vseg is registered  in VSL(P,X) when a page fault is signaled by a thread of P running in cluster X. To avoid contention, this vseg is physically distributed on all clusters. For each page, the physical mapping is decided by the reference cluster Z, but the page can be mapped on any cluster Y.
     37
     38 1. '''STACK''' : For each thread T of process P running in cluster X, ALMOS_MK creates one STACK vseg. This vseg is registered in the VSL(P,X) when the thread descriptor is created in cluster X. To enforce locality, this vseg is physically mapped in cluster X.
     39
     40 1. '''HEAP''' This vseg is actually used by the malloc() library. ALMOX-MK creates one single HEAP vseg per process, that is registered in the reference VSL(P,Z) when the process P is created in reference cluster Z.  In the other clusters X, the HEAP vseg is registered  in VSL(P,X) when a page fault is signaled by a thread of P running in cluster X. To avoid contention, this vseg is physically distributed on all clusters. For each page, the physical mapping is decided by the reference cluster Z, but the page can be mapped on any cluster Y.
     41
     42 1. '''MMAP''' : This type of vseg is dynamically created by ALMOS-MK to serve an anonymous mmap() system call.
     43 1. '''FILE''' : This type of vseg is dynamically created by ALMOS-MK to serve an file based mmap() system call. This vseg being localized
     44 1. '''REMOTE''' : This type of vseg is dynamically created by ALMOS-MK to serve a remote_mmap() system call.
     45
     46
     47
    3448
    3549The replication of the VSL(P,K) and GPT(P,K) structures creates a coherence problem for non private vsegs.
     
    4862== 2) User process virtual space organisation ==
    4963
    50 The virtual space of an user process P in a given cluster K is split in four zones called ''vzone''.  Each vzone contains one or several vsegs.
     64The virtual space of an user process P in a given cluster K is split in 5 zones called ''vzone''.  Each vzone contains one or several vsegs.
    5165
    5266 1. The '''utils''' vzone has a fixed size, and is located in the lower part of the virtual space. It contains the three vsegs ''kentry'', ''args'', ''envs'', whose sizes are defined by configuration parameters. These vsegs are set by the kernel each time a new process is created. The ''kentry'' vseg has CODE type and contains the code that must be executed to enter the kernel from user space. The ''args'' vseg has DATA type, and contains the process main() thread arguments. The ''envs'' vseg has DATA type and contains the process environment variables.
     
    5468 1. The '''elf''' vzone has a variable size, and contains the ''text'' and and ''data'' vsegs containing the process binary code and global data. The size is defined in the .elf file and reported in the boot_info structure by the boot loader. It is located on top of the '''utils''' vzone
    5569
     70 1. The '''HEAP''' vzone contains the
    5671 1. The '''stack''' vzone has a fixed size, and is located in the upper part of the virtual space. It contains as many vsegs of type STACK as the max number of threads for a process in a single cluster. The total size is defined as CONFIG_VSPACE_STACK_SIZE * CONFIG_PTHREAD_MAX_NR.
    5772