Answer the question
In order to leave comments, you need to log in
Allocation of cache memory between threads?
Breaking a few articles, I realized that each core has its own cache and I just can’t understand how the cache memory is distributed between threads and do threads see changes in cache variables if they are executed in the same core?
Suppose there are 2 threads that are executed alternately on the same core, how do they share the cache of this core?
What happens if the variable is not synchronized or marked as volatile , and these two threads, which run on the same core, increment this variable?
Answer the question
In order to leave comments, you need to log in
Break a few articles, I realized that each core has its own cache
What happens if the variable is not synchronized or marked as volatile
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question