Changes between Version 16 and Version 17 of page_tables


Ignore:
Timestamp:
May 16, 2019, 4:24:55 PM (6 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • page_tables

    v16 v17  
    1111 * VBASE : Base virtual address
    1212 * LENGTH : Segment length
    13  * BIN : Pathname to the .elf file. (only for DATA and CODE types)
    14  * X,Y : Coordinates of the cluster where the vseg is mapped (only for a localized vseg)
    15  * MAPPER : radix-tree containing the physical pages allocated to this vseg (only for CODE, DATA and FILE types)
     13 * BIN : Pathname to the .elf file (only for DATA and CODE types).
     14 * X,Y : Coordinates of the cluster where the vseg is mapped (only for a localized vseg).
     15 * MAPPER : radix-tree containing the physical pages allocated to this vseg (only for CODE, DATA and FILE types).
    1616
    1717== __2) Page tables and vseg lists__ ==
     
    1919The various information associated to a process P can be found in the process descriptor (process_t structure). This process descriptor and the structures within are - partly - replicated in all clusters containing at least one thread of process P, these clusters are called "active" clusters.
    2020
    21 The page table is used by the kernel to store the mapping for each page of each vseg of a process. The page table belongs to these - partly - replicated information, we will call PT(P,K) the page table of process P in cluster K.
     21The '''VSL(P,K) ''' (virtual Segment List of process P in cluster K)  is replicated in all active clusters. It is used by the kernel when a page fault occurs, it checks that the unmapped virtual address corresponds to a registered segment and determines the segment type.
    2222
    23 The vsegs list of a process is used by the kernel when a page fault occurs, it checks that the unmapped virtual address corresponds to a defined segment and determines the segment type. This list is also one of the - partly - replicated information and we will call VSL(P,K) the vsegs list of process P in cluster K.
     23The '''GPT(P,K)''' (Generic Page Table of process P in cluster K) is also replicated in all active clusters. It used by the kernel to store the mapping of each page of each vseg of the process.
    2424
    25 === 2.1) Evolution of PT(P,K) ===
     25=== 2.1) Dynamic behaviour  of the GPT(P,K) ===
    2626
    27 For a P process, the contents of the different page tables PT(P,K) changes over time, and it evolves differently in active clusters :
     27For a P process, the contents of the different page tables GPT(P,K) can changes over time, and it evolves differently in active clusters :
    2828On the one hand, the P page tables content evolves dynamically in the clusters depending on the page faults triggered by the thread of P running in each cluster.
    2929Moreover, the ''private'' segments mapping (CODE and STACK types) differs from one cluster to another, since a same virtual address corresponds to different addresses depending on the cluster.
    3030For ''public'' vsegs, only the reference cluster contains the complete mapping state.
    3131
    32 === 2.2) Evolution of VSL(P,K) ===
     32=== 2.2) Dynamic Behaviour of VSL(P,K) ===
    3333
    34 For a P process, the contents of the various vsegs lists VSL(P,K) changes over time too, and is not the same in all clusters.
    35 Indeed, the vsegs list must be identical for ''public'' vsegs, but each ''private'' vseg is registered only in the cluster it belongs to.
    36 For ''public'' vsegs, every dynamic insertion of a new vseg or extension of an existing vseg must be echoed in all active clusters.
     34For a P process, the contents of the various vsegs lists VSL(P,K) changes over time too, and is not the same in all cluster:
     35The vsegs list must be identical for ''public'' vsegs, but each ''private'' vseg is registered only in the cluster it belongs to.
     36For ''public'' vsegs, every dynamic insertion of a new vseg or extension of an existing vseg must be reported into all active clusters.
    3737
    3838== __3) Registering and destruction of vsegs in VSL(P,K)__ ==
     
    6262This type of vseg is removed from VSL(P,X) when the thread is destroyed.
    6363
    64 === 3.4) HEAP ===
     64=== 3.4) ANON ===
    6565This type of vseg is registered in VSL(P,Z), the Z cluster being the owner of process P at its creation.
    6666It is registered in VSL(P,A,) in an A cluster every time a thread of P is created in this A cluster, and this A cluster didn't have a thread of P yet.
     
    9595This vseg type is destroyed on munmap() call, using a two-RPCs mechanism just as for the creation.
    9696
    97 == __4) Insertion of an entry in the pages table__ ==
     97== __4) Insertion of a PTE (Page Table Entry) in the GPT(P,K)__ ==
    9898
    99 Adding a new entry in a PT(P,K) for a process P in a cluster K is the result of a page fault, triggered by any thread of process P
     99Adding a new entry in a GPT(P,K) for a process P in a cluster K is the result of a page fault, triggered by any thread of process P
    100100running in cluster K, based on the "on-demand paging" principle.
    101101All threads of a P process in a K cluster use exclusively the local PT(P,K), and report the page fault to the local kernel instance.
     
    115115=== 4.2) STACK ===
    116116The STACK vsegs associated to the threads placed in a cluster X are mapped in this cluster X and are handled independently from each other in the different clusters.
    117 The kernel instance in cluster X has to allocate a physical page and register it in the local PT(P,X) without initializing it.
     117The kernel instance in cluster X has to allocate a physical page and register it in the local GPT(P,X) without initializing it.
    118118IF the requested address is in the last possible page for the vseg, the STACK vseg length can be locally dynamically increased in the local VSL(P,X),
    119119if there is enough space in the virtual space zone used for the stacks.