Changes between Version 13 and Version 14 of kernel_locks


Ignore:
Timestamp:
Jan 19, 2015, 8:44:53 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_locks

    v13 v14  
    33[[PageOutline]]
    44
    5 The [source:soft/giet_vm/giet_common/locks.c locks.c] and [source:soft/giet_vm/giet_common/locks.h locks.h] files define the functions used by the kernel to take & release  locks protecting exclusive access to shared resources.
     5The [source:soft/giet_vm/giet_common/kernel_locks.c kernel_locks.c] and [source:soft/giet_vm/giet_common/kernel_locks.h kernel_locks.h] files define the functions used by the kernel to take & release  locks protecting exclusive access to shared resources.
    66
    7 The GIET_VM kernel define three types of spin-lock:
     7The GIET_VM kernel define three types of locks:
    88
    99 1. The '''simple_lock_t''' implements a non-distributed spin-lock without waiting queue.
    1010
    11  2. The '''spin_lock_t''' implements a spin-lock with a waiting queue (based on a ticket allocator scheme), to enforce fairness and avoid live-lock situations. The GIET_LOCK_MAX_TICKET define the wrapping value for the ticket allocator. This lock must be initialised.
     11 2. The '''spin_lock_t''' implements a spin-lock with a waiting queue (based on a ticket allocator scheme), to enforce fairness and avoid live-lock situations.
    1212
    13  3. The '''sbt_lock_t''' spin-lock can be used when a single lock protect a unique resource shared by a large number of tasks running on a 2D mesh clusterised architecture. The lock is implemented as a Sliced Binary Tree of ''partial'' locks distributed on all cluster, and is intended to avoid contention on a single cluster when all tasks try to access the same resource.
     13 3. The '''sqt_lock_t''' spin-lock can be used when a single lock protect a unique resource shared by a large number of tasks running on a 2D mesh clusterised architecture. The lock is implemented as a Synchronisation Quad Tree (SQT) of ''partial'' spin_locks distributed on all cluster, and is intended to avoid contention on a single cluster when all tasks try to access the same resource.
    1414
    1515All the lock access functions are prefixed by "_" to remind that they can only be executed by a processor in kernel mode.
     
    4949
    5050 === void '''_sbt_lock_init'''( sbt_lock_t*   lock ) ===
    51 This function allocates and initialises the Sliced Binary Tree, distributed on all clusters. The X_SIZE and Y_SIZE parameters defined in the ''hard_config.h'' file must be power of 2, with X_SIZE = Y_SIZE or X_SIZE = 2 * Y_SIZE. This function use the _remote_malloc() function, and the distributed kernel heap segments.
     51This function allocates and initialises the SQT nodes, distributed on all clusters. It computes the smallest SQT covering all processors defined in the mapping. This function use the _remote_malloc() function, and the distributed kernel heap segments.
    5252
    5353 === void '''_sbt_lock_acquire'''( sbt_lock_t*  lock ) ===