COS226 - Textbook Errata - 17-08-2009

COS226 - Textbook Errata - 17-08-2009 - Errata for The Art...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Errata for The Art of Multiprocessor Programming Version of 17 August 2009 [Modified: 17 August 2009, R. Klazar] In many places, inserted text is highlighted in red . Preface p. xx “all of which are useful in structur ing concurrent applications.” Chapter 1 p. 4 In Fig. 1.1, line 4 should say   for (int j = (i * block) + 1; j <= (i + 1) *  block; j+ +) { p. 11 Second paragraph of Mutual Exclusion bullet: “Initially the can is either up or down. Let us say it was down. Then only the pets can go in, and mutual exclusion holds.” Chapter 2 p. 23 Figure 2.3 should be amended as shown: public long getAndIncrement() { lock.lock(); try { long temp = value; value = temp + 1; return temp; } finally { lock.unlock(); } } p. 25 Pragma 2.3.1: “We explain the reasons in Chapter 3 and Appendix B .” p. 26 In Fig. 2.5, remove all declarations of variables as volatile . Indeed as stated in Pragma 2.3.1 on page 25, one should use memory barriers when implementing these algorithms. However, in this chapter (in all code) we avoid such issues to keep the algorithms simple. Adding volatile to these variables would require more complex coding that would distract readers from the core issues at hand. p. 27 In Fig. 2.6, remove all declarations of variables as volatile . Indeed as stated in Pragma 2.3.1 on page 25, one should use memory barriers when implementing these algorithms. However, in this chapter (in all code) we avoid such issues to keep the algorithms simple. Adding volatile to these variables would require more
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
complex coding that would distract readers from the core issues at hand. p. 44 Exercise 19. Instead of 3 n should be O(3 n ) and instead of n2 n should say O(n2 n ). Chapter 3 p. 54. First paragraph: “We use the following shorthand: <p.enq(x) A> -> < p .deq(x) B> means that any sequential execution must order A's enqueue of x at p before B's dequeue of x at p, and so on.” p. 67 "... head is the index of the next slot from which to remove an item, and tail is the index of the next slot in which to place an item." Chapter 4 p. 79 First paragraph of Section 4.2.3, the reference to Fig. 4.7 should be Fig. 4.8. p. 95. In Figure 4.22, the comment “ N is the total number of threads is incorrect. N is actually the length of the register. Chapter 5 P 100 “The reader will notice that since the decide() method of a given consensus object is executed only once by each thread, and that there are a finite number of threads , by definition, a lock-free implementation would also be wait-free and vice versa.” p 121. In Exercise 65, Replace “provides the same propose() and decide() method as consensus” by “provides the same decide() method as consensus”. Chapter 6
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/11/2010 for the course COS COS226 taught by Professor Klazar during the Spring '10 term at University of Pretoria.

Page1 / 10

COS226 - Textbook Errata - 17-08-2009 - Errata for The Art...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online