Changes between Version 35 and Version 36 of replication_distribution
- Timestamp:
- Sep 20, 2017, 2:39:33 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
replication_distribution
v35 v36 53 53 == __2) User process virtual space organisation__ == 54 54 55 The virtual space of an user process P is split in 5fixed size zones, defined by configuration parameters. Each zone contains one or several vsegs, as described below.55 The virtual address space of an user process P is split in 4 fixed size zones, defined by configuration parameters. Each zone contains one or several vsegs, as described below. 56 56 57 57 === The ''utils'' zone === … … 62 62 63 63 === The ''elf'' zone === 64 It is located on top of the '' utils'' zone, and starts at address defined by the CONFIG_VSPACE_ELF_BASE parameter. It contains the ''text'' vseg (CODE type) and ''data'' vseg (DATA type)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 structure by the boot loader.64 It is located on top of the '''utils''' zone, and starts at address defined by the CONFIG_VSPACE_ELF_BASE parameter. It 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 structure by the boot loader. 65 65 66 66 === 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 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. The user level ''malloc'' library uses the mmap() system call to allocate virtual memory in the heap. Besides the standard malloc() / free() functions, it implementa non-standard remote_malloc() function, that allows the user to map a dynamically allocated user buffer on a specific physical cluster.67 It 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. The user level ''malloc'' library uses the mmap() system call to allocate/release virtual memory from the heap. Besides the standard malloc() / free() functions, this library implements a non-standard remote_malloc() function, that allows the user to map a dynamically allocated user buffer on a specific physical cluster. 68 68 69 69 === The ''stack'' zone === 70 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. As threads are dynamically created and destroyed, the VMM implement a specific STACK allocator for this zone, using a bitmap vector.70 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. As threads are dynamically created and destroyed, the VMM implement a specific STACK allocator for this zone, using a bitmap vector. As the ''stack'' vseg are private (the same virtual address can have different mappings, depending on the cluster) the number of slots in the '''stack''' zone defines actually the max number of threads for given process in a given cluster.