



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
CSE 490/590 Quiz 2 – V2|Answered 100% Updated 2025/26.
Typology: Quizzes
1 / 5
This page cannot be seen from the preview
Don't miss anything!
CSE 490/590 – Quiz 2 – February 28, 2025 – V
Instructions:
Please fill your name in the blank and sign the statement below:
I, ________________________________________________________________,
have read, and acknowledge that I will adhere to the instructions above and if not followed, I will
accept the penalty given by the instructor.
Signature: ________________________________________
Total: _____________50 points
Q1: ___________6 points
Q2: ___________6 points
Q3: ___________6 points
Q4: ___________10 points
Q5: ___________10 points
Q6: ___________12 points
[Question 1] (6 Points)
Consider the following list of instructions. Assume that the initial values for $s1, $s2 and $s3 are all 10:
loop: addi $s1, $s1, - sub $s2, $s2, $s sub $s3, $s3, $s addi $s3, $s3, - bne $s3, $s1, loop
Assume that we have a 1-bit branch predictor that stores the result of the last branch and makes the prediction based on the result. Show the results of all predictions throughout the execution. (Use T/N to represent Taken/Not Taken)
Branch Prediction (T/N) Actual (T/N)
1st bne N
[Question 4] [10 Points]
Assuming 32-bit memory addresses, how many bits are associated with the tag, index, and offset of the following configurations for a byte-addressable direct mapped cache?
a. 32 blocks, 8 bytes per block
b. 16 blocks, 4 bytes per block
[Question 5] (10 Points)
A processor with Instruction cache miss rate of 3% and Data cache miss rate of 5% and costs 10 cycles on a cache miss (miss penalty). 50% of the instructions to be executed are Load and Store instructions. The CPI with ideal cache (no misses) is 3.
a. Compute the actual CPI
b. Consider the datapath was improved so that the CPI can be reduced from 3 to 2 (all the other specs remain the same). Compute the actual CPI and compare it with (a).
[Question 6] (12 Points)
a) Consider a direct-mapped cache of size 4 Bytes. Each block in the cache can hold only 1 word (here 1 word = 1 Byte). Fill in the missing cache blocks at each step according to the address reference, and specify whether it is a hit or a miss. The first step has been done for you. Address references are (in order): 4, 5, 3, 4, 0, 5
Address: 4 5 3 4
hit miss hit miss hit miss hit miss
Address: 0 5
hit miss hit miss
b) Calculate the miss rate for the above (Part a.)
Tag Cache Content 01 Mem(4)
Tag Cache Content
Tag Cache Content
Tag Cache Content
Tag Cache Content
Tag Cache Content
Mem( 4 ) Mem( 5 )
Mem( 4 ) Mem( 5 )
Mem( 3 )
Mem( 4 ) Mem( 5 )
Mem( 3 )
Mem( 0 ) Mem( 5 )
Mem( 3 )
Mem( 0 ) Mem( 5 )
Mem( 3 )
Miss rate = (Total misses)/(Total references) = 4/ = 0.67 or 67%