Question: Consider the following program Note that the scheduler in a uniprocessor

Consider the following program:
Note that the scheduler in a uniprocessor system would implement pseudo parallel execution of these two concurrent processes by interleaving their instructions, without restriction on the order of the interleaving.
a. Show a sequence (i.e., trace the sequence of inter-leavings of statements) such that the statement “x is 10” is printed.
b. Show a sequence such that the statement “x is 8” is printed. You should remember that the increment/decrements at the source language level are not done atomically, that is, the assembly language code:
Implements the single C increment instruction (x = x + 1).



Sale on SolutionInn
Sales4
Views472
Comments
  • CreatedMay 09, 2015
  • Files Included
Post your question
5000