76 | | The new F process inherit from the parent process P the open files (FD_TBL), and the memory image (VSEG_LIST and PG_TBL), and the corresponding structures must be replicated in the new process descriptor. After a fork(), the C process can execute an exec() system call, that allocate a new memory image to the C process, but the new process can also continue to execute with the inherited memory image. For load balancing, ALMOS-MK uses the DQDT to create the child process C on a different cluster from the parent cluster P. |
77 | | Therefore, P and C have usually different owner clusters. |
| 76 | The new C process inherit from the parent process P the open files (FD_TBL), and the memory image (VSEG_LIST and PG_TBL). These structures must be replicated in the new process descriptor. After a fork(), the C process can execute an exec() system call, that allocate a new memory image to the C process, but the new process can also continue to execute with the inherited memory image. For load balancing, ALMOS-MK uses the DQDT to create the child process C on a different cluster from the parent cluster P, but the user application can also use the fork_place() system call to specify the target cluster. |
81 | | The parent process P is running on a core in cluster K, and executes the fork() system call to create a new process C on a remote cluster Z that will become the owner of the C process. ALMOS-MK creates the first C process descriptor in the same cluster as the parent cluster P, and postpone the costly copy of page table from P to C, because this copy is useless in case of exec(). When the fork() system call returns, the C process owner cluster is Z, but the reference process descriptor is in cluster K. The child process and the associated main thread will be migrated to the target cluster later, when the child process makes an "exec" or any other system call. |
| 80 | The parent process P is running on a core in cluster K, and executes the fork() system call to create a new process C on a remote cluster Z that will become the owner of the C process. ALMOS-MK creates the first C process descriptor in the same cluster as the parent cluster P, and postpone the costly remote copy of page table from P to C, because this copy is useless in case of exec(). When the fork() system call returns, the C process owner cluster is Z, but the reference process descriptor is in cluster K. The child process and the associated main thread will be migrated to the target cluster later, when the child process makes an "exec" or any other system call. |
85 | | 1. after RPC completion, the kernel K initializes the F process descriptor from informations found in the P parent process descriptor. This includes the inherited ... |
86 | | 1. the kernel K creates locally the main thread of process F, and register this thread in the TH_TBL(K,P), |
| 84 | 1. after RPC completion, the kernel K initializes the C process descriptor from informations found in the P parent process descriptor. This includes the inherited ... |
| 85 | 1. the kernel K creates locally the main thread of process C, and register this thread in the TH_TBL(K,P), |
93 | | After a fork() system call, the F process can execute an exec() system call. This system call forces the F process to migrate from the K cluster to the owner cluster Z, to execute a new code, while keeping the same PID. Therefore a new reference process descriptor must be created in the Z cluster, and initialized. The Z cluster will become both the owner and the reference cluster of the F process. The old reference process descriptor in K must be deleted. |
94 | | The exec() system call executes the following steps: |
| 92 | After a fork() system call, the F process can execute an exec() system call. This system call forces the F process to migrate from the K cluster to the owner cluster Z, to execute a new application, while keeping the same PID. Therefore a new reference process descriptor , and the associated main thread are created in the Z cluster, and initialized from values found in the .elf file defining the new application. The Z cluster becomes both the owner and the reference cluster of the F process. The old reference process descriptor and the associated thread in K are deleted. |
| 93 | |