By Asaf Shelly
Locks are a problematic mechanism because they can potentially slow down the system. Sometimes you just need them, usually when working with low-level API and the lower levels of an infrastructure.
There are four basic ways for using a lock:
* Spin-lock : will retain the CPU core until a condition is met
* Atomic Operation : single operation using a predefined CPU Op-Code
* Kernel Lock : such as MUTEX which can be automatically unlocked if the thread terminates
* Fast-Lock : such as Critical Section which is light-weight and is more sensitive to bugs
Locks are implemented internally by either : preventing tasks from switching / disabling Interrupts / Internally using an Atomic Operation.



1 response so far ↓
1 Hardware support for Locks // Feb 22, 2010 at 11:51 pm
[...] here: Hardware support for Locks Рубрика: Разные рубрики | Метки: and-, api, down-the-system, locks-, [...]
You must log in to post a comment.