[Solved]Consider Following Program Int Count0 1 Shared Variable Since Global Void Twiddledee Int 0 Q37165946

Consider the following program: int count0 1/shared variable since its global void twiddledee) int i-0; Ifor part b this will be global and shared for (i0; i<2 i++) count count * count; //assume count read from memory once void twiddledum) int i-0 11 for part b, this will be global and shared for (i0 i<2; i+) countcount 1;) void main)( thread fork (twiddledee); thread fork (twiddledum); print count; a) What are all the values that could be printed in main? b) Repeat part 1 considering that i is also a shared variable c Describe a potential schedule of execution that will result in the value printed out being equal to 0. Assuming there is only one CPU core, clearly specify when the transitions between the Ready and Running states occurs for each thread in this execution Show transcribed image text Consider the following program: int count0 1/shared variable since its global void twiddledee) int i-0; Ifor part b this will be global and shared for (i0; i
Expert Answer
Answer to Consider the following program: int count0 1/shared variable since its global void twiddledee) int i-0; Ifor part b this… . . .
OR

