This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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

 
Greenhorn
Posts: 17
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: 23843
141
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
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!