Question

In: Electrical Engineering

In set-associative mapping, why when having the choice to replace of which cache line to replace...

In set-associative mapping, why when having the choice to replace of which cache line to replace do we choose the ones with D=0?

Solutions

Expert Solution

Ans: The question is if one fetches cache line from the memory so where should it be placed?

Well it depends on the type of mapping for example

  1. In a fully associative system, a new line can be placed at any location in the cache.
  2. In a direct-mapped system, each cache line has a unique location.
  3. Another system called n-way set associative, each cache line can be placed on any of the n locations. For example, for a 2-way system each cache line can be placed on one of the two assigned locations.

Now the main question is if we have 2 or more option for placement of cache line in n-way and fully associative system. We must able to decide which line should be replaced.

To achieve this objective the common scheme used is named as least recently used (LRU) i.e. least used line will be evicted or replaced.

The cache has the relative order in which blocks are used so far.

For example, we have to place line 3 and for its replacement suppose we have two locations 0 and 2. If location 0 is used recently the line 2 will be replaced with line 3.


Related Solutions

Consider a 4-way set-associative cache, 4 rows, a line size of 128 bytes and a write-back...
Consider a 4-way set-associative cache, 4 rows, a line size of 128 bytes and a write-back policy. The following requests are made to memory: Load: 0b0011111001000101 Load: 0b1000111110110100 Load: 0b0110101111110100 Store: 0b0010110000000110 Store: 0b1111001001110101 Store: 0b1110000111000001 Load: 0b0000000010100110 Load: 0b0101001001001101 Assuming the machine is in cold-start, profile the contents to the cache after all of the requests have been made. State any assumption you make (if needed).
11. (12 pts) Consider a system with 32-bit addresses and a 16KB 8-way set-associative cache. Each...
11. (12 pts) Consider a system with 32-bit addresses and a 16KB 8-way set-associative cache. Each cache line contains 64 bytes. (a) How many bits of an address are used for the offset in this cache? (b) How many bits of an address are used for the index in this cache? (c) How many bits of an address are used in the tag for this cache? (d) What is the value of the tag for 0x000d6ae2? (e) What is the...
Why do you have to do staging and mapping when designing a data warehouse? Describe both...
Why do you have to do staging and mapping when designing a data warehouse? Describe both processes of staging and mapping. Discuss the considerations that you can take into account when deciding whether to use a staging area, or not, for the source data.
1 Which of the following is an advantage of having a single set of accounting standards...
1 Which of the following is an advantage of having a single set of accounting standards used worldwide? A. Reduced accounting costs for multinational corporations B. Increased power of the FASB C. Reduced number of multinational corporations on the NYSE D. Increased diversity of accounting methods used by multinational corporations 2 The accounting standards in code law countries tend to be: A. very detailed. B. formulated by organizations such as the FASB. C. stated generally without much guidance on accounting...
One student going into the test which is set in multiple choice (A, B, C, D)....
One student going into the test which is set in multiple choice (A, B, C, D). The test consist of 5 question. But he is not study at all. He decide to get ‘’A” for each of the question. There will be no penalty for incorrect answer. What is the probability he will passes the test (He get at least 3 question correctly)?
Which of the following are valid relationships in set theory? Explain why or why not.            ...
Which of the following are valid relationships in set theory? Explain why or why not.             (a)        (A or B or C)' = A' or B' or C'             (b)       A or B or C = A or (A' and B) or [[A or (A' and B)]' and C]             (c)       (A or B) and (A' or B') = (A and B') or (A' and B) or (A' and B and C') (d)       (A and B) or (A and...
Which of the following statements best describes a promoter? (multiple choice) 1.A set of adjacent structural...
Which of the following statements best describes a promoter? (multiple choice) 1.A set of adjacent structural genes and the operator gene that controls them. 2.A portion of a gene, which is transcribed into RNA, but not translated into protein. 3.A sequence of nucleotides coding for a single gene product that is transcribed into mRNA. 4.The section of DNA to which RNAP first attaches itself to when initiating the transcription of a structural gene. 5.A protein that blocks gene action with...
Which of these systems needs to be treated as a transmission line system and why?
(Pre-Lab) Which of these systems needs to be treated as a transmission line system and why? Justify your answer quantitatively. Indicate any assumptions that you are making. (a) Integrated circuit at high frequencies (500 MHz - 1 GHz) (b) Electrical lines running through your house (c) Electrical lines connecting cities separated by hundreds of kilometers (d) VHF antenna that leads from a rabbit ear antenna to your television  
What would be the benefit of having a limiting reagent when performing a lab experiment? Why...
What would be the benefit of having a limiting reagent when performing a lab experiment? Why not simply make both reactants go to completion?
Multiple Choice Questions 1. Which of the following accounts (items) would not be affected when an...
Multiple Choice Questions 1. Which of the following accounts (items) would not be affected when an employer records a wage expense? A. Social Security Taxes Payable (on behalf of employee) B. Federal Unemployment Taxes Payable C. State & Federal income-tax withholdings on behalf of the employees D. Medicare Taxes Payable (on behalf of employee) 2. Which of the following would be an example of an investing cash flow? A. Cash received from the sale of stock B. Cash paid to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT