Question

In: Computer Science

Answer the following questions about cache coherency protocols in a dual-processor system. a) If each processor...

Answer the following questions about cache coherency protocols in a dual-processor system.

a) If each processor has a separate cache, what is the main advantage of the 4-state MESI snoopy cache coherency protocol compared to a snoopy cache coherency protocol that uses only 3 states M, S and I (modified, shared and invalid)?

b) Suppose that processor P1 (in a dual-processor system) writes to a memory block. A copy of this same memory block is already in a modified line within the local cache of processor P2. What action should be taken for the modified line within P2’s cache? Explain your answer.

c) Assume that the 3-state MSI cache coherency protocol is used with a single 2-way set associative cache containing a total of 1048576 lines each of which is 512 bytes in size. What is the minimum total number of MSI state bits needed for the entire cache?

Solutions

Expert Solution

a)

MSI refers to Modified Shared Invalid whereas MESI refers to Modified Exclusive Shared Invalid. The difference between the two protocols is that MESI protocol adds an exclusive state. The exclusive helps in saving a useless bus request.

Suppose processor 'A' has a block that is to be read & then written to and no other processor has the said block. According to MSI protocol, two bus transaction will be made by processor 'A':

1. Request to read the block.

2. Request to write to the said block.

The second request is pointless because only processor A's cache has the said block and no request needs to be made to write to other processor's caches as they don't have it.

This is where MESI protocol comes in, it overcomes this situation by adding an exclusive state and prevents the second bus transaction from being made. Processor 'A' will follow MESI protocol and it will enter exclusive state because it is the only processor said block and as the only working processor on the said task, it will have exclusive access and won't need to make second bus transaction.

b)

No action should be taken for the modified line within P2’s cache and it should remain the Modified state as it needs to be written back to the memory block and it is only possible in either Modified or Exclusive state and Exclusive state isn't possible as the processor P1 has it as well. After the write back, the line is change to Shared state. Therefore:

-State remains same i.e. Modified. and,

-is written to the memory block in future.

c)

Total no. of lines = 1048576

Size of 1 line = 512 bytes


Related Solutions

About the Female Reproductive System and development. answer the following questions: Briefly describe the development of...
About the Female Reproductive System and development. answer the following questions: Briefly describe the development of an egg, oogenesis, in the female reproductive system including the various hormones involved in the process. This may take 5-6 sentences to properly cover the main parts. What is the role of estrogen and progesterone in the development and ovulation of a secondary oocyte? On average, a woman's cycle occurs every 28 days. Describe and differentiate what is happening during the proliferative phase and...
Answer each of the following questions about demand and consumer surplus a. What is consumer surplus,...
Answer each of the following questions about demand and consumer surplus a. What is consumer surplus, and how is it measured? b. What is the relationship between the demand curve and the willingness to pay? c. Other things equal, what happens to consumer surplus if the price of a good falls? Why? Illustrate using a demand curve. d. In what way does the demand curve represent the benefit consumers receive from participating in a market? In addition to the demand...
Position Statements Choose five (5) of the following questions to answer in about 100 words each....
Position Statements Choose five (5) of the following questions to answer in about 100 words each. Simply state and briefly explain your position on the issue prior to our formal study of it. No comprehensive, developed argument is needed at this time, simply a coherent expression of your view. 1. Is abortion a moral or immoral choice? Do you consider yourself pro-life or pro-choice? 2. Should we clone human beings? Morally speaking, what makes this a good or bad idea?...
Answer the question in 400 words. What is the dual banking System? is it relevant today?
Answer the question in 400 words. What is the dual banking System? is it relevant today?
Question (1) Answer each of the following questions briefly. These questions are based on the following...
Question (1) Answer each of the following questions briefly. These questions are based on the following relational schema: Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pcttime: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) (a) (5 points) Give an example of a foreign key constraint that involves the Dept relation. What are the options for enforcing this constraint when a user attempts to delete a Dept tuple? (b) (5 points) Write the SQL statements...
The following questions use the table below on soybean oil. Answer the following questions about an...
The following questions use the table below on soybean oil. Answer the following questions about an end user needing to purchase soybean oil. One soybean oil contract is 60,000 pounds (lbs). Now Later Cash Soybean Meal Market $0.335/lb $0.346/lb Futures Soybean Meal Market $0.3000/lb $0.311/lb 1) Is the individual concerned about price increasing or decreasing? 2) What is the initial action in the futures market: buy or sell? 3) What is the cash price paid/received by the individual later? 4)...
PPlease answer each of the following multiple choice questions and support each answer with a paragraph...
PPlease answer each of the following multiple choice questions and support each answer with a paragraph explaining why your answer is correct.  1. Guests of innkeeper Dave would be surprised to learn that inside the headboards of the beds are embedded recording devices. Dave, who has owned the inn for ten years, enjoys sitting at a console in the front office, tuning in to the private conversations of guests in the rooms. Once his devices picked up the words of...
DUAL DEPENDANT QUESTIONS A system of two converging lens separated by a distance of 10 cm....
DUAL DEPENDANT QUESTIONS A system of two converging lens separated by a distance of 10 cm. The first lens has a focal length of 5.0 cm and the second has a focal length of 8.0 cm. An object is 15 cm away from the first lens. What is the distance of the final image from the second lens? Is it real or virtual We conclude this is 3.6 cm; virtual Now.... A system of two converging lens separated by a...
Use this information to answer questions below: Cost Cutting: CBD Inc, a processor of CBD oils,...
Use this information to answer questions below: Cost Cutting: CBD Inc, a processor of CBD oils, is analyzing a potential opportunity to cut costs. It can spend $1.5 Million today on the purchase and installation of a new automated processing line. The equipment will have a six-year life, at which time it can be sold for $250,000. The equipment qualifies as a Class 8 asset with a 20% CCA rate. Since the equipment will be purchased in 2020, it is...
Please answer the following questions in 250+ words total and number the questions (aim for about...
Please answer the following questions in 250+ words total and number the questions (aim for about a paragraph per question). 1. Define compensating differential and give original examples (not already included in the book or power points) of different jobs that earn higher wages and some that earn lower wages because of compensating differentials. 2. Go to the Education Pays (Links to an external site.) page on the Bureau of Labor Statistics website. Compare and contrast the different levels of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT