Consider the problem of assigning registers on a central processing unit (CPU) to the variables in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the problem of assigning registers on a central processing unit (CPU) to the variables in a program. Since a program may have many variables and there are a limited number of registers on the CPU, assigning registers to variables is an important problem. Since only certain variables are in use at different times during the execution of the program (variables that are being used at a particular time are called alive), the real task is merely to figure out which alive variables to assign to the limited number of registers. This is a classic graph-colouring problem. For a certain program the following holds: 1. There are seven variables in use in the program. 2. Program variables A,B, and D are alive together. Program variables C,D,E, and F are alive together, and program variables A,E, and G are alive together. 3. There are four registers available for assignment to program variables. (6.1) Define the variables for this CSP. (9) (6.2) Define the domain for each variable in the CSP. (4) (6.3) Define the constraints for the variables in the CSP. (11) (6.4) Provide the constraint graph for this problem. Does a solution exist? If no solution exists, explain what parameters from the problem would have to change in order to get to a solution. (5) Consider the problem of assigning registers on a central processing unit (CPU) to the variables in a program. Since a program may have many variables and there are a limited number of registers on the CPU, assigning registers to variables is an important problem. Since only certain variables are in use at different times during the execution of the program (variables that are being used at a particular time are called alive), the real task is merely to figure out which alive variables to assign to the limited number of registers. This is a classic graph-colouring problem. For a certain program the following holds: 1. There are seven variables in use in the program. 2. Program variables A,B, and D are alive together. Program variables C,D,E, and F are alive together, and program variables A,E, and G are alive together. 3. There are four registers available for assignment to program variables. (6.1) Define the variables for this CSP. (9) (6.2) Define the domain for each variable in the CSP. (4) (6.3) Define the constraints for the variables in the CSP. (11) (6.4) Provide the constraint graph for this problem. Does a solution exist? If no solution exists, explain what parameters from the problem would have to change in order to get to a solution. (5)
Expert Answer:
Answer rating: 100% (QA)
61 Define the variables for this CSP A B C D E F G 62 Define the domain for each variable in the CSP ... View the full answer
Related Book For
Introduction to Operations Research
ISBN: 978-1259162985
10th edition
Authors: Frederick S. Hillier, Gerald J. Lieberman
Posted Date:
Students also viewed these programming questions
-
In a Hopfield neural network configured as an associative memory, with all of its weights trained and fixed, what three possible behaviours may occur over time in configuration space as the net...
-
Let i and j be positive integers. (i) Prove that there exist natural numbers a and b such that ai = bj+gcd(i, j). You may use standard results provided that you state them clearly. [4 marks] (ii) Let...
-
Problem A (20 points): Loco Farms Company sold 36,000 units of its only product and incurred a $18,672 loss (ignoring taxes) for the current year as shown here. During a planning session for year...
-
The kinetics of the austenite-to-pearlite transformation obey the Avrami relationship. Using the fraction transformed-time data given here, determine the total time required for 95% of the austenite...
-
Differentiate a wealth tax from a wealth transfer tax and give examples of each.
-
When a charge-separating process or device is used to charge a pair of objects, how are their charges related?
-
This chapter included an example of a manufacturing firm that had problems with employee theft of tools. The company decided that it would search every employees lunch box at the end of each shift....
-
(a) During the audit of the Weak Bank (W), RBI has suggested that the Bank should either merge with another bank or may close down. Strong Bank (S) has submitted a proposal of merger of Weak Bank...
-
Find a stable marriage matching for the instance defined by the following ranking matrix. (Assume that the Greek and Roman letters denote the men and women, respectively.) A B C D ? 1,3 2,3 3,2 4,3 ?...
-
Marketing Mix: (marketing mix or 4P's of your SA) Product: describe in detail (packaging, features, contents, flavors, size etc.) Place: distribution channel, (i.e. drug stores, internet,...
-
Super Clinics offers one service that has the following annual cost and volume estimates: Variable cost per visit = $10 Annual direct fixed costs = $50,000 Allocation of overhead costs = $20,000...
-
Calculate the volume infused in the following scenario. round to the nearest mL. Infusion rate of 40 mL/h for 3 hours 15 min. Your answer Calculate the volume infused in the following scenario. round...
-
1. Assume agents i have wealth W, which can be invested in HC in the form of schooling or in physical capital. Schooling costs ps per unit of schooling and returns lifetime earnings of BS-B2 S. All...
-
ABC Firm issued a 10 year bond semi-annual bond with an annual rate of 4% some seven years ago. What is the price of the bond now (three years to go) if the annual rate of interest demanded by...
-
Why OFDM and OFDMA are so attractive when it comes to multiplexing and access? Explain the benefits and issues of OFDM usage and implementation.
-
Saccharin is an artificial sweetener that is used in diet beverages. In order for it to be metabolized by the body, it must pass into cells. Below are shown the two forms of saccharin. Saccharin has...
-
How might planning in a not-for-profit organization such as the World Wildlife Fund differ from planning in a for-profit organization such as Airbnb?
-
Provide examples of the sources of data a residential solar panel company might gather when engaging in environmental scanning. Exhibit 8-6 may be helpful when answering this question.
-
Should (a) large, (b) small, and (c) not-for-profit organizations analyze their organizations internal and external environments differently? Why or why not?
Study smarter with the SolutionInn App