Changes between Version 15 and Version 16 of kernel_synchro


Ignore:
Timestamp:
Sep 11, 2020, 4:50:08 PM (6 weeks ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_synchro

    v15 v16  
    1313These barriers being used only during kernel initialization implement a simple busy-waiting policy. They are implemented as global variables, in the kdata segment. These toggle barriers can be used several times, and don't need to be explicitly initialized. For the global barrier (''xbarrier''), the client threads use ''remote_read(), remote_write(), & remote_atomic_add()'' primitives, to access the barrier located in cluster 0.   
    1414 
    15 
    1615== B) Locks general principles ==
    1716
     
    5251 * when a  writer completes its access, it reset the "taken" field, releases the first waiting writer if queue non empty, or releases all waiting readers if no writer.
    5352
    54 == F) Locks debug  ==
     53== F) locks debug  ==
    5554
    5655Each local or remote busylock contains a <type> field defining the specific resource protected by this lock, that is a non-zero value defined at lock initialization.
    5756 * if the ''busylock'' is directly used to protect access to a shared kernel structure, this type field defines the type of the protected structure.
    58  * if the ''busylock'' is used to protect concurrent access to an higher level lock (queuelock or rwlock), the <type> field define the type of the structure protected by the higher level lock.
    59 The exiting lock types are defined in the <kernel_config.h> file.
     57 * if the ''busylock'' is used to protect concurrent access to an higher level lock (queuelock or rwlock), the <type> field defines the type of the structure protected by this higher level lock.
     58The existing lock types are defined in the <kernel_config.h> file.
    6059
    6160=== F.1 busylock debug ===
     
    65641. Each thread contains - besides the ''busylocks'' counter - an optional ''busylocks_root'' field, that is the root of an embedded xlist of (local or remote) busylocks hold by a given thread at a given time. This list is implemented by an optional ''xlist'' field in the busy lock descriptor. It  is dynamically updated by the ''busylock_acquire()'' and ''busylock_release()'' functions. The set of taken busylocks is printed in the error message, when the scheduler detects that a descheduling thread is holding one or several busylocks. This list can also be printed through the ''idbg'' interactive debugger, for any thread identified by its (pid,trdid).
    6665
    67 2. Moreover, when DEBUG_BUSYLOCK  is set,  all busylock_acquire() / busylock_release() made by the thread, identified by the DEBUG_BUSYLOCK_PID and DEBUG_BUSYLOCK_TRDID parameters (defined in the kernel_config.h file) are traced on kernel TXT0.
     662. All ''busylock_acquire() / busylock_release()'' made by the thread[pid,trdid], are traced on kernel TXT0.  The DEBUG_BUSYLOCK_PID  DEBUG_BUSYLOCK_TRDID parameters are defined in the <kernel_config.h> file)
    6867
    6968=== F.2 higher level lock debug ===