Changes between Version 13 and Version 14 of user_synchro


Ignore:
Timestamp:
Oct 10, 2018, 11:41:11 AM (6 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • user_synchro

    v13 v14  
    99 * A '''barrier'''  is declared by a given user process as a ''pthread_barrier_t'' global variable.
    1010 * A '''semaphore''' is declared by a given user process as a ''sem_t'' global variable.
    11 All these user types are implemented by ALMOS-MKH as ''unsigned long''. The value stored in user space for his variable is NOT used by the kernel. ALMOS-MKH uses only the virtual address of this variable as an identifier for the synchronization variable.
     11All these user types are implemented by ALMOS-MKH as ''unsigned long''. The value stored in user space for this variable is NOT used by the kernel. ALMOS-MKH uses only the virtual address of this variable as an identifier for the synchronization variable.
    1212
    1313As these synchronization variables are used by threads running in different clusters, all access functions use remote_read() / remote_write() primitives.
     
    1818== B) Mutex ==
    1919
    20 The user level, POSIX compliant, mutex is defined in the '''pthread''' library, implemented by the [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/libs/libpthread/pthread.h pthread.h] and [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/libs/libpthread/pthread.c pthread.c] files.
     20The user level, POSIX compliant, mutex is defined in the '''pthread''' library, implemented by the [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/libs/libpthread/pthread.h pthread.h],   [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/syscalls/shared_include/shared_pthread.h shared_pthread.h], and [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/libs/libpthread/pthread.c pthread.c] files.
    2121
    2222It can be used by a muti-threaded user application to give a thread exclusive access to a shared user object.
     
    6060 * The blocking '''remote_barrier_wait()''' function returns only when all expected threads reach the barrier. It implements a descheduling policy: when a thread is not the last expected thread, it register in he barrier waiting queue and blocks on the THREAD_BLOCKED_USERSYNC condition. The last thread reset the barrier and unblocks all waiting threads.
    6161
    62 N.B. ''In the current implementation, the barrier is physically implemented in the reference cluster, creating contention when the
    63 number of threads is large. It exists a distributed implementation, where the barrier is implemented as a quad-tree, entirely  in user space (no system calls)''.
     62N.B. ''In the current implementation, the barrier is implemented in the reference cluster, creating contention when the
     63number of threads is large. It exists a distributed implementation, where the barrier is implemented as a quad-tree, entirely  in user space (no system calls), but this implementation makes the assumption that the target architecture has a 2D mesh topology.''
    6464
    6565== E) Semaphore ==