Question: 1 ) ( 4 2 pts ) In a hypothetical system with 1 0 2 4 bytes of main memory, 1 2 8 bytes of

1)(42 pts) In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte
size, with direct-map (S =1) placement policy and LRU replacement policy, answer each of the following
questions:
a)(3 pts) Determine the address fields for index, tag and block offset in the memory address.
b)(3 pts) How many sets are there in the cache?
c)(3 pts) How many blocks in the main memory are mapped to the same set of blocks in cache?
d)(3 pts) If associative (parallel) comparison is to be performed with all tags for identification, how
many XOR gates are required?
e) Determine the hit ratio in running each of the following program segments (each instruction occupies
a word): (briefly show your work)
i)(10 pts) a sequence of 100 consecutive instructions starting from address x148 with each
instruction executed once in order
ii)(10 pts) a loop of 32 consecutive instructions starting at location x148 and is iterated 20 times
iii)(10 pts) a loop of 64 consecutive instructions starting at location x148 and is iterated 20 times
2)(42 pts) Redo problem #1 if it is with a 2-way set associative placement policy (S =2).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!