98 | | An user thread makes system calls to access protected resources. Therefore, the VMM(P,K) of a process descriptor P in a cluster K, must contains not only the user segments defined above, but also the kernel segments, to allow the user threads to access - after a syscall - the kernel code and the kernel data structures : Both the user segments virtual adresses, and the kernel segments virtual adresses must be translated. |
99 | | |
100 | | Almost-mkh defines 3 types of these kernel segments described below. To avoid contention and improve locality,these four segments are replicated or distributed in each cluster. |
| 99 | The kernel segments are implemented in ''kernel land'' (generally in the upper part of the virtual space), that is protected, and can only be accessed by a core running in kernel mode. |
| 100 | |
| 101 | An user thread makes system calls to access protected resources. Therefore, the VMM(P,K) of a process descriptor P in a cluster K, must contains not only the user segments defined above, but also the kernel segments, to allow an user thread to access - after a syscall - the kernel code and the kernel data structures : Both the user segments virtual adresses, and the kernel segments virtual adresses must be translated to physical addresses. |
| 102 | |
| 103 | Almost-mkh defines 3 types of kernel segments described below. |
104 | | The '''KCODE''' segment contains the kernel code defined in the ''kernel.elf'' file. To avoid contention and improve locality, almos-mkh '''replicates''' this code in all clusters. This code has already been copied in all clusters by the bootloader. In each cluster K, and for each process P in cluster K (including the kernel process_zero), almos-mkh registers the KCODE vseg in all VSL(P,K), and map it to the local copy in all the GPT(P,K). This vseg uses only big pages, and there is no on-demand paging for this type of vseg. With this local mapping all access to the virtual instruction addresses will be simply translated by the MMU to the local physical address. |
| 107 | The '''KCODE''' segment contains the kernel code defined in the ''kernel.elf'' file. To avoid contention and improve locality, almos-mkh replicates this code in all clusters. This code has already been copied in all clusters by the bootloader. In each cluster K, and for each process P in cluster K (including the kernel process_zero), almos-mkh registers the KCODE vseg in all VSL(P,K), and map it to the local copy in all the GPT(P,K). This vseg uses only big pages, and there is no on-demand paging for this type of vseg. With this local mapping all access to the virtual instruction addresses will be simply translated by the MMU to the local physical address. |