volatile variable


Also found in: Wikipedia.

volatile variable

(programming)
A variable in a computer program which can be modified by processes other than the program. For example, a variable that stores the value of a timer chip (either because it is located at the address of the hardware device or because it is updated on interrupts) needs to be volatile to be useful.

A static variable, on the other hand, maintains its value until the program changes it or it is no longer needed. In addition, volatile variables can be held in the stack whereas static variables are usually stored in a program's data segment.
Mentioned in ?
References in periodicals archive ?
Liquidity is recorded as a highest volatile variable of the study.
His letter to the Chancellor said: "Fixing deposit guarantees to a volatile variable like the exchange rate puts savers at the mercy of the fluctuating euro.
He noted that the NASD already handles some cases involving fixed annuities, such as instances of brokers persuading risk-averse retirees to exchange fixed annuities for far more volatile variable annuities.
sense to fix tees, which able to win dence and be providing d predictability for s, to a volatile variable nge rate."
"It makes no sense to fix deposit guarantees, which need to be stable to win public confidence and which should be providing certainty and predictability for ordinary savers, to a volatile variable like the exchange rate."
Here we consider the consistency guarantees when strong operations are employed, including the use of locks (Constraints in A.5) and volatile variables (Constraints in A.6).
In Section 6.1 we consider how the use of locks and volatile variables by the programmer affects the memory model.
6.1.2 Volatile Variables. There may be several variables in the program that are heavily utilized for transferring data between threads.
We examine the behavior of code that employs volatile variables only, and dub the corresponding memory model volatile consistency.
THEOREM 6.3 The consistency model among volatile variables, namely, Volatile Consistency, is equal to Sequential Consistency.
Given an execution H and a schedule T, we show that there is a serialization of accesses to volatile variables which is consistent with the program order of all the threads.
Consider the main memory part T|v in T consisting only of accesses to volatile variables. From Constraints A.6.1 and A.6.2, there is a one-to-one correspondence between the operations in T|v and those in H|v.