Changes between Version 92 and Version 93 of processus_thread


Ignore:
Timestamp:
Apr 26, 2018, 5:35:38 PM (6 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • processus_thread

    v92 v93  
    176176This section describes the termination of a process caused by a sys_exit().
    177177
    178  1. The sys_exit() syscall must be executed by the main thread of the calling process( 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 block all process threads, but the main (calling) thread. This function returns only when all threads (but the main) are blocked and descheduled.
    180  1. The sys_exit() function calls again the process_sigaction() function that send another multicast, parallel and non blocking RPC to the same clusters, to mark for delete all process threads, but the main (calling) thread. 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 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.
    181180 1. The sys_exit() function set the PROCESS_TERM_EXIT flag in owner process descriptor to synchronize with the parent process, and deschedules.
    182181 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.