B. You are given a MIPS machine with a single level of 2KiB direct-mapped cache with...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
B. You are given a MIPS machine with a single level of 2KiB direct-mapped cache with 512B cache blocks. It has 1MiB of physical address space. (12 points) The function foo is ran on the system with a cold cache and as the only process: #define ARRAY LEN 4096 hithit #define STEP_SIZE 64 // A starts at 0x10000 // B starts at Ox20000 foo( int* A, int* B) { int total = 0; Which wit for (int i = 0; i < ARRAY_LEN; i+= STEP_SIZE) { total += A[i]; total = B[i]; } iji. } Calculate the number of Tag, Index, and Offset bits for this cache. (6 points) Tag = 503 bits. Index= 9 bits offset bits 512 bits - Calculate the hit percentage for this cache after running foo. (2 points) 50% The cache is now cleared and the code is run again. This time, A and B are pointing to the same array, which starts at Ox10000. Calculate the new hit percentage. (2 points) Assume A and B starts once again at 0x10000 and 0x20000. What is the new hit percentage if we ran foo on a fully associative cache, with all other parameters staying the same? (2 points) fully associative cache: memory block could be mapped to any cache block 100% B. You are given a MIPS machine with a single level of 2KiB direct-mapped cache with 512B cache blocks. It has 1MiB of physical address space. (12 points) The function foo is ran on the system with a cold cache and as the only process: #define ARRAY LEN 4096 hithit #define STEP_SIZE 64 // A starts at 0x10000 // B starts at Ox20000 foo( int* A, int* B) { int total = 0; Which wit for (int i = 0; i < ARRAY_LEN; i+= STEP_SIZE) { total += A[i]; total = B[i]; } iji. } Calculate the number of Tag, Index, and Offset bits for this cache. (6 points) Tag = 503 bits. Index= 9 bits offset bits 512 bits - Calculate the hit percentage for this cache after running foo. (2 points) 50% The cache is now cleared and the code is run again. This time, A and B are pointing to the same array, which starts at Ox10000. Calculate the new hit percentage. (2 points) Assume A and B starts once again at 0x10000 and 0x20000. What is the new hit percentage if we ran foo on a fully associative cache, with all other parameters staying the same? (2 points) fully associative cache: memory block could be mapped to any cache block 100%
Expert Answer:
Answer rating: 100% (QA)
Lets go through the calculations step by step Calculate the number of Tag Index and Offset bits for ... View the full answer
Related Book For
Computer Organization and Design The Hardware Software Interface
ISBN: 978-0124077263
5th edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these computer network questions
-
Johnson City prepares its budget on the cash basis and prepares its external financial statements on the accrual basis. From the following data prepare statements of activity (income statements) on...
-
Read the mini-case on Rubio's, and answer the questions given. Rubio's is a fast food restaurant that specializes in fish tacos. Based out of Carlsbad, California, Rubio's has 180 locations, all of...
-
tell us about a product or service that has been a hit by changing the product's target or the company's position. And why do you think it worked
-
Repeat Problem 9136 using constant specific heats at room temperature.
-
Use the Rayleigh method to obtain an expression for the natural frequency of the system shown in Figure. The equilibrium position corresponds to x = 0. L2
-
The company is committed to ethical conduct and has no tolerance for fraud and unethical behavior. There are some concerns about abuses in your department. Do you know anything about the concerns I...
-
Kraft Unlimited, Inc., was organized and authorized to issue 5,000 shares of $100 par value, 9 percent preferred stock and 50,000 shares of no par, $5 stated value common stock on July 1, 2014....
-
Compare and contrast online transaction processing (OLTP) and online analytical processing (OLAP) databases.
-
Federal Semiconductors issued 11% bonds, dated January 1, with a face amount of $800 million on January 1, 2024. The bonds sold for $739,813,200 and mature on December 31, 2043 (20 years). For...
-
Derive an Equation for Magnetic Force F12 The magnetic force F12 cannot be determined from Coulomb's law because the pole strengths q* and q2* are not known. In the space below, derive an algebraic...
-
In general, traditional brick and mortar retail sales outperform online sales along the dimension of product variety. efficient funds transfer. product returns. order status tracking.
-
Seasonal inventory should be used when a company can rapidly change the rate of its production system at a very low cost. changing the rate of production is expensive (e.g. when workers must be hired...
-
Consider the data regarding Douglas Countys photocopying requirements below. The county administrator is trying to decide whether to replace the old equipment. Because of rapid changes in technology,...
-
The inventory held in case demand exceeds expectation in order to counter uncertainty is called cycle inventory. seasonal inventory. safety inventory. sourcing.
-
How is a significant reduction in fuel costs likely to affect global supply chain networks?
-
Does this article change your perception of Google as an employer? How? Do you want to work for Google? In some ways, who wouldnt? Sunny California, fabulous campus, free organic meals, perks galore...
-
A 20-cm-square vertical plate is heated to a temperature of 30oC and submerged in glycerin at 10oC. Calculate the heat lost from both sides of the plate.
-
Assume 185 and 122 are signed 8-bit decimal integers stored in sign-magnitude format. Calculate 185 + 122. Is there overflow, underflow, or neither?
-
When processor designers consider a possible improvement to the processor datapath, the decision usually depends on the cost/performance trade-off . In the following three problems, assume that we...
-
Consider two different implementations of the same instruction set architecture. Th e instructions can be divided into four classes according to their CPI (class A, B, C, and D). P1 with a clock rate...
-
Economy Appliance Co. manufactures lowprice, no-frills appliances that are in great demand for rental units. Pricing and cost information on Economys main products are as shown on page 943. Customers...
-
Grill Master Company sells total outdoor grilling solutions, providing gas and charcoal grills, accessories, and installation services for custom patio grilling stations. Instructions Respond to the...
-
Tablet Tailors sells tablet PCs combined with Internet service (Tablet Bundle A) that permits the tablet to connect to the Internet anywhere (set up a Wi-Fi hot spot). The price for the tablet and a...
Study smarter with the SolutionInn App