Question: CSC332 Points Q1. (70 Points) Suppose a run ning program As interrupted by an interrupt. Suppose after servicing the interrupt, we get back to the

 CSC332 Points Q1. (70 Points) Suppose a run ning program As

CSC332 Points Q1. (70 Points) Suppose a run ning program As interrupted by an interrupt. Suppose after servicing the interrupt, we get back to the program A. Explain (in less than 100 words) how at this point, A will have the same condition code values that it had before the interrupt. Q2. (80 Points) In Fig 2.5 (A Multi-threaded...), suppose the program was called with argument 1 (so the variable loops will get initial value 1). What are the all possible values of counter printed in different runs of the program? Explain via assembly language level instructions and cpu registers. Q3. (150 Points) Consider the following code int main (int argc, char argv(l) printf("a"); int rc- forkO if (rc 0)printt ("b) else printf("c"); return 0 Assuming fork0 may or may not succeed and printt) prints its outputs immediately (no buffering of output of a process occurs, ie, the system does not collect outputs of a process in a temporary buffer and print it later), what are possible outputs of this program? Explain your answer in less than 100 words

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!