Changes between Version 34 and Version 35 of processus_thread


Ignore:
Timestamp:
Oct 17, 2017, 4:13:26 PM (7 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • processus_thread

    v34 v35  
    33[[PageOutline]]
    44
    5 The process is the internal représentation of an user application. A process can be running as a single thread (called main thread), or can be multi-threaded. ALMOS-MK supports the POSIX thread API.
     5The process is the internal représentation of an user application. A process can be running as a single thread (called main thread), or can be multi-threaded. ALMOS-MKH supports the POSIX thread API.
    66For a multi-threaded application, the number of threads can be very large, and the threads of a given process can be distributed on all cores available in the shared memory architecture, for maximal parallelism. Therefore A single process can spread on all clusters. To avoid contention, the process descriptor of a P process, and the associated structures, such as the list of registered vsegs ('''VSL'''), the generic page table ('''GPT'''), or the file descriptors table ('''FDT''')  are  (partially) replicated in all clusters containing at least one thread of P.
    77
     
    1010The PID (Process Identifier) is coded on 32 bits. It is unique in the system, and has a fixed format:  The 16 MSB (CXY) contain the owner cluster identifier. The  16 LSB bits (LPID) contain the local process index in owner cluster. The '''owner cluster''' is therefore defined by the 16 MSB bits of PID.
    1111
    12 As it exists several copies of the process descriptors, ALMOS-MK defines a reference process descriptor, located in the '''reference cluster'''. The other copies are used as local caches, and ALMOS-MK must guaranty the coherence between the reference and the copies.
     12As it exists several copies of the process descriptors, ALMOS-MKH defines a reference process descriptor, located in the '''reference cluster'''. The other copies are used as local caches, and ALMOS-MKH must guaranty the coherence between the reference and the copies.
    1313
    14 As ALMOS-MK supports process migration, the '''reference cluster''' can be different from the '''owner cluster'''. The '''owner cluster''' cannot change (because the PID is fixed), but the '''reference cluster''' can change in case of process migration.
     14As ALMOS-MKH supports process migration, the '''reference cluster''' can be different from the '''owner cluster'''. The '''owner cluster''' cannot change (because the PID is fixed), but the '''reference cluster''' can change in case of process migration.
    1515
    16 In each cluster K, the local cluster manager (cluster_t type in ALMOS-MK) contains a process manager (pmgr_t type in ALMOS-MK) that maintains three structures for all process owned by K :
     16In each cluster K, the local cluster manager ( cluster_t  type in ALMOS-MKH ) contains a process manager ( pmgr_t  type in ALMOS-MKH ) that maintains three structures for all process owned by K :
    1717 * The '''PREF_TBL[lpid]''' is an array indexed by the local process index. Each entry contains an extended pointer on the reference process descriptor.
    1818 * The '''COPIES_ROOT[lpid]''' array is also indexed by the local process index. Each entry contains the root of the global list of copies for each process owned by cluster K.   
    1919 * The '''LOCAL_ROOT''' is the local list of all process descriptors in cluster K. A process descriptor copy of P is present in K, as soon as P has a thread in cluster K.
    2020
    21 There is a partial list of informations stored in a process descriptor (process_t in ALMOS-MK):
     21There is a partial list of informations stored in a process descriptor ( process_t  in ALMOS-MKH ):
    2222- '''PID''' :  proces identifier.
    2323- '''PPID''' : parent process identifier,
     
    3232- '''CHILDREN_ROOT''' : root of global list of children process.
    3333
    34 All elements of a ''local'' list are in the same cluster, and ALMOS-MK uses local pointers. Elements of a ''global'' list can be distributed on all clusters, and  ALMOS-MK uses extended pointers. 
     34All elements of a ''local'' list are in the same cluster, and ALMOS-MKH uses local pointers. Elements of a ''global'' list can be distributed on all clusters, and  ALMOS-MKH uses extended pointers. 
    3535
    3636== __2) Thread__ ==
    3737
    38 ALMOS-MK defines four types of threads :
     38ALMOS-MKH defines four types of threads :
    3939 * one '''USER''' thread is created by a pthread_create() system call.
    4040 * one '''KERNEL''' thread is created by the kernel to execute a kernel service in a cluster.
     
    7272The process creation in a remote cluster implement the POSIX fork() / exec()  mechanism.
    7373When a parent process P executes the fork() system call, a new child process C is created.
    74 The new C process inherit from the parent process P the open files (FDT), and the memory image (VSL and GPT). 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.
     74The new C process inherit from the parent process P the open files (FDT), and the memory image (VSL and GPT). 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-MKH  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.
    7575
    7676=== 3.1) fork() ===