17.1
Terminology and Framework
THREADS AND LOCKS
memory on behalf of any one thread are performed in the same order as the corre 
sponding actions by that thread. (This is explained in greater detail below.)
A single Java thread issues a stream of
use
,
assign
,
lock
, and
unlock
 actions as
dictated by the semantics of the Java program it is executing. The underlying Java
implementation is then required additionally to perform appropriate
load
,
store
,
read
, and
write
 actions so as to obey a certain set of constraints, explained below.
If the Java implementation correctly follows these rules and the Java application
programmer follows certain other rules of programming, then data can be reliably
transferred between threads through shared variables. The rules are designed to be
 tight  enough to make this possible but  loose  enough to allow hardware and
software designers considerable freedom to improve speed and throughput
through such mechanisms as registers, queues, and caches.
Here are the detailed definitions of each of the actions:
A
use
 action (by a thread) transfers the contents of the thread's working copy
of a variable to the thread's execution engine. This action is performed when 
ever a thread executes a virtual machine instruction that uses the value of a
variable.
An
assign
 action (by a thread) transfers a value from the thread's execution
engine into the thread s working copy of a variable. This action is performed
whenever a thread executes a virtual machine instruction that assigns to a
variable.
A
read
 action (by the main memory) transmits the contents of the master copy
of a variable to a thread's working memory for use by a later
load
 action.
A
load
action (by a thread) puts a value transmitted from main memory by a
read
 action into the thread s working copy of a variable.
A
store
action (by a thread) transmits the contents of the thread's working
copy of a variable to main memory for use by a later
write
 action.
A
write
 action (by the main memory) puts a value transmitted from the
thread's working memory by a
store
 action into the master copy of a variable
in main memory.
A
lock
 action (by a thread tightly synchronized with main memory) causes a
thread to acquire one claim on a particular lock.
An
unlock
 action (by a thread tightly synchronized with main memory) causes
a thread to release one claim on a particular lock.
402






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved