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: 50% (2 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?
-
Diagonalize the matrices, if possible. The eigenvalues are as follows: (11) = 1, 2, 3; (12) = 1, 4; (13) = 5, 1; (14) = 3, 4; (15) = 3, 1; (16) = 2, 1. 2000 0200 0020 1002
-
Johnson & Johnson discloses in its annual report that costs associated with advertising are expensed in the year incurred and are included in selling, marketing and administrative expenses on the...
-
Comparative balance sheet data for the partnership of Bond and Wallin follow. Net income for the year was $22,000, and this was transferred in equal amounts to the partners capital accounts....
-
Cash Accounts receivable Merchandise inventory Equipment Accumulated depreciation-equipment Accounts payable HST recoverable HST payable Y. Novak, capital Y. Novak, drawings Sales Sales returns and...
-
Use the information below and prepare the Multi-Step Income Statement for Hot Place on August 31. Sales $1,250,000 Interest Revenue 25 Sales Discounts 15,000 Sales Returns and Allowances 30,000 Cost...
-
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...
-
Using the non-Fokker-Planck arguments outlined in the text, compute an estimate of the electron-electron equilibration rate, and show that it agrees with the Fokker- Planck result, Eq. (20.23a), to...
-
Under what circumstances can commercial policy be an effective tool to solve world environmental problems? Under what circumstances will commercial policy be not very effective? In general, which set...
-
How can the direction of the magnetic field at a certain point along a curved field be determined?
-
Draw the demand, marginal revenue and marginal cost curves for a monopolist. Show the profit-maximizing level of output. Show the profit-maximizing price.
-
Show that less than complete specialization in production leads to a lower level of welfare than complete specialization.
-
Suppose that Macland protects its motorcycle industry with a quota that raises domestic prices by \($150\) per unit. If Maclands government were to then impose a tariff of \($120\) per motorcycle,...
-
Identify each of the following statements with fixed costs or variable costs by writing fixed or variable in the space provided. ______ a. A cost that varies in total with changes in the activity...
-
Repeat Exercise 16.6 using the t-test of the coefficient of correlation. Is this result identical to the one you produced in Exercise 16.6?
-
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...
-
Please only right anwsers last 6 people gave me wrong anwsers and this is the last chance I have to anwser it right please. there is 3 posts. I need all anwsers to all questions posted, GODBLESS. I...
-
Question 1 A study was undertaken to determine whether there was a significant weight (in lb) loss after one year course of therapy for diabetes, and whether the amount of weight (in lb) loss was...
-
See the attachment below. Write the solution in detail (all processes) with explanations, thanks!
Study smarter with the SolutionInn App