Question: Q5) (Threads) What could the output of the concurrent (threaded) execution of process A and process B be? (State all possible outputs) Process A Process

Q5) (Threads) What could the output of the concurrent (threaded) execution of process A and process B be? (State all possible outputs)

Process A                                                                                             Process B

int x = 0;
int y = 0;
while (x == 0) {do nothing}
printf("A");
y = 1;
y = 0;
printf("D");
y = 1;
int x = 0;
int y = 0;
printf ("B");
x = 1;
while(y == 0) {do nothing}
printf ("C");

Consider a multiprogrammed system with degree of 6 (i.e., six programs in memory atthe same time). Assume that each process spends 40% of its time waiting for I/O. What will be the CPU utilization? (You can provide a formula instead of a numeric value)

Step by Step Solution

3.42 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

StepbyStep Explanation Part 1 Concurrent Execution Output 1 Understanding the Processes Process A Initializes x and y to 0 Waits in a loop until x bec... View full answer

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 Operating System Questions!