Also found in: Dictionary, Thesaurus, Medical, Legal, Financial, Acronyms.
Related to mutex: semaphore, Mutex lock


(tool, music)
An extension of TeX for typesetting music.


A mutual exclusion object that allows multiple threads to synchronise access to a shared resource. A mutex has two states: locked and unlocked. Once a mutex has been locked by a thread, other threads attempting to lock it will block. When the locking thread unlocks (releases) the mutex, one of the blocked threads will acquire (lock) it and proceed.

If multiple threads or tasks are blocked on a locked mutex object, the one to take it and proceed when it becomes available is determined by some type of scheduling algorithm. For example, in a priority based system, the highest priority blocked task will acquire the mutex and proceed. Another common set-up is put blocked tasks on a first-in-first-out queue.

See also: priority inversion
This article is provided by FOLDOC - Free Online Dictionary of Computing (


(1) (MUTually EXclusive) A programming flag used to grab and release an object. When data are acquired that cannot be shared or processing is started that cannot be performed simultaneously elsewhere in the system, the mutex is set to "lock," which blocks other attempts to use it. The mutex is set to "unlock" when the data are no longer needed or the routine is finished. See flag.

(2) (MUsic TEX) A package of macros for the TeX typesetting system that supports musical notation.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
This article examines the response time of interrupts when other events, such as mutexes, semaphores, messages, interrupt handling, are taken in consideration.
Only the mutex matrices have a large number of rows in the second row block, i.e., a large separator among all partitioning instances.
Note that for the Mutex example, the first case P = 14, which has no functions (the number of processes being equal to the number of resources), the time is smaller than that required for other values of P.
A stronger interpretation and computation of mutex propagation takes place in the previously mentioned serial planning graphs, which remove all notion of action parallelism by forcing each action to be mutex with every other action (except for hoop actions).
[recv.sub.j]->[Method.sub.j][MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII]); } class lock { public: void acquire(); void release(); }; class Object { private: lock mutex; // mutual exclusion lock [iv.sub.1], ..., [iv.sub.n]; // instance variables public: void ParMethod([p.sub.1], ..., [p.sub.k]); }; void Object::ParMethod([p.sub.1], ..., [p.sub.k]){ // receiver object update, executed atomically mutex.acquire(); [l.sub.i] = expr([iv.sub.1], ..., [iv.sub.n], [p.sub.1], ..., [p.sub.k]); [iv.sub.i] = expr([iv.sub.1], ..., [iv.sub.n], [p.sub.1], ..., [p.sub.k]); mutex.release(); // operation invocations, spawned concurrently spawn([recv.sub.i]->([MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII]); .
ACE has classes Mutex, Semaphore, RW_Mutex, and others for synchronization.
--If m = M, types are called mutex channel types and channels mutex channels.
Listing 2 var mutex, item-available: semaphore; procedure producer; begin repeat produce_item; P(mutex); append_to_buffer; V(mutex); V(item_available) until false end; procedure consumer; begin repeat P(item_available); P(mutex); retrieve_from_buffer; V(mutex); consume_item until false end; begin semaphore_init(mutex, 1); semaphore_init(item_available, 0); parbegin producer; consumer parend end.
Here, a mutex mechanism is applied to the utility function to ensure that no two mutually inconsistent actions are taken.
There is no need to protect the clocks using a mutex; vectors that are being read while they are updated are still correct for our purposes, provided the clock values per thread are updated atomically (which is the case for RecPlay).
class node private: lock mutex; boolean marked; int value, sum; node *left, *right; public: void visit(int); void parallel-visit(int); }; void node::visit(int p) { this->parallel-visit(p); wait(); } void node::parallel_visit(int p) mutex.acquire(); sum = sum + p; if (!marked) { marked = TRUE; mutex.release(); if (left != NULL) spawn(left->parallel_visit(value)); if (right != NULL) spawn(right->parallel_visit(value)); else { } else { mutex.release(); } }