Changes between Version 13 and Version 14 of user_synchro
- Timestamp:
- Oct 10, 2018, 11:41:11 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
user_synchro
v13 v14 9 9 * A '''barrier''' is declared by a given user process as a ''pthread_barrier_t'' global variable. 10 10 * 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.11 All 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. 12 12 13 13 As these synchronization variables are used by threads running in different clusters, all access functions use remote_read() / remote_write() primitives. … … 18 18 == B) Mutex == 19 19 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.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], [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. 21 21 22 22 It can be used by a muti-threaded user application to give a thread exclusive access to a shared user object. … … 60 60 * 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. 61 61 62 N.B. ''In the current implementation, the barrier is physicallyimplemented in the reference cluster, creating contention when the63 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) ''.62 N.B. ''In the current implementation, the barrier is 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), but this implementation makes the assumption that the target architecture has a 2D mesh topology.'' 64 64 65 65 == E) Semaphore ==