abstract interpretation of fifo replacement
play

Abstract Interpretation of FIFO Replacement Daniel Grund Jan - PowerPoint PPT Presentation

Abstract Interpretation of FIFO Replacement Daniel Grund Jan Reineke Saarland University, Saarbrcken, Germany Static Analysis Symposium 2009 saarland university computer science saarland university Outline computer science 1


  1. Abstract Interpretation of FIFO Replacement Daniel Grund Jan Reineke Saarland University, Saarbrücken, Germany Static Analysis Symposium 2009 saarland university computer science

  2. saarland university Outline computer science 1 Introduction & Motivation Timing Analysis Cache Analysis Abstract Interpretation of FIFO 2 Challenge FIFO Replacement Domain Cooperation Must Analysis May Analysis 3 Evaluation Related Work Analysis Precision Summary 4 Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 2 / 32

  3. saarland university Outline computer science 1 Introduction & Motivation Timing Analysis Cache Analysis Abstract Interpretation of FIFO 2 Challenge FIFO Replacement Domain Cooperation Must Analysis May Analysis 3 Evaluation Related Work Analysis Precision Summary 4 Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 3 / 32

  4. saarland university Notions in Timing Analysis computer science Frequency Analysis-guaranteed timing bounds Input- and state-induced variance Overest. Execution LB BCET WCET UB time Execution time depends on ◮ program input ◮ initial hardware state Bounds required for schedulability analysis of real-time systems Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 4 / 32

  5. saarland university Static Timing-Analysis Framework computer science Legend: Binary Executable Data Action Framework implemented by aiT of AbsInt CFG Re- construction Micro-architectural analysis Control-flow models pipeline, caches, buses, etc. Graph derives bounds on BB exec. times Value Loop Bound Control-flow is an abstract interpretation Analysis Analysis Analysis with a huge domain Annotated is the computationally most expensive CFG module Micro- Basic Block Global Bound architectural Timing Info Analysis Analysis Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 5 / 32

  6. saarland university Caches and Replacement Policies computer science “hit” [ ab ] Main Memory CPU Cache Capacity: 32 KB 2 MB Latency: 3 cycles 100 cycles Caches transparently buffer memory blocks Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 6 / 32

  7. saarland university Caches and Replacement Policies computer science “hit” [ ab ] a? Main Memory CPU Cache Capacity: 32 KB 2 MB Latency: 3 cycles 100 cycles Caches transparently buffer memory blocks Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 6 / 32

  8. saarland university Caches and Replacement Policies computer science “hit” [ ab ] a! Main Memory CPU Cache Capacity: 32 KB 2 MB Latency: 3 cycles 100 cycles Caches transparently buffer memory blocks Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 6 / 32

  9. saarland university Caches and Replacement Policies computer science “miss” [ ab ] c? Main Memory CPU Cache Capacity: 32 KB 2 MB Latency: 3 cycles 100 cycles Caches transparently buffer memory blocks Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 6 / 32

  10. saarland university Caches and Replacement Policies computer science “miss” [ ab ] c? Main Memory CPU Cache Capacity: 32 KB 2 MB Latency: 3 cycles 100 cycles Caches transparently buffer memory blocks Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 6 / 32

  11. saarland university Caches and Replacement Policies computer science “miss” [ ac ] c! Main Memory CPU Cache Capacity: 32 KB 2 MB Latency: 3 cycles 100 cycles Caches transparently buffer memory blocks Replacement policy dynamically decides which element to replace LRU least recently used PLRU pseudo LRU FIFO first-in first-out Have great influence on abstraction and (obtainable) analysis precision Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 6 / 32

  12. saarland university Caches and Replacement Policies computer science “miss” [ ac ] c! Main Memory CPU Cache Capacity: 32 KB 2 MB Latency: 3 cycles 100 cycles Caches transparently buffer memory blocks Replacement policy dynamically decides which element to replace LRU least recently used PLRU pseudo LRU FIFO first-in first-out Have great influence on abstraction and (obtainable) analysis precision Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 6 / 32

  13. saarland university Cache Analysis: Motivation & Application computer science Cache performance has great influence on overall performance Need tight bounds on cache performance Otherwise derived timing bounds may be useless: ◮ tasks are deemed not schedulable ◮ waste of hardware resources Application: Buffers with transparent replacement ◮ Instruction- and data-caches ◮ Branch target buffers (BTB, BTIC) ◮ Translation lookaside buffers (TLB) Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 7 / 32

  14. saarland university Static Cache Analysis computer science derives approximations to cache contents at each program point in order to classify memory accesses as cache hits or cache misses Must-information Underapproximation of cache contents Used to soundly classify cache hits May-information Overapproximation of cache contents Used to soundly classify cache misses Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 8 / 32

  15. saarland university Outline computer science 1 Introduction & Motivation Timing Analysis Cache Analysis Abstract Interpretation of FIFO 2 Challenge FIFO Replacement Domain Cooperation Must Analysis May Analysis 3 Evaluation Related Work Analysis Precision Summary 4 Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 9 / 32

  16. saarland university Concrete Semantics: What is FIFO? computer science State of FIFO cache of size k : s ∈ S := T k last-in first-in [ t 0 , . . . , t k − 1 ] Examples: c [ d , c , b , a ] − − → [ d , c , b , a ] hit e [ d , c , b , a ] − miss [ e , d , c , b ] − → Update: U S : S × T → S � [ t 0 , . . . , t k − 1 ] : ∃ i : t = t i “cache hit” U S ([ t 0 , . . . , t k − 1 ] , t ) := [ t , t 0 , . . . , t k − 2 ] : otherwise “cache miss” Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 10 / 32

  17. saarland university Challenge: How to Predict Hits? computer science Consider a FIFO cache with unknown contents a b − − → − − → [? , ? , ? , ?] [? , a , ? , ?] [? , a , ? , b ] hit hit a b − − → − − → [? , ? , ? , ?] [? , ? , ? , a ] miss [ b , ? , ? , ?] hit If a may be a hit, then b may evict a ⇒ Can only predict hits for most recently accessed element Can one do better? a b − − → − − → [? , ? , ? , ?] miss [ a , ? , ? , ?] miss [ b , a , ? , ?] If a is a miss, then b cannot evict a ⇒ Can predict hits for a until k further misses might have happened Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 11 / 32

  18. saarland university Challenge: How to Predict Hits? computer science Consider a FIFO cache with unknown contents a b − − → − − → [? , ? , ? , ?] [? , a , ? , ?] [? , a , ? , b ] hit hit a b − − → − − → [? , ? , ? , ?] [? , ? , ? , a ] miss [ b , ? , ? , ?] hit If a may be a hit, then b may evict a ⇒ Can only predict hits for most recently accessed element Can one do better? a b − − → − − → [? , ? , ? , ?] miss [ a , ? , ? , ?] miss [ b , a , ? , ?] If a is a miss, then b cannot evict a ⇒ Can predict hits for a until k further misses might have happened ⇒ Need may-information to obtain precise must-information Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 11 / 32

  19. saarland university A Solution. Well, our Contributions computer science Framework for static cache analysis ◮ policy independent ◮ couples must- and may-analyses ◮ analyses cooperate via “update reduction” FIFO must-analysis ◮ can profit from may-information ◮ hence, also better must-information FIFO may-analysis ◮ utilizes order of hits and misses ◮ more precise than prior analyses Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 12 / 32

  20. saarland university Framework and Classification computer science Fifo := Must × May Domain: H : cache hit ⊤ Class := { H , M } ⊤ : cache miss Classification: M H M ⊤ : unclassified C Fifo : Fifo × T → Class C Fifo (( must , may ) , t ) := C Must ( must , t ) ⊓ C May ( may , t ) Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 13 / 32

  21. saarland university Domain Cooperation via Update Reduction computer science Independent ( must ′ , may ′ ) ( must , may ) S S Daniel Grund and Jan Reineke Abstract Interpretation of FIFO Static Analysis Symposium 2009 14 / 32

Recommend


More recommend