3 min read280 views
What Actually Happens Inside Your CPU When Two Java Threads Share a Variable
Running multithreaded software in modern multi-core processor is a physical coordination challenge between the CPU cores, local caches (L1, L2 and L3) and main memory(RAM). Here is what happens inside the machine when threads executes simultaneously.