Changes between Version 5 and Version 6 of user_synchro
- Timestamp:
- Oct 9, 2018, 2:10:37 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
user_synchro
v5 v6 10 10 * A '''barrier''' is declared by a given user process as a ''pthread_barrier_t'' global variable. 11 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. 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 the synchronization variable. 13 14 As these synchronization variables are used by threads running in different clusters, all access functions use remote_read() / remote_write() primitives. 15 16 For each type of variable, ALMOS-MKH defines a specific internal data structure as described below. 14 17 15 18 == B) Mutex == … … 17 20 The user level, POSIX compliant, '''mutex''' 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. 18 21 19 It can be used by a muti-threaded user application to synchronize user threads running in different clusters. It allows a given thread toexclusive access to a shared user object.22 It can be used by a muti-threaded user application to give a thread exclusive access to a shared user object. 20 23 21 24 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. … … 31 34 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. 32 35 33 It can be used by a muti-threaded user application to synchronize user threads running in different clusters. Itallows a given thread to efficiently wait for a change in a shared user object.36 It allows a given thread to efficiently wait for a change in a shared user object. 34 37 A condvar must always be associated to a mutex. 35 38