Consider the following interference graph Let the number of available registers
ID: 3606779 • Letter: C
Question
Consider the following interference graph Let the number of available registers be 3, and let the spill costs be as follows: live range cost (a) (5 points) Give the order we'l color the graph using top-down coloring. (b) (5 points) Give the order we'll color the graph using bottom-up coloring. Use a table similar to what we used in class. Show your work. If you can choose more than one node at a given step, choose the one with the greatest cost. Note: bottom-up doesn't normally have a spill metric to break ties, but I'm adding one to make grading easier.Explanation / Answer
int
main (int argc, char **argv)
{
while (1){
int childPid;
char * cmdLine;
printPrompt();
cmdLine= readCommandLine(); //or GNU readline("");
cmd = parseCommand(cmdLine);
record command in history list (GNU readline history ?)
if ( isBuiltInCommand(cmd)){
executeBuiltInCommand(cmd);
} else {
childPid = fork();
if (childPid == 0){
executeCommand(cmd); //calls execvp
} else {
if (isBackgroundJob(cmd)){
record in list of background jobs
} else {
waitpid (childPid);
}
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.