Question: Computer architecture ** please want a detailed answer**** Cache configurations. P the amount of physical memory C the size (capacity) of the cache B the

Computer architecture ** please want a detailed answer****

Cache configurations.

  • P the amount of physical memory
  • C the size (capacity) of the cache
  • B the block size, in bytes, of blocks within the cache
  • K the associativity of the cache
  • N the number of sets in the cache
  • t the number of tag bits
  • s the number of set bits
  • b the number of block offset bits

Conversions:

1MB = 1000 000 Bits.

1KB = 1000 Bits.

Calculation Example:

A computer uses 32-bit byte addressing (C) . The computer uses a 2-way associative (K) cache with a capacity (P) of 32KB. Each cache block contains 16 bytes (B). Calculate the number of bits in the TAG, SET, and OFFSET fields of a main memory address.

Answer

Since there are 16 bytes in a cache block, the OFFSET field must contain 4 bits (24 = 16). To determine the number of bits in the SET field, we need to determine the number of sets.

Each set contains 2 cache blocks (2-way associative) so a set contains 32 bytes (16 * 2).

There are 32KB bytes in the entire cache, so there are 32KB/32B = 32000/32=1K sets. Thus the set field contains 10 bits (210 = 1K).

Finally, the TAG field contains the remaining 18 bits (32 - 4 - 10). Thus a main memory address is decomposed as shown below.

18

10

4

TAG

SET

OFFSET

ASSIGNMENT: Calculate the number of bits in the TAG, SET, and OFFSET fields given the following values.

1) A computer uses 64KB (C) addressing. The computer uses a 8-way associative (K) cache with a capacity (P) of 4MB. Each cache block contains 128 bytes (B).

2) A computer uses 128KB (C) addressing. The computer uses a 2-way associative (K) cache with a capacity (P) of 64MB. Each cache block contains 32 bytes (B).

3) A computer uses 1MB (C) addressing. The computer uses a 16-way associative (K) cache with a capacity (P) of 128MB. Each cache block contains 64 bytes (B).

4) A computer uses 2MB (C) addressing. The computer uses a 8-way associative (K) cache with a capacity (P) of 16MB. Each cache block contains 512 bytes (B).

5) A computer uses 12KB(C) addressing. The computer uses a 3-way associative (K) cache with a capacity (P) of 512MB. Each cache block contains 16 bytes (B).

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 Databases Questions!