Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Loop Invariants to Detect Transient Faults in the Data Caches Seung Woo Son, Sri Hari Krishna Narayanan and Mahmut T. Kandemir Microsystems Design.

Similar presentations


Presentation on theme: "Using Loop Invariants to Detect Transient Faults in the Data Caches Seung Woo Son, Sri Hari Krishna Narayanan and Mahmut T. Kandemir Microsystems Design."— Presentation transcript:

1 Using Loop Invariants to Detect Transient Faults in the Data Caches Seung Woo Son, Sri Hari Krishna Narayanan and Mahmut T. Kandemir Microsystems Design Lab. The Pennsylvania State University

2 LCTES04-Student Forum 6/12/2004MDL@PSU2 Related Work – H/W Hardware fault detection usually involves a combination of Information redundancy (e.g., ECC, parity, etc.) Temporal redundancy (e.g., executing the same instruction twice in the same functional unit, but at different times) Spatial redundancy (e.g., executing same instruction in different functional units)

3 LCTES04-Student Forum 6/12/2004MDL@PSU3 Related Work -S/W Replication of the program execution and the check of the results Recovery Blocks N-Version Programming Introduction of some control code into the program ABFT Assertions Code Flow Checking

4 LCTES04-Student Forum 6/12/2004MDL@PSU4 Our Approach Use loop invariants to detect transient-faults What is a loop invariant? It is data or a property that does not change during execution of a loop. Why target loops? Loops make up 90% of the execution time. Our usage of invariants If invariant value has changed, then soft error has occurred, modifying the data in cache. In that case, re-perform iterations.

5 LCTES04-Student Forum 6/12/2004MDL@PSU5 Bubble Sort Algorithm Bubblesort(sequence): Input: sequence of integers sequence Post-condition: sequence is sorted & contains the same integers as the original sequence length = length of sequence for i = 0 to length - 1 do for j = 0 to length - i -2 do if jth element of sequence >(j+1)th element of sequence then swap jth and (j+1)th element of sequence

6 LCTES04-Student Forum 6/12/2004MDL@PSU6 Bubble Sort-Sample Invariants Loop Invariant – Outer Loop: Last i elements of sequence are sorted and are all greater or equal to the other elements of the sequence. Loop Invariant – Inner Loop: Same as outer loop and the jth element of sequence is greater or equal to the first j elements of sequence.

7 LCTES04-Student Forum 6/12/2004MDL@PSU7 The Big Picture: How does the Project Work? Use an Invariant Detector to detect invariants in code. Incorporate ‘checker code’ into the source code -> hardened version Run this code in a modified version of SimpleScalar that injects errors into memory and cache. Calculate how our method performs

8 LCTES04-Student Forum 6/12/2004MDL@PSU8 The Daikon Invariant Detector Daikon - developed at the Program Analysis Group at MIT. Dynamically detects invariants about a program ’ s data structures Limitations It only targets procedural invariants Does not target loops Does not consider local variables

9 LCTES04-Student Forum 6/12/2004MDL@PSU9 Daikon Usage Modify our Source Code such that Daikon can detect loop invariants Instrument the Source Code Run Test Suites on Instrumented code to create Trace Files Detect invariants in Trace Files Incorporate Invariant Checker code in the Source Code

10 LCTES04-Student Forum 6/12/2004MDL@PSU10 Fault Injection Mechanism Modified SimpleScalar v3.0d to inject faults Randomly generate faults on memory access operation Memory corruption routines from Angshuman ’ s In our study, we randomly flip one bit of memory data during memory and cache read/write operations Generate statistics for faults injected

11 LCTES04-Student Forum 6/12/2004MDL@PSU11 Detected loop invariant – bubble sort … a != null -> easy a[i] > i -> easy i >= 1 -> easy n == 100 -> easy a[i..] sorted by medium a[0..i] sorted by > -> medium i easy …

12 LCTES04-Student Forum 6/12/2004MDL@PSU12 Detected loop invariant – matrix multiplication … size(a[]) == size(b[]) -> easy i >= 0 -> easy b[] contains no duplicates -> difficult b[] elements != null -> medium b[] == a[] + 3120 -> useless …

13 LCTES04-Student Forum 6/12/2004MDL@PSU13 Experiment Setup Bubble Sort Array size = 100 # of iteration = 150 Total # of instruction simulated: 68,019,732 Matrix Multiplication Array size = 100 x 100 # of iteration = 1 Total # of instruction simulated: 65,547,520

14 LCTES04-Student Forum 6/12/2004MDL@PSU14 Detection Rate

15 LCTES04-Student Forum 6/12/2004MDL@PSU15 Detection overhead - code increase

16 LCTES04-Student Forum 6/12/2004MDL@PSU16 Conclusion Developed a soft error detection technique using loop-invariants Detection rate varies according to the characteristics of the applications Different programs have different loop invariants Performance degradation due to fault- hardened code

17 LCTES04-Student Forum 6/12/2004MDL@PSU17 Future Work Better invariant generation mechanism that generated loop invariants directly Automatic Classification of Invariants Automatic Assertion generator in Source Code More accurate fault injection


Download ppt "Using Loop Invariants to Detect Transient Faults in the Data Caches Seung Woo Son, Sri Hari Krishna Narayanan and Mahmut T. Kandemir Microsystems Design."

Similar presentations


Ads by Google