Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Terminology) "Contended" vs "Contented" Locks

What is the difference, if any, when talking about "contented" locks and "contended" locks.

I recently heard the word "contented" used for the first time in a discussion about locking and evidently the two terms are used with almost equal frequency:
contented 367,000 results
contended 353,000 results

"Contention" and "contended" make sense to me, as they are words meaning in conflict, but "contented" means satisfied/at peace, so color me confused.

like image 473
vbuhr Avatar asked Dec 22 '15 03:12

vbuhr


People also ask

What is contended lock?

"Contended" describes a lock that different threads are trying to acquire at the same time, "Heavily-contended" if numerous threads are all trying to acquire the same lock, "uncontended" describing cases where a thread doesn't have any competition to acquire a lock.

What are locks in programming?

In computer science, a lock or mutex (from mutual exclusion) is a synchronization primitive: a mechanism that enforces limits on access to a resource when there are many threads of execution.


1 Answers

"Contended" describes a lock that different threads are trying to acquire at the same time, "Heavily-contended" if numerous threads are all trying to acquire the same lock, "uncontended" describing cases where a thread doesn't have any competition to acquire a lock.

"Contented" might be a typo, an erroneous autocorrect, or maybe an eggcorn).

Here's an example from the Oracle website, on the weblog of David Dice, a senior research scientist in Oracle who specializes in concurrency applications. If "contented" had a meaning specific to locks or multithreading I expect he would know about it. The contented typo appeared in his weblog (it's been corrected in the article text but it remains in the article url), someone commented on seeing "contented". David Dice replied:

Thanks for catching the embarrassing typo, which I just fixed! Like you, I wonder exactly what the semantics of "@contented" would mean (:>). Regards, -Dave

For some of these results Google seems to be anticipating our inability to spell. Google returns this link on the first page of matches for "contented site:oracle.com", even though the word "contented" does not appear in it.

like image 163
Nathan Hughes Avatar answered Sep 17 '22 04:09

Nathan Hughes