Question

In: Computer Science

2. Caches are commonly implemented in SRAM, and the cache layout impacts the total amount of...

2. Caches are commonly implemented in SRAM, and the cache layout impacts
the total amount of SRAM required to implement the cache. For the following
two problems, assume the caches are byte addressable and addresses and
data words are both 32 bits.


a. How many total bits are required to implement a 128 KiB direct-mapped
cache with 4-word blocks? [25 points]


b. How many total bits are required to implement a 128 KiB direct-mapped
cache with 32-word blocks? [25 points]

Solutions

Expert Solution

1.

The number of bits in cache= 2n x (block size + tag size + valid field size)

  • Cache size is 2n blocks
  • Block size is 2m words (2m+2 words)
  • Size of tag field 32 – (n + m + 2)

Therefore,

2n x (2m x 32 + 32 – (n + m + 2) + 1)

= 2n x (2m x 32 + 31 – n - m)

in the given question,

   Cache size = 128 KB = 217 bytes = 215 words = 213 blocks

Cache entry size = block data bits + tag bits + valid bit

                   = 128 + (32 – 13 – 2 – 2) + 1 = 144 bits

Therefore, cache size = 213´ 144 bits = 213´ (1.25 ´ 128) bits = 1.25 ´ 220 bits = 1.25 Mbits

2.

Cache size = 128 KB = 217 bytes = 215 words = 213 blocks

Cache entry size = block data bits + tag bits + valid bit

                   = 128 + (32 – 10 – 2 – 2) + 1 = 147 bits

Therefore, cache size = 213´ 147 bits


Related Solutions

1) Calculate the cache hit ratio assuming that the total number of requests is 2,056 and...
1) Calculate the cache hit ratio assuming that the total number of requests is 2,056 and 647 of those requests are found in the cache. 2) Draw a figure of dead lock with three processes and three resources. 3) the operating system provides an interface between application programs and the computer hardware. Discuss the process of the execution of any application program on the hardware using all managers of the operating system. 4) The operating system offers a graphical vs...
What are the negative impacts of business intelligence in Healthcare? What is one commonly used software...
What are the negative impacts of business intelligence in Healthcare? What is one commonly used software tool related to Healthcare? Briefly address the issue of information security for HealthCare?
Suppose we have a direct-mapped cache that can hold a total of 1024 blocks with 4...
Suppose we have a direct-mapped cache that can hold a total of 1024 blocks with 4 words per block. Compute the block index, block offset, and the tag for the following addresses: (a) 0x11001001 (b) 0x00010014 (c) 0x01000004 (d) 0x01001018 (e) 0x7bdcca10
1. ____ is the ratio of total loan amount by the total value of the property....
1. ____ is the ratio of total loan amount by the total value of the property. Select one: a. housing-to-income-ratio b. loan-to-value ratio c. debt-to-income ratio d. liability-to-market value ratio 2. The five C s of credit stands for: Select one: a. capacity, character, conditions, collateral, and capital. b. capability, cooperation, creativity, collateral, and capital. c. conditions, competence, capital, conditions, and capacity. d. cooperation, capacity, collateral, creativity, and conditions. 3. Non-depository institutions that lend funds to individuals to finance consumer...
1. What are potential impacts impacts of provison of personal supporton older people? 2. What are...
1. What are potential impacts impacts of provison of personal supporton older people? 2. What are 2 potential risks associated with aging? 3. what are 2 potential risks when providing personal support to an older person? 4. when working with older people what is a potential risk during technical support activities? 5. strategy for maximising engagement of older people?
The coefficient of variation considers how an investment impacts the total risk of the firm, while...
The coefficient of variation considers how an investment impacts the total risk of the firm, while the coefficient of correlation considers the specific risk of an investment.
explain the relationship between the proce elasticity of demand and total revenue. what are the impacts...
explain the relationship between the proce elasticity of demand and total revenue. what are the impacts of various forms of elasticities (elastic, inelastic, unit elastic, etc.) on business decisions and atrategies to maximaize profit? explain your reaponses using empirical examples, formulas and graphs.
Discuss how not adjusting the AMT exemption amount for inflation impacts the taxes paid by taxpayers...
Discuss how not adjusting the AMT exemption amount for inflation impacts the taxes paid by taxpayers potentially subject to the AMT tax. Give an Example
1. What does the term transparent mean when applied to a memory cache? 2. Do the...
1. What does the term transparent mean when applied to a memory cache? 2. Do the terms fetch-execute and fetch-store refer to the same concept? Explain.
1. Describe the purpose of some components in Internal Memory of a computer. 2.  how Cache Memory...
1. Describe the purpose of some components in Internal Memory of a computer. 2.  how Cache Memory functions
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT