From the 11th Chapter(Performance and Scalability) and the section named Context Switching of the JCIP book:
When a new thread is switched in, the data it needs is unlikely to be in the local processor cache, so a context-switch causes a flurry of cache misses, and thus threads run a little more slowly when they are first scheduled.
- Can someone explain in an easy to understand way the concept of cache miss and its probable opposite (cache hit)?
- Why context-switching would cause a lot of cache miss?