Changes between Version 49 and Version 50 of replication_distribution

Dec 8, 2019, 11:23:52 PM (4 years ago)



  • replication_distribution

    v49 v50  
    8181In the - rare - situations where the kernel running in cluster K must access data in a remote cluster K' (to access a globally distributed structure such as the DQDT, or for inter-cluster client/server communication) almos-mkh uses specific remote access primitives defined in the [  hal_remote.h] file.
    83 === 2.1 TSAR-MIPS32  implementation ===
     83=== 2.1 TSAR-MIPS32 ===
    8585In the TSAR architecture, and for any process P in any cluster K, almost-mkh registers only one extra KCODE vseg in the VMM[P,K), because almos-mkh does not use the DATA-MMU during kernel execution : Each time a core enters the kernel, to handle a sys call, an interrupt, or an exception, the DATA-MMU is deactivated, and It is reactivated when the core returns to user code.
    92 === 2.2 I64 implementation ===
     92=== 2.2 Intel 64 bits ===
    100100The virtual address space of an user process P is split in 5 fixed size zones, defined by configuration parameters in [].  Each zone contains one or several vsegs, as described below.
    102 === The ''kernel'' zone ===
     102'''3.1.1 The ''kernel'' zone'''
    104104It contains the ''kcode'' vseg (type KCODE), that must be mapped in all user processes.
    105105It is located in the lower part of the virtual space, and starts a address 0. Its size cannot be less than a big page size (2 Mbytes for the TSAR architecture), because it will be mapped as one (or several big) pages.
    107 === The ''utils'' zone ===
     107'''3.1.2 The ''utils'' zone'''
    109109It contains the two ''args'' and ''envs'' vsegs, whose sizes are defined by [ specific configuration parameters].  The ''args'' vseg (DATA type) contains the process main() arguments.
    111111It is located on top of the '''kernel''' zone, and starts at address defined by the [  CONFIG_VMM_ELF_BASE] parameter.
    113 === The ''elf'' zone ===
     113'''3.1.3 The ''elf'' zone'''
    115115It contains the ''text'' (CODE type) and ''data'' (DATA type) vsegs, defining the process binary code and global data. The actual vsegs base addresses and sizes are defined in the .elf file and reported in the [ boot_info_t] structure by the boot loader.
    117 === The ''heap'' zone ===
     117'''3.1.4 The ''heap'' zone'''
    119119It contains all vsegs dynamically allocated / released  by the [ mmap] / [ munmap] system calls (i.e. FILE / ANON / REMOTE types).
    120120It is located on top of the '''elf''' zone, and starts at the address defined by the [ CONFIG_VMM_HEAP_BASE]  parameter. The VMM defines a specific MMAP allocator for this zone, implementing the ''buddy'' algorithm. The mmap( FILE ) syscall maps directly a file in user space. The user level ''malloc'' library uses the mmap( ANON ) syscall to allocate virtual memory from the heap and map it in the same cluster as the calling thread. Besides the standard malloc() function, this library implements a non-standard [ remote_malloc()] function, that uses the mmap( REMOTE ) syscall to dynamically allocate virtual memory from the heap, and map it to a remote physical cluster. 
    122 === The ''stack'' zone ===
     122'''3.1.5 The ''stack'' zone'''
    124124It is located on top of the '''mmap''' zone and starts at the address defined by the [ CONFIG_VMM_STACK_BASE] parameter. It contains an array of fixed size slots, and each slot contains one ''stack'' vseg. The size of a slot is defined by the [ CONFIG_VMM_STACK_SIZE]. In each slot, the first page is not mapped, in order to detect stack overflows. As threads are dynamically created and destroyed, the VMM implements a specific STACK allocator for this zone, using a bitmap vector. As the ''stack'' vsegs are private (the same virtual address can have different mappings, depending on the cluster) the number of slots in the '''stack''' zone actually defines the max number of threads for given process in a given cluster.
     126=== 3.2 Intel 64 bits ===