A dual-mode instruction prefetch scheme for improved worst case and average case program execution times

One of the obstacles to using RISC processors in a hard real-time environment is the unpredictability of caches. This unpredictability stems from basing them on a design that tries to optimize the average case execution time. We propose a dual mode instruction prefetch scheme as an alternative to instruction caching schemes. In the proposed scheme, a thread is associated with each instruction block. The thread indicates the instruction block that is to be prefetched once the block containing it is accessed by the processor. The proposed scheme operates in two different modes: real-time and non real-time modes. In the real-time mode, the prefetching of instruction blocks is made in the direction that improves the worst case execution time. For this purpose, the thread is generated by the compiler through an analysis of the worst case execution path. In the non real-time mode, the thread is dynamically updated so that it indicates the instruction block that is most likely to be accessed next is the block that was previously accessed after the present block. Therefore, the thread is made to point to such a block in the non real-time mode. The above tailoring of thread information is on a task basis and, therefore, each task in the system can choose its own mode depending on its needs. Typically real-time tasks choose the real-time mode for an improved worst case execution time whereas non time critical tasks choose the non real-time mode for an improved average case execution time. This paper shows, through analysis using a timing tool, that the proposed scheme significantly (up to 45%) improves the predicted worst case execution time in the real-time mode as compared with no prefetching scheme.<<ETX>>

[1]  Norman P. Jouppi,et al.  Improving direct-mapped cache performance by the addition of a small fully-associative cache and pre , 1990, ISCA 1990.

[2]  Chang Yun Park,et al.  Predicting deterministic execution times of real-time programs , 1992 .

[3]  Mark D. Hill,et al.  Aspects of Cache Memory and Instruction , 1987 .

[4]  Alan C. Shaw,et al.  Reasoning About Time in Higher-Level Language Software , 1989, IEEE Trans. Software Eng..

[5]  Anoop Gupta,et al.  Design and evaluation of a compiler algorithm for prefetching , 1992, ASPLOS V.

[6]  D. B. Kirk,et al.  SMART (strategic memory allocation for real-time) cache design , 1989, [1989] Proceedings. Real-Time Systems Symposium.

[7]  Alan Jay Smith,et al.  Cache Memories , 1982, CSUR.

[8]  Henry M. Levy,et al.  An Architecture for Software-Controlled Data Prefetching , 1991, ISCA.

[9]  Henry M. Levy,et al.  An architecture for software-controlled data prefetching , 1991, ISCA '91.

[10]  Alan C. Shaw,et al.  Experiments with a program timing tool based on source-level timing schema , 1990, [1990] Proceedings 11th Real-Time Systems Symposium.

[11]  Alan Jay Smith,et al.  Aspects of cache memory and instruction buffer performance , 1987 .

[12]  P. Gács,et al.  Algorithms , 1992 .

[13]  Alan Jay Smith,et al.  Branch Prediction Strategies and Branch Target Buffer Design , 1995, Computer.

[14]  Jean-Loup Baer,et al.  Reducing memory latency via non-blocking and prefetching caches , 1992, ASPLOS V.

[15]  David B. Kirk Predictable cache design for real-time systems , 1991 .

[16]  Ken Kennedy,et al.  Software prefetching , 1991, ASPLOS IV.