Changes between Version 30 and Version 31 of processus_thread
- Timestamp:
- Sep 15, 2016, 1:19:23 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
processus_thread
v30 v31 143 143 In each cluster, a dedicated kernel thread is in charge of housekeeping: This thread releases the memory allocated to all DEAD threads. 144 144 145 == __ 5) Process destruction__ ==145 == __6) Process destruction__ == 146 146 147 147 The process destruction can be caused by an exit() system call, or by asignal send by another process. 148 148 In both case, the owner cluster is in charge of the destruction. 149 149 150 === 5.1) phase 1 ===150 === 6.1) phase 1 === 151 151 152 152 If the exit() system call is executed by a thread running in a cluster K different from the owner cluster Z, the kernel K send a RPC_PROCESS_REQ_EXIT to cluster Z. The argument is the PID. 153 153 154 === 5.2) phase 2 ===154 === 6.2) phase 2 === 155 155 156 156 To execute this RPC, the owner kernel Z send a multi-cast RPC_PROCESS_EXIT to all clusters X that contain a copy of the process descriptor, using its COPIES_LIST. The argument of this RPC is the PID. 157 157 158 === 5.3) phase 3 ===158 === 6.3) phase 3 === 159 159 160 160 In each cluster X, the kernel receiving a RPC_PROCESS_EXIT register the kill signal in all threads descriptors associated to the PID process. and polls the local TH_TBL(X,P). When it detects that the TH_TBL(X,P) is empty, it releases the memory allocated to process descriptor, and acknowledges the RPC to cluster Z. 161 161 162 === 5.4) phase 4 ===162 === 6.4) phase 4 === 163 163 164 164 When the kernel Z has received all expected responses to the multi-cast RPC, it releases all memory located to process PID in cluster Z, and this completes the process destruction.