Question

Please help me out. Give me a detail explanation for this !!

Image for Repeat part (1) except assume that the cache is 2-way set associative with an LRU replacement policy and 16-by

  Image for Repeat part (1) except assume that the cache is 2-way set associative with an LRU replacement policy and 16-by

( repeat one is a subquestion.. please do it if you can but, understand if you dont solve the sub question one )

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Each Blocj has 16-bytes or 4-ints
Since the cache is a direct mapped one.
for the first loop ,
one in 4 elements causes a miss.
Sequence: Miss,.....

Number of misses= 1024/4=256
Number of Hits=768

For the second loop:
2048*4=8192 bytes which is the capacity of he direct mapped cahce
Therefore
A[i+2048] is again mapped starting from 0 onwards.
So the sequence is same above: miss, Hit,....
Number of missess= 1024/4=256
Number of Hits=768
Total number of ,isses=512
Number of Hits=1536

Add a comment
Know the answer?
Add Answer to:
Please help me out. Give me a detail explanation for this !!    ( repeat one...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider a memory hierarchy using one of the three organization for main memory shown in a...

    Consider a memory hierarchy using one of the three organization for main memory shown in a figure below. Assume that the cache block size is 32 words, That the width of organization b is 4 words, and that the number of banks in organization c is 2. If the main memory latency for a new access is 10 cycles, sending address time is 1 cycle and the transfer time is 1 cycle, What are the miss penalties for each of...

  • 1. A cache holds 64 words where each word is 4 bytes. Assume a 32 bit...

    1. A cache holds 64 words where each word is 4 bytes. Assume a 32 bit address. There are four different caches a. A direct-mapped cache with block size = 16 words b. 2-way set-associative cache with block size = 8 words c. 4-way set-associative cache with block size=4 words d. A fully associative cache with block size = 16 words. Complete the table for each cache. Cache a Cache be Cache Cache de 16 Number of bits needed for...

  • Assume you have: 32-bit addresses, 4KB Page size, 4MB Physical Memory Space, 4KB Cache with 4-way...

    Assume you have: 32-bit addresses, 4KB Page size, 4MB Physical Memory Space, 4KB Cache with 4-way set associative and LRU replacement, 32 Byte Cache block size, 4-entry fully associative TLB. A program to be run on this machine begins as follows:   double A[1024]; int i, j; double sum = 0; for( i = 0; i < 1024; i++ )       // first loop      A[i] = i; for( j = 0; j < 1024; j += 16 )   // second loop     ...

  • 6. (30) Consider a 64B direct-mapped cache with 16B blocks and 4 sets for an 8-bit architecture (...

    6. (30) Consider a 64B direct-mapped cache with 16B blocks and 4 sets for an 8-bit architecture (i.e., 256 bytes of memory): a. (5) Write a C function unsigned char getTag(unsigned char address) that returns the cache tag for the specified address using bitwise operators: b. (5) Write a C function unsigned char getSet(unsigned char address) that returns the cache set for the specified address using bitwise operators: c. (10) Considering the following sequence of memory addresses, which addresses will...

  • Please help me out with this question. it has two parts, work shown in detail is...

    Please help me out with this question. it has two parts, work shown in detail is required so i can understand it PartA PART B 5.2.3 You are asked to optimize a cache design for the given references. There are three direct-mapped cache designs possible, all with a total of 8 words of data: CI has 1-word blocks, C2 has 2-word blocks, and C3 has 4-word blocks. In terms of miss rate, which cache design is the best? If the...

  • 1 Overview The goal of this assignment is to help you understand caches better. You are...

    1 Overview The goal of this assignment is to help you understand caches better. You are required to write a cache simulator using the C programming language. The programs have to run on iLab machines. We are providing real program memory traces as input to your cache simulator. The format and structure of the memory traces are described below. We will not give you improperly formatted files. You can assume all your input files will be in proper format as...

  • 1. (4 pt) Circle True or False. Each is 2 pts. t Recently Used (LRU) replacement...

    1. (4 pt) Circle True or False. Each is 2 pts. t Recently Used (LRU) replacement policy generates better miss penalty than FIFO for fully- associative caches ngger b me rna 2. (8 pt) Find the Average Memory Access Time (AMAT) for a machine with following configuration: The machine has the hit rate of 95% with the hit time of 2 ns. A miss costs 30 ns to fetch the desired ume that the read and write miss penalties are...

  • Suppose we have a 32-bit MIPS processor, which includes a 2-way set associative data cache with...

    Suppose we have a 32-bit MIPS processor, which includes a 2-way set associative data cache with capacity 16384 bytes, 16 bytes block, and a least recently used (LRU) replacement policy. Assume that the cache is empty (all valid bits are 0) before the following code is executed. lw $t1, 0x1040($0) lw $t2, 0x2044($0) lw $t3, 0x3048($0) lw $t4, 0x1044($0) lw $t5, 0x504c($0) lw $t6, 0x3040($0) For each of the six assembly instructions above, state i) the set field value for...

  • A short program loop goes through a 16 kB array one word at a time, reads...

    A short program loop goes through a 16 kB array one word at a time, reads a number from the array, adds a random number, and stores the result in the corresponding entry in another array that is located in the memory immediately following the first array. An outer loop repeats the above operation 100 times. The 64-bit processor, operating at a clock frequency of 4 GHz, is pipelined, has 48 address lines, three levels of caches with a 64...

  • Question 9 Which of the following statements is true about memory system? Put the answer in...

    Question 9 Which of the following statements is true about memory system? Put the answer in the box. A. Cache memories are usually built by SRAMs, which have higher density and faster access speed than DRAM-based main memories. B. Secondary storages such as hard disk drive and solid-state drive are typically volatile memories. C. Compared to the associative cache mapping function, direct mapping function has more flexibility. D. Due to locality of reference, the basic transfer unit between cache and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT