View the step-by-step solution to:

# This question explores the problem of thrashing in different types of cache.

Can you help me with this assignment please:

This question explores the problem of thrashing in different types of cache. Consider a system of 16Kbytes of byte-addressable main memory partitioned into blocks of 128bytes each. The system has cache of size 2Kbytes. The main memory blocks are being accessed in the following order: 2, 4, 18, 2, 6, 18, 2, 6, 18, 2 (the numbers are in decimal). Assuming the cache is empty at the start.

1. Complete the following information:
 Information Value Reason Block size: Number of cache blocks: Memory address length

1. Scenario 1: The system uses directly mapped cache.

1.  How is the memory address to be interpreted?
 Address field Value Reason Word field length: Block field length: Tag field length:

1.  Show whether each memory block access is a hit or a miss. Then compute the hit ratio.
 Memory block Address Tag field Address Block field Address Word field Maps to cache block Hit/Miss 2 xxxxxxx 4 xxxxxxx 18 xxxxxxx 2 xxxxxxx 6 xxxxxxx 18 xxxxxxx 2 xxxxxxx 6 xxxxxxx 18 xxxxxxx 2 xxxxxxx Total

1. Scenario 2: The system uses fully associative cache and first-in-first-out replacement policy.

1. How is the memory address to be interpreted?
 Address field Value Reason Word field length: Tag field length:

1. Show whether each memory block access is a hit or a miss. Then compute the hit ratio.

 Memory block Address Tag field Address Word field Maps to cache block Hit/Miss 2 xxxxxxx 4 xxxxxxx 18 xxxxxxx 2 xxxxxxx 6 xxxxxxx 18 xxxxxxx 2 xxxxxxx 6 xxxxxxx 18 xxxxxxx 2 xxxxxxx Total

1. The system uses 2-way set associative cache and first-in-first-out replacement policy.
1.  How is the memory address to be interpreted?
 Address field Value Reason Word field length: Set field length: Tag field length:

1. Show whether each memory block access is a hit or a miss. Then compute the hit ratio.
 Memory block Address Tag field Address Set field Address Word field Maps to cache Hit/Miss set block 2 xxxxxxx 4 xxxxxxx 18 xxxxxxx 2 xxxxxxx 6 xxxxxxx 18 xxxxxxx 2 xxxxxxx 6 xxxxxxx 18 xxxxxxx 2 xxxxxxx Total

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents