Beginning from power on the following byteaddressed cache re

Beginning from power on, the following byte-addressed cache references are recorded.

For EACH reference, list (1) its tag, index, and offset, (2) whether it is a hit or a miss, and (3) which bytes were replaced (if any).

Address
Hex 00 04 10 84 E8 A0 400 1E 8C C1C 84 884
Dec 0 4 16 132 232 160 1024 30 140 3100 180 2180

Solution

If the cache block been searched by the CPU is matched with an existing block in the cache, it is called a cache hit. But if the CPU cannot locate the cache block, it’s a cache miss.

After a successful hit if a particular cache block is called again it becomes a technical cache miss, as the block is then replaced.

The following table shows the cache block replacement occurs in this case.

The sequence of 32-bit memory references is shown as:

  0, 4, 16, 132, 232, 160, 1024, 30, 140, 3100, 180, 2180:

Address Reference

Binary Address

Hit / Miss

Assigned cache block

Replaced Bytes.

0

000000000000

Miss

0000

NO

4

000000000100

Hit

0100

NO

16

000000010000

Miss

0000

NO

132

000010000100

Miss

0100

NO

232

000011101000

Miss

1000

NO

160

000010100000

Miss

0000

NO

1024

010000000000

Miss

0000

YES

30

000000011110

Hit

1110

NO

140

000010001100

Hit

1100

NO

3100

110000011100

Miss

1100

YES

180

000010110100

Miss

0100

NO

2180

100010000100

Miss

0100

YES

The table shows that the Number of replaced blocks is 3.

Index

0000

0001

0010

0011

0100

0101

0110

0111

Contents

M(160)

M(2180)

M(140)

Address Reference

Binary Address

Hit / Miss

Assigned cache block

Replaced Bytes.

0

000000000000

Miss

0000

NO

4

000000000100

Hit

0100

NO

16

000000010000

Miss

0000

NO

132

000010000100

Miss

0100

NO

232

000011101000

Miss

1000

NO

160

000010100000

Miss

0000

NO

1024

010000000000

Miss

0000

YES

30

000000011110

Hit

1110

NO

140

000010001100

Hit

1100

NO

3100

110000011100

Miss

1100

YES

180

000010110100

Miss

0100

NO

2180

100010000100

Miss

0100

YES

Beginning from power on, the following byte-addressed cache references are recorded. For EACH reference, list (1) its tag, index, and offset, (2) whether it is
Beginning from power on, the following byte-addressed cache references are recorded. For EACH reference, list (1) its tag, index, and offset, (2) whether it is
Beginning from power on, the following byte-addressed cache references are recorded. For EACH reference, list (1) its tag, index, and offset, (2) whether it is
Beginning from power on, the following byte-addressed cache references are recorded. For EACH reference, list (1) its tag, index, and offset, (2) whether it is

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site