Errata
for the JR Book
- 2004-05-26. p167, bottom. forks's parameters are
mislabeled
public op void forks(boolean
haveL, boolean haveR,
boolean dirtyL, boolean dirtyR);
should be
public op void forks(boolean haveL,
boolean dirtyL,
boolean haveR, boolean dirtyR);
(Not significant since names there are just for
documentation.)
- 2004-08-05. p104, Exercise 8.5.
Clarification: Give the exact translation to send/receive pairs
of the invocation of p and the reply statement.
- 2005-07-20. p135, Exercise 9.32, 2nd sentence should be:
Process B has a set of integers, T.
- 2005-07-24. p332, rules for inni and view statements
need a [] before the else; also, the first form of inni now allows an elseafter for
timeout, so these three rules should now be:
inni InniArm { [] InniArm}
[ [] (else Statement)|(elseafter Expression Statement)]
inni with Expression over
InniSelectArm {[] InniSelectArm}
[ [] else Statement]
view Expression ViewArm {ViewArm}
[ [] else Statement]
- 2005-07-25. We've changed the syntax
(effective in JR versions after 1.00061) so that process
quantifiers cannot be empty. So, simple changes to code:
p117, eliminate () after RWAllocator.
p125, eliminate () after FairRWAllocator.
- 2009-08-19.
We've updated the sample code from Chapter 5
(Synchronization Using Shared Variables) to more accurately
reflect
Java's Memory Model.
Specifically, we added the keyword volatile to the flag
variables in the programs BadCSFlag, Bakery2, SoSoCSTurns,
and unused/TieBreaker.
No change is needed to the generalform program.
We did not make changes to unused/TieBreakerN or BakeryN programs
since those involve arrays
(but see the sharedvars/README for how one might do so).
Other programs in the book don't need volatile since they use JR
synchronization, which cause shared variables to be updated as desired.
The need for this change was first observed with jdk1.6.0_16 on a
dual-processor and on a multi-core. (The SoSoCSTurns program
would sometimes hang.)
Apparently, this implementation is more aggressive
than previous ones.
We updated the JR book code extracts in the
current
version (2.00602).
(These changes will be carried forwarded in subsequent versions.)
- 2017-04-04.
p239, code within Jacobi's gather
Worker ids are 1 ... PR, but the code tests
(id==0?0:1)
it should be
(id==1?0:1)
Note, however, that the output from the program doesn't change
since row 0 is never printed anyway.
(Hence, we didn't update the code extract.)