Understanding the behavior and implications of context switch misses
Authors:
Open Access
- 30 December 2010
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 7 (4) , 1-28
Abstract
One of the essential features in modern computer systems is context switching, which allows multiple threads of execution to time-share a limited number of processors. While very useful, context switching can introduce high performance overheads, with one of the primary reasons being the cache perturbation effect. Between the time a thread is switched out and when it resumes execution, parts of its working set in the cache may be perturbed by other interfering threads, leading to (context switch) cache misses to recover from the perturbation. The goal of this article is to understand how cache parameters and application behavior influence the number of context switch misses the application suffers from. We characterize a previously unreported type of context switch misses that occur as the artifact of the interaction of cache replacement policy and an application's temporal reuse behavior. We characterize the behavior of these “reordered misses” for various applications, cache sizes, and various amount of cache perturbation. As a second contribution, we develop an analytical model that reveals the mathematical relationship between cache design parameters, an application's temporal reuse pattern, and the number of context switch misses the application suffers from. We validate the model against simulation studies and find that it is sufficiently accurate in predicting the trends of context switch misses with regard to various cache perturbation amount. The mathematical relationship provided by the model allows us to derive insights into precisely why some applications are more vulnerable to context switch misses than others. Through a case study on prefetching, we find that prefetching tends to aggravate the number of context switch misses and a less aggresive prefetching technique can reduce the number of context switch misses the application suffers from. We also investigate how cache sizes affect context switch misses. Our study shows that under relatively heavy workloads in the system, the worst-case number of context switch misses an application suffers from tends to increase proportionally with cache sizes, to the extent that may completely negate the reduction in other types of cache misses.Keywords
Funding Information
- Division of Computing and Communication Foundations (CCF-0347425)
This publication has 16 references indexed in Scilit:
- An analytical model for cache replacement policy performance2006
- Estimating cache misses and locality using stack distances2003
- Simics: A full system simulation platformComputer, 2002
- Analytical cache models with applications to cache partitioning2001
- Effects of multithreading on cache performanceIEEE Transactions on Computers, 1999
- The susceptibility of programs to context switchingIEEE Transactions on Computers, 1994
- The effect of context switches on cache performance1991
- An analytical cache modelACM Transactions on Computer Systems, 1989
- Cache performance of operating system and multiprogramming workloadsACM Transactions on Computer Systems, 1988
- Footprints in the cacheACM Transactions on Computer Systems, 1987