Real-Time Systems

, Volume 18, Issue 2–3, pp 181–215 | Cite as

Symbolic Cache Analysis for Real-Time Systems

  • Johann Blieberger
  • Thomas Fahringer
  • Bernhard Scholz


Caches impose a major problem for predicting execution times of real-time systems since the cache behavior depends on the history of previous memory references. Too pessimistic assumptions on cache hits can obtain worst-case execution time estimates that are prohibitive for real-time systems. This paper presents a novel approach for deriving a highly accurate analytical cache hit function for C-programs at compile-time based on the assumption that no external cache interference (e.g. process dispatching or DMA activity) occurs. First, a symbolic tracefile of an instrumented C-program is generated based on symbolic evaluation, which is a static technique to determine the dynamic behavior of programs. All memory references of a program are described by symbolic expressions and recurrences and stored in chronological order in the symbolic tracefile. Second, a cache hit function for several cache architectures is computed based on a cache evaluation technique. Our approach goes beyond previous work by precisely modelling program control flow and program unknowns, modelling large classes of cache architectures, and providing very accurate cache hit predictions. Examples for the SPARC architecture are used to illustrate the accuracy and effectiveness of our symbolic cache prediction.

cache hit prediction symbolic evaluation static analysis worst-case execution time 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Alt, M., Ferdinand, C., Martin, F., and Wilhelm, R. 1996. Cache behaviour prediction by abstract interpretation. Proc. of Static Analysis Symposium, pp. 52–66.Google Scholar
  2. Altenbernd, P. 1996. On the false path problem in hard real-time programs. Proc. Euromicro Workshop on Real-Time Systems.Google Scholar
  3. Arnold, R., Mueller, F., Whalley, D., and Harmon, M. 1994. Bounding worst-case instruction cache performance. Proc. of the IEEE Real-Time Systems Symposium, pp. 172–181.Google Scholar
  4. Blieberger, J. 1994. Discrete loops and worst case performance. Computer Languages 20(3): 193–212.Google Scholar
  5. Blieberger, J. 1997. Data-flow frameworks for worst-case execution time analysis. To appear in Real-Time Systems.Google Scholar
  6. Blieberger, J., and Burgstaller, B. 1998. Symbolic reaching definitions analysis of Ada programs. Proc. of the Ada-Europe International Conference on Reliable Software Technologies, pp. 238–250.Google Scholar
  7. Blieberger, J., Burgstaller, B., and Scholz, B. 1999. Interprocedural symbolic analysis of Ada programs with aliases. Proc. of the Ada-Europe International Conference on Reliable Software Technologies. pp. 136–145.Google Scholar
  8. Blieberger, J., and Lieger, R. 1996. Worst-case space and time complexity of recursive procedures. Real-Time Systems 11(2): 115–144.Google Scholar
  9. Callahan, D., Kennedy, K., and Portfield, A. 1990. Analyzing and Visualizing Performance of Memory Hierachies, Instrumentation for Visualization. ACM Press.Google Scholar
  10. Chapman, R., Burns, A., and Wellings, A. 1996. Combining static worst-case timing analysis and program proof. The Journal of Real-Time Systems 11(2): 145–171.Google Scholar
  11. Cheatham, T., Holloway, H., and Townley, J. 1979. Symbolic evaluation and the analysis of programs. IEEE Trans. Software Eng. 5(4): 403–417.Google Scholar
  12. Dijkstra, E. 1976. A Discipline of Programming. New Jersey: Prentice Hall.Google Scholar
  13. Engblom, J., Altenbernd, P., and Ermedahl, A. 1998. Facilitating worst-case execution times analysis for optimized code. Proc. Euromicro Workshop on Real-Time Systems.Google Scholar
  14. Fahringer, T. 1996. Automatic Performance Prediction of Parallel Programs. Boston: Kluwer Academic Publishers.Google Scholar
  15. Fahringer, T. 1997. Estimating cache performance for sequential and data parallel programs. Proc. of the International Conference and Exhibition on High-Performance Computing and Networking.Google Scholar
  16. Fahringer, T. 1998a. Efficient symbolic analysis for parallelizing compilers and performance estimators. Journal of Supercomputing, Kluwer Academic Publishers 12(3).Google Scholar
  17. Fahringer, T. 1998b. Symbolic analysis techniques for program parallelization. Journal of Future Generation Computer Systems, Elsevier Science, North-Holland 13(1997/98): 385–396.Google Scholar
  18. Fahringer, T., and Scholz, B. 1997. Symbolic evaluation for parallelizing compilers. Proc. of the ACM International Conference on Supercomputing.Google Scholar
  19. Fahringer, T., and Scholz, B. 1999. Aunified symbolic evaluation framework for parallelizing compilers. Technical Report AURORA TR1999-15 (, University of Vienna, Austria.Google Scholar
  20. Ferrante, J., Sarkar, V., and Trash, W. 1991. On estimating and enhancing cache effectiveness. Proc. of the Workshop on Languages and Compilers for Parallel Computing.Google Scholar
  21. Gerlek, M. P., Stoltz, E., and Wolfe, M. 1995. Beyond induction variables: Detecting and classifying sequences using a demand-driven SSA form. ACM Transactions on Programming Languages and Systems (TOPLAS) 17(1): 85–122.Google Scholar
  22. Ghosh, S., Martonosi, M., and Malik, S. 1997. Cache miss equations: an analytical representation of cache misses. International Conference on Supercomputing.Google Scholar
  23. Goldberg, A., and Hennessy, J. 1991. Performance debugging shared memory multiprocessor programs with MTOOL. Proc. of the Supercomputing Conference.Google Scholar
  24. Haghighat, M., and Polychronopoulos, C. 1996. Symbolic analysis for parallelizing compilers. ACMTransactions on Programming Languages and Systems 18(4): 477–518.Google Scholar
  25. Healy, C., Whalley, D., and Harmon, M. 1995. Integrating the timing analysis of pipelining and instruction caching. Proc. of the IEEE Real-Time Systems Symposium, pp. 288–297.Google Scholar
  26. Healy, C. A., Arnold, R. D., Mueller, F., Whalley, D., and Harmon, M. G. 1999. Bounding pipeline and instruction cache performance. IEEE Transactions on Computers 48(1).Google Scholar
  27. Hennessy, J., and Patterson, D. 1990. Computer Architecture-A Quantitative Approach. San Mateo, CA: Morgan Kaufmann.Google Scholar
  28. Hunt, B. 1997. Acme Cache Simulator. Parallel Architecture Research Laboratory (PARL), Klipsch School of Electrical and Computer Engineering, New Mexico. URL»acme/acs.html.Google Scholar
  29. Johnson, E., and Ha, J. 1994. PDATS lossless address trace compression for reducing file size and access time. Proc. of the IEEE International Phoenix Conference on omputers and Communication.Google Scholar
  30. King, J. 1976. Symbolic execution and program testing. Commun. ACM 19(7): 385–394.Google Scholar
  31. Lam, M., Rothberg, E., and Wolf, M. 1991. The cache performance and optimization of blocked algorithms. Proc. of the Int. Conference on Architectural Support for Prog. Languages Operating Systems.Google Scholar
  32. Lebeck, A., and Wood, D. 1994. Cache profiling and the SPEC benchmarks: A case study. IEEE Computer 27(10).Google Scholar
  33. Li, Y., Malik, S., and Wolfe, A. 1995. Performance estimation of embedded software with instruction cache modeling. Proc. of the ACM/IEEE International Conference on Computer-Aided Design.Google Scholar
  34. Li, Y., Malik, S., and Wolfe, A. 1996. Cache modeling for real-time software: Beyond direct mapped instruction caches. Proc. of the IEEE Real-Time Systems Symposium.Google Scholar
  35. Lim, S., Bae, Y., Jang, G., Rhee, B., Min, S., Park, C., Shin, H., Park, K., and Kim, C. 1994. An accurate worst case timing analysis technique for RISC processors. Proc. of the IEEE Real-Time Systems Symposium, pp. 97–108.Google Scholar
  36. Liu, J., and Lee, H. 1994. Deterministic upperbounds of the worst-case execution times of cached programs. Proc. of the IEEE Real-Time Systems Symposium, pp. 182–191.Google Scholar
  37. Lueker, G. S. 1980. Some techniques for solving recurrences. ACM Computing Surveys 12(4): 419–435.Google Scholar
  38. Mueller, F. 1997. Generalizing timing predictions to set-associative caches. Proc. of the EuroMicro, Workshop on Real Time Systems.Google Scholar
  39. Nilsen, K., and Rygg, B. 1995. Worst-case execution time analysis on modern processors. Proc. of ACMSIGPLAN, Workshop on Languages, Computer and Tool Support for Real-Time Systems, pp. 20–30.Google Scholar
  40. Ottosson, G., and Sjoedin, M. 1997. Worst case execution time analysis for modern hardware architectures. Proc. of ACM SIGPLAN, Workshop on Languages, Compilers and Tools for Real-Time Systems.Google Scholar
  41. Park, C. 1993. Predicting program execution times by analyzing static and dynamic program paths. The Journal of Real-Time Systems 5: 31–62.Google Scholar
  42. Ploedereder, E. 1980. A semantic model for the analysis and verification of programs in general, higher-level languages. Ph.D. thesis, Harvard University.Google Scholar
  43. Puschner, P., and Koza, C. 1989. Calculating the maximum execution time of real-time programs. The Journal of Real-Time Systems 1: 159–176.Google Scholar
  44. Rawat, J. 1993. Static analysis of cache performance for real-time programming. Master's thesis, Iowa State University of Science and Technology, Dept. of Computer Science.Google Scholar
  45. Scheibl, M., Celic, A., and Fahringer, T. 1996. Interfacing Mathematica from the Vienna Fortran compilation system. Technical Report, Institute for Software Technology and Parallel Systems, Univ. of Vienna.Google Scholar
  46. Smith, A. 1982. Cache memories. Computing Surveys 14(3).Google Scholar
  47. Temam, O., Fricker, C., and Jalby, W. 1994. Cache interference phenomena. Proc. of the ACM SIGMETRICS Conference.Google Scholar
  48. Theiling, H., and Ferdinand, C. 1998. Combining abstract interpretation and ILP for microarchitecture modelling and program path analysis. Proc. of the IEEE Real-Time Systems Symposium.Google Scholar

Copyright information

© Kluwer Academic Publishers 2000

Authors and Affiliations

  • Johann Blieberger
    • 1
  • Thomas Fahringer
    • 2
  • Bernhard Scholz
    • 2
  1. 1.Department of Computer-Aided AutomationTechnical University of ViennaViennaAustria
  2. 2.Institute for Software Technology and Parallel SystemsUniversity of ViennaViennaAustria

Personalised recommendations