Changes between Version 93 and Version 94 of processus_thread


Ignore:
Timestamp:
Apr 26, 2018, 7:06:14 PM (3 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • processus_thread

    v93 v94  
    176176This section describes the termination of a process caused by a sys_exit().
    177177
    178  1. The sys_exit() syscall can be executed by any thread running in any cluster. The actual work is done in the owner cluster by the process_make_exit() function, that can be can be directly called by the process main thread (i.e. thread 0 in owner cluster), or can be called by a RPC thread running in the owner cluster, and called by the thread executing the sys_exit() syscall.
    179  1. The process_make_exit() function calls the process_sigaction() function that send a multicast, parallel and non blocking RPC to all clusters containing at least one thread of the calling process, to mark for delete all process threads, but the main (calling) thread. This function returns only when all threads (but the main) are blocked and marked for delete. The marked threads will be actually destroyed by the scheduler at the next scheduling point. The remote process descriptor copies are actually destroyed by the scheduler when the last thread in remote cluster is destroyed.
     178 1. The sys_exit() syscall must be executed by the process main thread in (i.e. thread 0 in owner cluster).
     179 1. The sys_exit() function calls the process_sigaction() function that send a multicast, parallel and non blocking RPC to all clusters containing at least one thread of the calling process, to mark for delete all process threads, but the main (calling) thread. This function returns only when all threads (but the main) are blocked and marked for delete.
     180 1. The marked threads will be actually destroyed by the scheduler at the next scheduling point. The remote process descriptor copies are destroyed by the scheduler when the last thread in remote cluster is destroyed.
    180181 1. The sys_exit() function set the PROCESS_TERM_EXIT flag in owner process descriptor to synchronize with the parent process, and deschedules.
    181  1. This main thread, and the process descriptor in owner cluster  will be actually destroyed by the scheduler when the parent process sys_wait() function marks this main thread for delete.
     182 1. The main thread, and the process descriptor in owner cluster  will be actually destroyed by the scheduler when the parent process sys_wait() function marks this main thread for delete.
    182183
    183184=== 6.3) detailed kill scenario ===