Consider the following code segments running on two processors P1 and P2. Assume A, and B, are
Question:
Consider the following code segments running on two processors P1 and P2. Assume A, and B, are initially 0. Explain how an optimizing compiler might make it impossible for B to be ever set to 2 in a sequentially consistent execution model.
Transcribed Image Text:
P1: A=1; A=2; While (B=0); P2: B=1; While (A 1); B= 2;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (3 reviews)
As the question suggests an optimizing compiler could change the behavior of the code in such a way that it could theoretically prevent variable B fro...View the full answer
Answered By
HARSH RANJAN
Taken classes at college to graduates, Also worked as an expert to a freelancer online question-solving portal for more than 8 months with an average rating greater than 4.2 out of 5.
5.00+
1+ Reviews
10+ Question Solved
Related Book For
Computer Architecture A Quantitative Approach
ISBN: 9780128119051
6th Edition
Authors: John L. Hennessy, David A. Patterson
Question Posted:
Students also viewed these Computer science questions
-
Consider the following code segments running on two processors P1 and P2. Assume A and B are initially 0. a. If the processors adhere to sequential consistency (SC) consistency model. What are the...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
do the following,..... Write program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, first name. Create program that takes in user input...
-
Suppose that you borrow $1000.00 from a friend and promise to pay back $1975.00 in 5 years. What simple interest rate will you pay?
-
On the generalized enthalpy departure chart, the normalized enthalpy departure values seem to approach zero as the reduced pressure PR approaches zero. How do you explain this behavior?
-
During an assessment of the risk associated with sales contracts and related commissions, which of the following factors would most likely result in an expansion of the engagement scope? (a) An...
-
2. What is the profit-sharing ratio for Shin, Miku, and Tora?
-
Emma and Laine form the equal EL Partnership. Emma contributes cash of $100,000. Laine contributes property with an adjusted basis of $40,000 and a fair market value of $100,000. a. How much gain, if...
-
An insurance company has a standard coinsurance clause of 90%. Compute the amount of insurance coverage the owner of a building valued at $1,060,000 must carry in order to avoid being the bearer of...
-
Wheelco Pty Ltd manufactures car and truck wheels. The company produces four basic, high-volume wheels used by manufactures of large cars and trucks. Wheelco also has two specialty wheel lines. These...
-
In a processor implementing a SC consistency model, the data cache is augmented with a data prefetch unit. Will that alter the SC implementation execution results? Why or why not?
-
In a read miss, a cache might overwrite a line in the shared (S) state without notifying the directory that owns the corresponding memory block. Alternatively, it will notify the directory so that it...
-
The National Center for Education Statistics reported the following data on the average cost per year for tuition, fees, and room and board for 4-year public institutions in the United States...
-
What should be the equivalent units of production for (1) Dept M and (2) Dept. P? Can you please show the solutions and answer. Thanks Problem 1 Lee Gon Mfg. Co has its product processed in two...
-
Moullierat Mfg. is considering a rights offer. The company has determined that the ex-rights price will be $95. The current price is $102 per share, and there are 24 million shares outstanding. The...
-
This question involves hypothesis testing. The following numbers will help you answer these questions. The random variable Z ~N(0, 1) is standard normal. P(Z >1.28).1 P(Z1.65) .05 P(Z1.96) .025 P(Z...
-
Human service organizations require strong and effective leadership. Understanding what qualities make up an effective leader and how these qualities can be cultivated is of critical importance for...
-
18. What is the name of the heat treatment performed on a cold worked sample? 19. What is the percent coldwork of a sample with an initial thickness of 11mm and a final thickness of 7mm? 20. Which...
-
Steam flows steadily through a turbine at a rate of 45,000 lbm/h, entering at 1000 psia and 900F and leaving at 5 psia as saturated vapor. If the power generated by the turbine is 4 MW, determine the...
-
What will be the final value of DI after executing the following piece of code? Execute the instructions dependently one after another. CLD MOU CX,OFOH MOU AX.02874H MOU DI,01000H MOU ES, DI SUB...
-
The UNIX operating system differentiates between block-oriented and character oriented devices. Give an example of each, explain the differences between them, and explain how the I/O process differs...
-
Consider the interface between a computer and a printer. For a typical printout, it is clearly impractical to send output data to the printer one byte or one word at a time (especially over a...
-
To use a computer for multimedia (moving video and sound), it is important to maximize the efficiency of the I/O. Assume that the blocks of a movie are stored consecutively on a CD-ROM. Describe the...
-
Hite corporation intends to issue $160,000 of 5% convertible bonds with a conversion price of $40 per share. The company has 40,000 shares of common stock outstanding and expects to earn $600,000...
-
Your portfolio has a beta of 1.17, a standard deviation of 14.3 percent, and an expected return of 12.5 percent. The market return is 11.3 percent and the risk-free rate is 3.1 percent. What is the...
-
Slow Roll Drum Co. is evaluating the extension of credit to a new group of customers. Although these customers will provide $198,000 in additional credit sales, 13 percent are likely to be...
Study smarter with the SolutionInn App