Changes between Version 2 and Version 3 of user_synchro
- Timestamp:
- Oct 9, 2018, 12:54:19 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
user_synchro
v2 v3 5 5 == A) General Principles == 6 6 7 All data structure defined by ALMOS-MKH to support the user-level, POSIX compliant, synchronization services are fully specific, and do NOT use the kernel level synchronization primitives described in section. does NOT use the 7 All data structure defined by ALMOS-MKH to support the user-level, POSIX compliant, synchronization services are fully specific, and do NOT use the kernel level synchronization primitives described in section J. 8 * A '''mutex''' is declared by a given user process as a ''pthread_mutex_t'' global variable. 9 * A '''condvar''' is declared by a given user process as a ''pthread_cond_t'' global variable. 10 * A '''barrier''' is declared by a given user process as a ''pthread_barrier_t'' global variable. 11 * A '''semaphore''' is declared by a given user process as a ''sem_t'' global variable. 12 All these user types are implemented by ALMOS-MKH as ''unsigned long'', but the value stored in user space is NOT used by the kernel. ALMOS-MKH uses only the virtual address as an identifier for a given synchronization variable. 13 For each type of variable, ALMOS-MKH defines a specific internal data structure described below. 8 14 9 15 == B) Mutex == … … 12 18 13 19 It can be used by muti-threaded user applications to synchronise user threads running in different clusters. 14 15 A mutex is declared by a given user process as a ''pthread_mutex_t'' global variable. This user type is implemented by ALMOS-MKH as an ''unsigned long'', but the value stored in user space is NOT used by the kernel. ALMOS-MKH uses only the mutex virtual address as an identifier for the mutex.16 20 17 21 The kernel implementation of a mutex is defined in the [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/libk/remote_mutex.h remote_mutex.h] and [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/libk/remote_mutex.c remote_mutex.c] files. … … 22 26 == C) Condvar == 23 27 28 The user level, POSIX compliant, condvar API 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. 29 24 30 == D) Semaphore == 25 31