Multi-threaded applications may need to coordinate threads that share data or other resources. Different processes may need to coordinate with each other as well.

The sequence matters, in order to guarantee the results’ correctness. And meanwhile we definitely want to improve the performance.

So what are the common approaches for this? And what are the pros and cons?



Similar Posts:


linkedin
github
slack

Name Summary
Dead Lock  
Atomic Operations  
Lock & Metasphore  
Lock-free  
Async Programming  
Race Conditions  
Implement Thread-safe queue/hashmap  

Q: How to detect dead lock and prevent it?

A:


Q: Synchronous vs. Asynchronous

With async architectures, we can scale out for better performance.

But with sync architectures, the performance may not improve, even if we are willing to add more infrastures.

e.g, performance bottlenecks are at applications, instead of Databases. And the application has lots of locks and even starvations.



Share It, If You Like It.

Leave a Reply

Your email address will not be published. Required fields are marked *