Question: A program consists of two nested loops - a small inner loop and a much larger outer loop. The general structure of the program is
A program consists of two nested loops - a small inner loop and a much larger outer loop. The general structure of the program is given in Figure P5.1. The decimal memory addresses shown delineate the location of the two loops and the beginning and end of the total program. All memory locations in the various sections, 17-22, 23-164, 165-239, and so on, contain instructions to be executed in straight-line sequencing. The program is to be run on a computer that has an instruction cache organized in the direct-mapped manner (see Figure 5.15) and that has the following parameters:
The cycle time of the main memory is 10 s, and the cycle time of the cache is 17 s.
(a) Specify the number of bits in the TAG, BLOCK, and WORD fields in main memory addresses.
(b) Compute the total time needed for instruction fetching during execution of the program in Figure P5.1.LO1
Main memory size 64K words Cache size 1K words Block size 128 words START 17 165 Inner loop executed 20 times Outer loop executed 10 times 239 1200 END 1500 Figure P5.1 A program structure for Problem 5.6.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
