C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 unsigned int next

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e of 1. We can clarify this idea of correct and incorrect instruction orderings with the help of a formalism known as a progress graph, which we introduce in the next section. Practice Problem 11.3: Which of the following instruction orderings for badcnt.c are sequentially consistent? A. B. C. D. À½ À¾ Ľ ľ ͽ ; ˾ ˽ ̾ ̽ À½ À¾ ľ ; ˾ ͽ ̾ Ľ ˽ ̽ À¾ ľ À½ Ľ ͽ ˽ ; ˾ ̾ ̽ À¾ À½ ľ Ľ ˾ ͽ ; ˽ ̾ ̽ . . . . Practice Problem 11.4: Complete the table for the following sequentially consistent ordering of badcnt.c. Step 1 2 3 4 5 6 7 8 9 10 Thread 1 1 2 2 2 2 1 1 1 2 Instr À½ Ľ À¾ ľ ; ˾ ͽ ˽ ̽ ̾ %eax½ – %eax¾ – cnt 0 Does this ordering result in a correct value for cnt? 11.4.2 Progress Graphs A progress graph models the execution of Ò concurrent threads as a trajectory through an Ò-dimensional Cartesian space. Each axis corresponds to the progress of thread . Each point ´Á½ Á¾ ÁÒ µ represents the state where thread , ( ½ Ò) has completed instruction Á ....
View Full Document

Ask a homework question - tutors are online