next up previous
Next: Data descriptor and global Up: Java language Binding Previous: Structured SPMD programming

Global variables

As a SPMD programming language, when a program starts on a group of n processes, there will be n logical control threads, which mapping to utmost n physical processors.

On each control thread, the program can define variables in the same way as in a sequential one. The variables created in this way are local variables, they are replicated names on each process, which will be accessed individually.

Besides local variables, HPJava allows a program to define global variables, which are distributed on a process group. The global variables will be considered a single entity during the execution on each process which creates it.

The language has special syntax for the definition of global data. And the global variables are all defined by using the new operator from free storage. When a global variable is created, a data descriptor is also allocated to describe where the data are created.





Guansong Zhang
Mon Feb 23 15:47:12 EST 1998