Java Reference
In-Depth Information
Glossary
atomicity When applied to an operation on primitive data, indicates that other threads that
might access the data might see the data as it exists before the operation occurs or after the
operation has completed, but may never see an intermediate value of the data.
canonicalization Reducing the input to its equivalent simplest known form.
class variable “A class variable is a field declared using the keyword static within a
classdeclaration,orwithorwithoutthekeyword static withinaninterfacedeclaration.A
class variable is created when its class or interface is prepared and is initialized to a default
value. The class variable effectively ceases to exist when its class or interface is unloaded”
[JLS 2013, §4.12.3, “Kinds of Variables”].
condition predicate An expression constructed from the state variables of a class that
must be true for a thread to continue execution. The thread pauses execution, via Ob-
ject.wait() , Thread.sleep() , or some other mechanism, and is resumed later, presum-
ably when the requirement is true and when it is notified [Goetz 2006].
controlling expression The top-level expression in the conditional expression of an if ,
while , do... while , or switch statement.
data race “When a program contains two conflicting accesses that are not ordered by
a happens-before relationship, it is said to contain a data race ” [JLS 2013, §17.4.5,
“Happens-before Order”].
happens-before order “Two actions can be ordered by a happens-before relationship. If
oneactionhappens-beforeanother,thenthefirstisvisibletoandorderedbeforethesecond.
. . . It should be noted that the presence of a happens-before relationship between two ac-
tions does not necessarily imply that they have to take place in that order in an implement-
ation. If the reordering produces results consistent with a legal execution, it is not illegal.
. . . More specifically, if two actions share a happens-before relationship, they do not ne-
cessarily have to appear to have happened in that order to any code with which they do not
share a happens-before relationship. Writes in one thread that are in a data race with reads
in another thread may, for example, appear to occur out of order to those reads” [JLS 2013,
§17.4.5, “Happens-before Order”].
heap memory “Memory that can be shared between threads is called shared memory
or heap memory. All instance fields, static fields and array elements are stored in heap
memory. . . . Local variables, formal method parameters or exception handler parameters
are never shared between threads and are unaffected by the memory model” [JLS 2013,
§17.4.1, “Shared Variables”].
Search WWH ::




Custom Search