A byte-addressable main memory has address size of 24 bits. For a 2-way-set-associative -mapped cache design,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A byte-addressable main memory has address size of 24 bits. For a 2-way-set-associative -mapped cache design, the following bits of the address are used to access the cache. Tag (13 bits) (i) What is the cache line size in bytes? Set (7 bits) Word (4 bits) Word bits, w = 4 bits Size of line = size of block = 2* bytes (ii) How many entries does the cache have? Set sub-field bits, d = 7 bits Number of sets in the cache, v = 2", and Number of lines in a set, k = 2 So, Number of lines in the cache, m = 27 * 2 = 28 = 256 (iii) What is the ratio between total bits required for such a cache implementation over the data storage bits? Bits required for cache implementation is tag sub-field bits. In this case the cache has 28 lines. Each line stores higher 13 bits as tag sub-field. So, total bits as tag = 28 * 13 Data storage bits number of lines * size of lines * 8 = 28 *24 * 8 = 212 *8 28 13 ratio between total bits required for such a cache implementation over the data storage bits = * 100% = 10.156% 212 8 Appropriate set number, i = jmod v; i = set number, j = block number, v = total number of sets Size of line = size of block =2* bytes = 16 byte Number of sets, v = 27 = 128 Starting from power on, the following byte-addressed cache references are recorded. Addresses: 0 4 32 64 128 256 512 1024 2014 0 4 32 (iv) How many blocks are replaced? Memory Address Set No. 1) Hit /Miss Ram Block No. () Consequence i = j mod 128 i = 0 mod 128 = 0 Address Ram Block 0 is copied into a line of set, i = 0 Miss Block size 16 i = 0 mod 128 = 0 CPU accesses set, i = 0, and reads the line containing block 0 4 Hit = 0 16 32 = 2 16 i = 2 mod 128 = 2 Ram Block 2 is copied into a line of set, i = 2 32 Miss i = 4 mod 128 = 4 64 = 4 16 Ram Block 4 is copied into a line of set, i = 4 64 Miss i = 8 mod 128 = 8 128 = 8 16 Ram Block 8 is copied into a line of set, i = 8 128 Miss 256 256 i = 16 mod 128 = 16 Mis Ram Block 16 is = 16 16 copied into a line of set, i = 16 512 512 i = 32 mod 128 = 32 Miss Ram Block 32 is = 32 16 copied into a line of set, i = 32 1024 1024 i = 64 mod 128 = 64 Miss Ram Block 64 is = 64 copied into a line of set, i = 64 16 = 125 mod 128 = 125 2014 = 125 16 Ram Block 125 is copied into a line of set, i = 125 2014 Miss i = 0 mod 128 = 0 CPU accesses set, i = 0, and reads the line containing block o Hit = 0 16 i = 0 mod 128 = 0 4 = 0 16 CPU accesses set, i = 0, and reads the line containing block 0 4 Hit i = 2 mod 128 = 2 32 = 2 16 32 Hit CPU accesses set, i = 2, and reads the line containing block 2 If we notice the "Consequence" column, we can see that all of the description indicates either "copied" or "reads". There is no incident of replacement. So, no blocks were replaced. (v) What is the hit ratio? 1 Hit Ratio =- = 12 4 = 33.33% 3 (vi) Show the state of cache memory at the end (the cache lines containing blocks of main memory) RAM Block, i = 0 Set number, i = 0 Set number, i = 1 RAM Block, - 2 Set number,i- 2 Set number, i = 3 RAM Block, j- 4 Set number, i- 4 RAM Block, j-8 Set number, i-8 RAM Block, j- 16 Set number, i- 16 RAM Block, - 32 Set number, i = 32 RAM Block, = 64 Set number, i- 64 RAM Block, 1 = 125 Set number, i- 125 Set number, i- 126 Set number, i- 127 A byte-addressable main memory has address size of 24 bits. For a 2-way-set-associative -mapped cache design, the following bits of the address are used to access the cache. Tag (13 bits) (i) What is the cache line size in bytes? Set (7 bits) Word (4 bits) Word bits, w = 4 bits Size of line = size of block = 2* bytes (ii) How many entries does the cache have? Set sub-field bits, d = 7 bits Number of sets in the cache, v = 2", and Number of lines in a set, k = 2 So, Number of lines in the cache, m = 27 * 2 = 28 = 256 (iii) What is the ratio between total bits required for such a cache implementation over the data storage bits? Bits required for cache implementation is tag sub-field bits. In this case the cache has 28 lines. Each line stores higher 13 bits as tag sub-field. So, total bits as tag = 28 * 13 Data storage bits number of lines * size of lines * 8 = 28 *24 * 8 = 212 *8 28 13 ratio between total bits required for such a cache implementation over the data storage bits = * 100% = 10.156% 212 8 Appropriate set number, i = jmod v; i = set number, j = block number, v = total number of sets Size of line = size of block =2* bytes = 16 byte Number of sets, v = 27 = 128 Starting from power on, the following byte-addressed cache references are recorded. Addresses: 0 4 32 64 128 256 512 1024 2014 0 4 32 (iv) How many blocks are replaced? Memory Address Set No. 1) Hit /Miss Ram Block No. () Consequence i = j mod 128 i = 0 mod 128 = 0 Address Ram Block 0 is copied into a line of set, i = 0 Miss Block size 16 i = 0 mod 128 = 0 CPU accesses set, i = 0, and reads the line containing block 0 4 Hit = 0 16 32 = 2 16 i = 2 mod 128 = 2 Ram Block 2 is copied into a line of set, i = 2 32 Miss i = 4 mod 128 = 4 64 = 4 16 Ram Block 4 is copied into a line of set, i = 4 64 Miss i = 8 mod 128 = 8 128 = 8 16 Ram Block 8 is copied into a line of set, i = 8 128 Miss 256 256 i = 16 mod 128 = 16 Mis Ram Block 16 is = 16 16 copied into a line of set, i = 16 512 512 i = 32 mod 128 = 32 Miss Ram Block 32 is = 32 16 copied into a line of set, i = 32 1024 1024 i = 64 mod 128 = 64 Miss Ram Block 64 is = 64 copied into a line of set, i = 64 16 = 125 mod 128 = 125 2014 = 125 16 Ram Block 125 is copied into a line of set, i = 125 2014 Miss i = 0 mod 128 = 0 CPU accesses set, i = 0, and reads the line containing block o Hit = 0 16 i = 0 mod 128 = 0 4 = 0 16 CPU accesses set, i = 0, and reads the line containing block 0 4 Hit i = 2 mod 128 = 2 32 = 2 16 32 Hit CPU accesses set, i = 2, and reads the line containing block 2 If we notice the "Consequence" column, we can see that all of the description indicates either "copied" or "reads". There is no incident of replacement. So, no blocks were replaced. (v) What is the hit ratio? 1 Hit Ratio =- = 12 4 = 33.33% 3 (vi) Show the state of cache memory at the end (the cache lines containing blocks of main memory) RAM Block, i = 0 Set number, i = 0 Set number, i = 1 RAM Block, - 2 Set number,i- 2 Set number, i = 3 RAM Block, j- 4 Set number, i- 4 RAM Block, j-8 Set number, i-8 RAM Block, j- 16 Set number, i- 16 RAM Block, - 32 Set number, i = 32 RAM Block, = 64 Set number, i- 64 RAM Block, 1 = 125 Set number, i- 125 Set number, i- 126 Set number, i- 127
Expert Answer:
Answer rating: 100% (QA)
i Word bits in the address is used to select a particular byte in a cache line 4 bits are used for ... View the full answer
Related Book For
Posted Date:
Students also viewed these computer engineering questions
-
Consider a machine with a byte addressable main memory of 216 bytes and block size of 8 bytes. Assume that a direct mapped cache consisting of 32 lines is used with this machine. a. How is a 16-bit...
-
Given the following Z-matrix (where the semicolons are used to denote the end of a row), draw a Newman projection of the molecule. C1; C2 1 1.5; F3 1 1.4 2 109.5; Cl4 2 1.8 1 120.0 3 0.0; H5 1 1.1 2...
-
How many bytes are required to encode n bits of data where n equals? a) 7? b) 17? c) 1001? d) 28,800?
-
In practice, bar charts are used occasionally to summarize a numerical variable over time, which can be handy. The bar chart below shows the inflation rate based on the Consumer Price Index in India....
-
Vail Resorts tracks the proportion of seasonal employees who are rehired each season. Rehiring a seasonal employee is beneficial in many ways, including lowering the costs incurred during the hiring...
-
A close friend of yours, who is a history major and who has not had any college courses or any experience in business, is receiving the financial statements from companies in which he has minor...
-
Why is it sometimes necessary to serve a subpoena for production of documents?
-
Queensland Electronics Company manufactures two large-screen television models, the Novelle, which has been produced for 10 years and sells for $910, and the Zodiac, a new model introduced in early...
-
K ces Saved Problem 18-1 Repair calls are handled by one repairman at a photocopy shop. Repair time, including travel time, is exponentially distributed, with a mean of two hours per call. Requests...
-
1). When you are framing the questions you will use data analytics to answer, what is the key to how you frame your questions? Select an answer: A. Keep your questions focused and actionable. B. Keep...
-
BestCalls has a special plan offer this month. There is a $4.00 per month charge each month and calls anywhere in the United States are $0.03 per minute. What would the monthly cost be if you...
-
2) may have Freudeinstein equation with respect to time and get kiu siu thi sinh (04-0) sin (04-02) Two of our can be A a A 4-bar mechanism is Position 1 a Position 2 velocity at one of the given...
-
A 3.5-carat diamond is grown under a high pressure of 58 x 10 N/m. One carat equals 0.200 g. Use 3.52 g/cm for the density of diamond and 4.43 x 101 N/m for the bulk modulus of diamond. What is the...
-
Bridgeway Company manufactures printers and keyboards. The contribution margins of each printer and keyboard is $ 3 0 and $ 2 0 , respectively. Two types of skilled labor are required to manufacture...
-
Average daily insolation in Phoenix is 5.38 kWh/m2/day. Given this daily energy input, how much land area would you need (in square miles) to generate all of Arizona's daily electricity from the...
-
A bridge pier is supported on a shallow foundation as shown. The total vertical force, including self-weight of the pier and footing is 2000 kN. The lateral forces are 85 and 50 kN. The footing has...
-
Clear Channel and CBS Radio were both far too large to accomplish the reverse Morris Trust structure, but they could have bid for the ABC Radio assets with cash. Suppose that Disney had sold the...
-
For the given transfer function: Vo(s) / Vi(s) = (s^2C^2R^2 + 1) / (s^2C^2R^2 + 4sCR + 1) Assumiing that 1/(CR) = 120 PI so write the matlab code to find the magnitude plot
-
Give the possible values of the total-angular-momentum quantum number J that result from the addition of angular momenta with quantum numbers a. 3/2 and 4; b. 2, 3, and 1/2.
-
Find the n = 2 to n = 1 energy-level population ratio for a gas of hydrogen atoms at (a) 25C; (b) 1000 K; (c) 10000 K.
-
(a) Write a computer program that will perform the helium-atom SCF calculation of Section 14.3. Have the input to the program be 1, 2, and the initial guess for c11/c21. Do not use the Section 14.3...
-
When a predecessor auditor reissues the report on the prior period's financial statements at the request of the former client, the predecessor auditor should a. Indicate the introductory paragraph of...
-
When audited financial statements are presented in a client's document containing other information, the auditor should a. Perform inquiry and analytical procedures to ascertain whether the other...
-
Which of the following events occurring after the issuance of an auditor's report most likely would cause the auditor to make further inquiries about the previously issued financial statements? a. A...
Study smarter with the SolutionInn App