Given a MIPS processor with a direct-mapped data cache. On this processor the following code is running: sum = 0; for (i=0; i<4; i++) sum = sum + A) + A[i+2); 'A' is an array of (32-bit) integers, word-aligned in memory. All other variables used in this program are already located in registers. What is the data cache hit-rate (in number of percents) for this program, assuming that the cache has a block size of 1 word? Answer:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Given a MIPS processor with a direct-mapped data cache. On this processor the following code is running:
sum = 0;
for (i=0; i<4; i++)
sum = sum + A[i) + A[i+2];
'A' is an array of (32-bit) integers, word-aligned in memory. All other variables used in this program are already located in registers.
What is the data cache hit-rate (in number of percents) for this program, assuming that the cache has a block size of 1 word?
Answer:
Transcribed Image Text:Given a MIPS processor with a direct-mapped data cache. On this processor the following code is running: sum = 0; for (i=0; i<4; i++) sum = sum + A[i) + A[i+2]; 'A' is an array of (32-bit) integers, word-aligned in memory. All other variables used in this program are already located in registers. What is the data cache hit-rate (in number of percents) for this program, assuming that the cache has a block size of 1 word? Answer:
A data cache is indexed with a 8-bits inciex, tag size is 24 bits. Each cache block contains a tag, a block of words, 1 dirty bit, 1 valid bit; each word contains 4 bytes. The address size is 36 bits, and the
memory is byte addressable.
8) The cache is drect mapped.
Compute for yourself how many words are stored in one data block.
a) What is the total cache size (in bits)? Write the total cache size into the arswer line (without decimal sign ".").
Answer:
A direct mapped cache has the fallowing metrics for a program execution:
D-cache miss rate = 5%
I-cache miss rate 4%
Miss penalty = 200 cycles
Base CPI (ideal cache) = 5.0
The D-cache misses are caused only by the Load and Store instructions. These instructions are only 20% of total amount of instructions.
Caiculate the actual CPI, then compute and write down how much faster is the ideal processor with 5.0 CPL.
Answer:
Consider a cache which is able to store 2048 bytes of memory data. To what cache block (entry) does the address 400 map, if this cache has 2-word blocks and is direct mapped?
Answer:
A direct mapped cache has the following metrics for a program execution:
D-cache miss rate = 4%
l-cache miss rate = 6%
Miss penalty = 200 cycles
Base CPI (ideal cache) = 4.0
The D-cache misses are caused only by the Load and Store instructions. These instructions are only 40% of total amount of instructions.
Calculate the actual CPI, then compute (and write down) how much faster is the ideal processor with 4.0 CPI.
(In yaur answer, use decimal point for nan-integer numbers).
Answer:
Transcribed Image Text:A data cache is indexed with a 8-bits inciex, tag size is 24 bits. Each cache block contains a tag, a block of words, 1 dirty bit, 1 valid bit; each word contains 4 bytes. The address size is 36 bits, and the memory is byte addressable. 8) The cache is drect mapped. Compute for yourself how many words are stored in one data block. a) What is the total cache size (in bits)? Write the total cache size into the arswer line (without decimal sign "."). Answer: A direct mapped cache has the fallowing metrics for a program execution: D-cache miss rate = 5% I-cache miss rate 4% Miss penalty = 200 cycles Base CPI (ideal cache) = 5.0 The D-cache misses are caused only by the Load and Store instructions. These instructions are only 20% of total amount of instructions. Caiculate the actual CPI, then compute and write down how much faster is the ideal processor with 5.0 CPL. Answer: Consider a cache which is able to store 2048 bytes of memory data. To what cache block (entry) does the address 400 map, if this cache has 2-word blocks and is direct mapped? Answer: A direct mapped cache has the following metrics for a program execution: D-cache miss rate = 4% l-cache miss rate = 6% Miss penalty = 200 cycles Base CPI (ideal cache) = 4.0 The D-cache misses are caused only by the Load and Store instructions. These instructions are only 40% of total amount of instructions. Calculate the actual CPI, then compute (and write down) how much faster is the ideal processor with 4.0 CPI. (In yaur answer, use decimal point for nan-integer numbers). Answer:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY