Mutex

From Teknologisk videncenter
Revision as of 08:05, 24 March 2012 by Heth (talk | contribs) (Created page with "A Mutex ('''Mut'''ual '''Ex'''clusion) is a method used to gain exclusive rights to use a shared resource in programming. Often used when designing software in [[embedded system]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A Mutex (Mutual Exclusion) is a method used to gain exclusive rights to use a shared resource in programming. Often used when designing software in embedded systems using interrupts and/or RTOS.

Example

In a interrupt driven embedded system there are two devices connected to a CAN bus. Two independent software routines communicate independent of each other with Device A and Device B through a shared CAN bus. See drawing below.

Two software routines fighting for exclusive access to the shared CAN bus