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?
-
A pan in an auto shop contains 5 L of engine oil at 20oC, 100 kPa. Now 2 L of hot 100oC oil is mixed into the pan. Neglect any work term and find the final temperature and the entropy generation.
-
The seeds on a sunflower mirror the Fibonacci sequence. If a circular layer on the sunflower contains 55 seeds, approximately how many seeds would be found on the next larger circular layer?
-
A manufacturer of microwaves has discovered that male shoppers have little value for microwaves and attribute almost no extra value to an auto-defrost feature. Female shoppers generally value...
-
3. Find the exact value of the directional derivative of the function f (x, y, z ) = xy z' at the point (2, 1,1) in the direction of the point (0, -3, 5) . 4. Suppose the xy-plane is superimposed...
-
PLEASE READ FROM THE BEGINNING CAREFULLY- I used chegg to get help and they found out as chegg is very common. SolutionInn is a better option. They found out that i took help in the maths midtems on...
-
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...
-
Please watch the following video(s): a. Hourly employees vs. pay for performance: https://www.youtube.com/watch?v=Fa6uXjX8o30 b. Why you should know how much your coworkers are making:...
-
A client maintains a large data center where accesd is limited to authorized employees. How may an auditor best determine the effectiveness of this control activity?
-
In this case study involving an anonymous hospital, nursing department leaders sought to improve efficiency of their staff's shift change assignments. Upon value stream mapping the process, team...
-
What leadership competencies are requisite for navigating the complexities of digital transformation, and how can leaders cultivate a culture of continuous learning and adaptability to thrive in an...
-
a. Ms. Fui Pin isplanning to buy a new car 7 years from now. For this purpose, she will deposit RM10,500 at the beginning of each year for the first 4 years in the savings account of a commercial...
-
Suppose that ABC Corporation imported a product from XYZ Corporation and was billed 10 million payable in one year. The money market interest rates and foreign exchange rates are given as follows: ...
-
Review your results from preparing First on Alert Security Systems bank reconciliation in Short Exercise. Journalize the companys transactions that arise from the bank reconciliation. Include an...
-
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...
-
\ table [ [ Long - term debt ratio, 0 . 3 ] , [ Times interest earned, 1 0 . 0 ] , [ Current ratio, 1 . 4 ] , [ Quick ratio, 1 . 0 ] , [ Cash ratio, 0 . 4 ] , [ Inventory turnover, 5 . 0 ] , [...
-
E 2 - 4 ( Algo ) Determining Financial Statement Effects of Several Transactions LO 2 - 3 The following events occurred for Johnson Company: a . Received investment of cash by organizers and...
-
E 2 - 4 ( Algo ) Determining Financial Statement Effects of Several Transactions LO 2 - 3 The following events occurred for Johnson Company: a . Received investment of cash by organizers and...
Study smarter with the SolutionInn App