

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Question 2: A processor uses split caches for storing instruction and data with the following characteristics.
Main memory size = 16MB, Instruction cache capacity = 4Kwords Data cache capacity= 16Kwords, Word size = 32bit, Block size = 4 words a. If instruction cache uses direct mapping and data cache uses 8 way set associative mapping. What would be the size of tag, set, line and word in bits for instruction and data cache? [10 Marks] Main Memory = 2s+w^ bytes = 2 24 bytes S+w = 24 1 word = 32 bits = 4 bytes 1 block size = 4 words = 16 bytes = 2^4 bytes =>w = 4 => Number of blocks = 2s+w^ /2 w^ = 2^20 S=
Size of Instruction cache = 4K words = 4K x 4 bytes = 16K bytes = 2^14 bytes =>No. of lines in I cache = 2 14 /2^4 = 2^10
Size of Data cache = 16K words = 16K x 4 bytes = 64K bytes = 2^16 bytes No. of lines in D cache = 2^16 /2 4 = 2 12 No. of sets in D cache = 2^12 /8 = 2 9
Instruction cache: Tag= 10, line = 10, w = 4
Data Cache: Tag = 11, set = 9, w = 4
b. Show the address mapping of the main memory address 1C7ADB for data cache? [6 Marks] Tag= 0x0E3, Set No. = 0x1AD, w = 0xB c. A particular program runs on a system with cache memory. The program makes a total of 250, memory references; 234,000 of these are to the cached locations. What is the hit ratio in this case? If the cache can be accessed in 2ns but the main memory requires 100ns for an access to take place, what is the average time required by this program for a memory access? [6 Marks] Hit rate = 234/250 = 0. Miss rate = 1 ā 0.936 = 0. Avg time= (0.936x2n) + (0.064x 102ns) = 8.4ns
Q2: In a certain computer memory system, even parity Hamming coding algorithm has been implemented to detect and correct the single bit error. A code word 1110110101101 is read from memory. [14 Marks]
Marks]
every step of your working, otherwise you will get no credit. [10 Marks]