324_Book

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

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

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