Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CSE 490/590 Quiz 2 – V2|Answered 100% Updated 2025/26., Quizzes of Computer Science

CSE 490/590 Quiz 2 – V2|Answered 100% Updated 2025/26.

Typology: Quizzes

2024/2025

Available from 07/11/2025

dennis-mburu
dennis-mburu 🇺🇸

100 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 490/590 – Quiz 2 – February 28, 2025 – V2
Instructions:
1. This Quiz is closed book and closed notes.
2. You may have pens, pencils, erasers, a calculator, and a water bottle/drink.
3. Electronic devices are NOT ALLOWED during this Quiz, with the exception of a
calculator. You shall NOT share a calculator with others during the Quiz.
4. Place your student ID card on your desk for us to review.
5. When you are finished, remain in your seat and raise your hand and we will come and
collect your Quiz. You must not talk to anyone in the room until your Quiz has been
collected, and you have left the room.
6. Any form of cheating/academic integrity violation, including (but not limited to)
violation of the rules above will result in an automatic 0 for the Quiz.
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: ________________________________________
STOP!! PLEASE DO NOT START THE QUIZ
UNTIL YOU ARE TOLD TO DO SO
FOR GRADERS ONLY:
Total: _____________50 points
Q1: ___________6 points
Q2: ___________6 points
Q3: ___________6 points
Q4: ___________10 points
Q5: ___________10 points
Q6: ___________12 points
pf3
pf4
pf5

Partial preview of the text

Download CSE 490/590 Quiz 2 – V2|Answered 100% Updated 2025/26. and more Quizzes Computer Science in PDF only on Docsity!

CSE 490/590 – Quiz 2 – February 28, 2025 – V

Instructions:

  1. This Quiz is closed book and closed notes.
  2. You may have pens, pencils, erasers, a calculator, and a water bottle/drink.
  3. Electronic devices are NOT ALLOWED during this Quiz, with the exception of a calculator. You shall NOT share a calculator with others during the Quiz.
  4. Place your student ID card on your desk for us to review.
  5. When you are finished, remain in your seat and raise your hand and we will come and collect your Quiz. You must not talk to anyone in the room until your Quiz has been collected, and you have left the room.
  6. Any form of cheating/academic integrity violation, including (but not limited to) violation of the rules above will result in an automatic 0 for the Quiz.

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: ________________________________________

STOP!! PLEASE DO NOT START THE QUIZ

UNTIL YOU ARE TOLD TO DO SO

FOR GRADERS ONLY:

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%