Introduction to Legion 1.6 Context Space
Table of Contents
What is context space?|
What am I looking at?
Organizing context space
Other on-line tutorials & documentation
$ . ~legion/setup.sh or $ source ~legion/setup.csh
|What is context space?|
These string names are called context names and you organize them in a hierarchy of contexts in Legion's context space. Context names are organized in sets of contexts and subcontexts, just as Unix files are organized in sets of directories and subdirectories. New Legion systems have a prebuilt context space for convenience, but you can rename and rearrange all or part of your context space as appropriate. You can run programs, use far-flung resources, and take advantage of Legion's other features via your context names.
Context space is a way of organizing Legion objects and can be thought of as a network-wide transparent file system. It is similar to Unix's system of directories and files but while Unix space is location specific, context space can potentially include objects anywhere in Legion. You maintain your own context space, organizing it to reflect your needs.
You will probably do most of your Legion work in context space, so it is important to be familiar with the geography of your system's particular context space and to feel comfortable negotiating that space. You can use command-line utilities or the Legion GUI (for more about this feature, go to the tutorial or see the Basic User Manual).
|What am I looking at?|
Figure 1: Contents of a new Legion system context space
Think of the different levels of context space as directories and sub-directories. Each of the four contexts in Figure 1 can hold sets of sub-contexts, just as Unix directories hold sets of subdirectories. Context names are organized with contexts, just as Unix files are organized with directories. Context path names use Unix-style slash (/) as a default, so the examples here follow that style (e.g., the full context path name for BootstrapHost in the system shown in Figure 1 is /hosts/BootstrapHost). It is possible to change Unix-style slash to the DOS-style backslash (\) via the primitive context manipulation routines provided by the Legion library.
Figure 1 shows four sub-contexts: class, hosts, vaults, and home. These in turn contain the default context names of the basic elements of a new system: class contains context names of particular classes of Legion objects, hosts contains names of the host objects currently in your system, and vaults contains names of the vault object currently in your system. The home context is initially empty.
When newly installed, hosts contains two context names, BootstrapHost and the DNS name of the bootstrap host.1 Both of these names point to the bootstrap host object, which represents the bootstrap host. On the other hand, vaults contains only one context name, BootstrapVault, which points to the bootstrap vault object. (Please click here for more information on host and vault objects.)
A new class context contains context names for all of the basic Legion object classes, such as BasicFileClass and ttyObjectClass (Legion classes are themselves objects and can therefore be given context names). All Legion objects are organized into classes and all classes are organized into a hierarchy of metaclasses, with LegionClass as the supreme metaclass. Note that the context space illustrated in Figure 1 does not reflect this hierarchy. This is a key feature of context space: the physical location and organization of Legion objects is unrelated to any user's context space. The objects named in a host context do not have be able to communicate with each other or even to know of each other's existence. They do not even have to be host objects: you can organize your contexts as you wish.
|Organizing context space|| Legion object names |
More about the LOID
Figure 2: Context space
Similarly, a context name can refer to different Legion objects, just as Unix users can use the same name in different directories to refer to different files: in Figure 11 the context path names /User1/ContextA/Foo and /User3/ContextC/ContextC1/Foo refer to different objects.
On the other hand, a single Legion object can have multiple context names in multiple contexts. Figure 3's Foo and Bar refer to a single object, ObjectX, but these names are in two different context spaces.
Figure 3: Single object with multiple context names
It is important to remember that context space does not reflect object space: ObjectX's native location is unchanged by its context path names. User1 might be in the same building as ObjectX or on the other side of the country. Objects named in a single context may actually be hundreds of miles apart.
Beyond the user-level grouping of individual context spaces, linking object groups in graph- or directory-based structures can be useful: just as a Unix directory tree or a collection of hypertext documents provide a logical means to organize information, context space provides a structure for finding and organizing Legion objects. For example, to find a host object running on an IBM SP2, you might enter a context called hosts, then a context called ibm, then a context called sp2, where a list of host objects running on SP2s could be found (in Unix, this would be the equivalent of moving through a series of directories--/hosts/ibm/sp2--to arrive at a directory called sp2).
Legion provides a library interface and utility commands such as legion_context_create, legion_context_add, and legion_ls for manipulating and negotiating context spaces. The Legion library interface provides a Unix-like path interface for expressing navigation through multiple contexts, and Legion command-line tools support path-like naming of objects within context space. Paths are delimited by the "/" character. For example, the path /usr/adam would map to the object named adam within the context named usr.
2. There is another context that represents the user's shell, but it does not appear in object path names nor does it affect the user's movements in context space.[Back]
Other relevant on-line documents:
Other relevant on-line documents:
|Click on the to go to the page.|
Logging in to a running Legion system
Legion graphical user interface
Introduction to Legion context space
How to start remote programs in Legion
Sample makefile for remote programs
Adapting a parameter space study for Legion
Legion tty objects
Running a PVM code in Legion|
Running a Legion MPI code
Running native MPI code
Quick list of all Legion commands (1.6.4)
Usage of all Legion commands (1.6.4)
Starting a new Legion system
Using Legion security features
Legion host and vault objects
Adding host and vault objects
Brief descriptions of all on-line 1.6 tutorials
Last modified: Thu Jun 10 12:33:19 1999
[an error occurred while processing this directive]