Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A computer system contains a main memory of 32KB. It also has a 4KB cache divided into four-lines/set with 64B per line. Assume that the

A computer system contains a main memory of 32KB. It also has a 4KB cache divided into four-lines/set with 64B per line. Assume that the cache is initially empty. The processor fetches words from locations 0, 1, 2, . . ., 4351 in that order. It then repeats this fetch sequence nine more times. The cache is 10 times faster than main memory. Estimate the improvement resulting from the use of the cache. Assume an LRU policy for block replacement. Show the state of cache at the end.

Consider the following assembly code:
Instruction
Description
LD R1, 45(R2)
Read data from memory and store in R1. Memory address is calculated by adding 45 to the content of R5
ADD R7, R1, R5
Add contents of R1 and R5 and store to R7
SUB R8, R1, R7
Subtract content of R7 from content of R1 and save to R8
XOR R7, R8, R8
Logical Ex-OR between contents of R1 & R1. Store result to R9
BEZ R7, Target
Jump to Target if R7 is Zero
LD R5, 50(R2)
Read data from memory and store in R5. Memory address is calculated by adding 50 to the content of R2
LD R8, 45(R2)
Read data from memory and store in R8. Memory address is calculated by adding 45 to the content of R2
ADD R10, R8, R5
Add contents of R8 and R5 and store to R10
Target: AND R2, R3, R4
Logical AND between contents of R3 & R4. Store result to R2
ADD R10, R8, R2
Add contents of R2 and R8 and store to R10
END




a) Identify each type of data dependency; list the two instructions involved; identify which instruction is dependent

Step by Step Solution

3.50 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

Set 0 Set1 Set2 Set3 Set4 Set5 Set6 Set7 Set8 Set9 Set10 Set11 Set12 Set13 Set14 Set15 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 F... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Computer Engineering questions