Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

'Mutual Exclusion' Vs 'Critical Section' Vs 'Synchronization' Vs No preemption

 
Greenhorn
Posts: 18
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I came across these terms and I'm a bit confused about the differences.

While searching for explanations I found few more terms like "Hold and Wait", "No preemption", "critical section" which made me more confused   .

Could anyone explain me the differences among 'Mutual Exclusion', 'Critical Section', 'Synchronization', 'Hold and Wait' and 'No preemption'?

Thanks in advance  
 
author
Posts: 23887
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Akshayyha Krishnamurthy wrote:
Could anyone explain me the differences among 'Mutual Exclusion', 'Critical Section', 'Synchronization', 'Hold and Wait' and 'No preemption'?



Mutual Exclusion, or the Mutex lock, is your basic lock that can be acquired. Only one thread can own the lock. And interestingly, most threading systems provide a similar mutex lock functionality -- common threading environments including Posix, Solaris, and Windows all have mutexes.

Critical section is basically a lightweight version of mutex, that was introduced by Windows. It behaves in many ways like a mutex with some limitations. The main limitation being that it only works in one process. And I think (I may be wrong), only Windows have this terminology.

Synchronization is also a lightweight version of mutex, that was introduced by Java. It also behaves in many ways like a mutex with some limitations. Also, in my opinion, this terminology seems to be with only Java.  

As for the other two terms, one seem to be related to condition variables, and the other seems to be related to scheduling. Regardless, it may be out of context, so may need more information, to further discuss this.

Hope this helps,
Henry
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic