5. Monitor concept, synchronized principle, synchronized lock upgrade and examples (lightweight lock, heavyweight lock, spin lock, bias lock)
Monitor concept
Java object header
Take 32-bit virtual machine as an example Common object Array object The Mark Word structure is 64 bit virtual machine Mark Word
reference material https://stackoverflow.com/questions/26357186/what-is-in-java-object-header
Principle of Monitor (lock)
Monitor is translated into monitor or tube Eac ...
Added by BK87 on Sat, 05 Mar 2022 21:29:30 +0200
thanos source code analysis
Third party packages used
Learn from prom and use kingpin to parse command and flagUse GitHub COM / oklog / run package to start a set of processes
http server, grpc server, dynamic discovery of downstream components implementing STORE API
github. COM / go Kit / kit microservice framework
Best practices
1. prom is a stateful node. We ...
Added by MerlinJR on Sun, 23 Jan 2022 01:51:31 +0200
Management of concurrency sharing model
3. Shared model process
What is thread safety
When multiple threads access a method, no matter how you call it or how these threads execute alternately, we don't need to do any synchronization in the main program. The resulting behavior of this class is the correct behavior we imagine, so we can say that this class is thread safe.
3.1 p ...
Added by gottes_tod on Thu, 20 Jan 2022 21:31:27 +0200