Virtual Terminal Architecture
The commands, and associated parameters, which are available to the users of the virtual terminal constitute the virtual terminal architecture. The commands available to a user -- to request the virtual controller to establish, abort, or close a session, and discard, suspend, or resume output -- remain invariant to the virtual terminal class. However, as one would expect, the user interface to the virtual display depends on the nature of this data structure.
Three important architectural features of the meta-terminal are: the concept of communication variables, the notion of a file-extended virtual display, and the concept of virtual display windows. Each of these concepts are a part of the meta-terminal architecture because they are apparent to the users of the virtual terminal.
2.2.3.1 Communication Variables
Each component of the meta-terminal (i.e., virtual keys, controller, display) is assigned a standard, protocol-wide name which we call a communication variable. The communication variable is a part of the header of each command to the virtual terminal (i.e. protocol item). It permits better management of the virtual terminal command name space, and also provides the virtual keys with an easy mechanism to select the destination of the request. It must be noted that nothing in the model precludes the addition of more virtual entities to the meta-terminal, such as auxiliary virtual devices and signalling devices. The use of communication variables provides a naming hierarchy which alleviates the problems of device selection and command name allocation in the case of such extensions.
2.2.3.2 Virtual Display with File Extension
The virtual display is the immediate manager of the meta-terminal data structure. When the virtual display is provided with an I/O file extension, it is possible to introduce the concept of a stable-store data structure, a data structure whose contents are stored in backing store (e.g., disk). If the virtual display is provided with this file extension capability (a local option with no end-to-end significance), then the meta-terminal data structure inherits the spatial and temporal attributes (dimensions and time-to-live) of the associated file. Such a virtual display, coupled with the concept of virtual display windows below, provides the users of the service with a very powerful tool.
2.2.3.3 Virtual Display Windows
To communicate with a virtual terminal, each real device uses an adaptation unit as its interface entity (this adaptation unit is a part of the workstation model, see section 2.3). What is important to note is that the adaptation unit provides the transition between the device-specific domain, the device workspace, and the virtual domain, the master workspace (see Figure 2.4).
| | |
| VIRTUAL TERMINAL | ADAPTATION UNIT |
|<------------------------------->|<--------------------------------->|
| DOMAIN | DOMAIN |
| | |
+ - - - - - - - - - + + - - - - - - - - - + - - - - - - - - -
| +---> x(m) | | | / /|
| | | | x(i) | / / |
| v y(m) | | +---------------> | - - - - - - - - - |
| | | | | | | +------------+ | |
| +--------------+ | | | | | | | VIEWPORT 1 | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | A<---------|--|-----|-|->A | | |
| | | | | | / \ | | | | | | |
| | <--------|--|---|-|-> \ | | | | | | |
| | / | | | | \ | | | | <---|-|--|+
| | A | | | | \ | | | +------------+ | ||
| | | | | | \ | | | | ||
| | WINDOW | | | | \ | | | +------------+ | ||
| | | | | | \ | | | | VIEWPORT 2 | | ||
| | | | | |-----------\--+ | | | | | ||
| | | | | | \ | | | | | ||
| +--------------+ | | v y(i) \ | | +------------+ | ||
| | | \ | | | / |
| | | \ | | | |
| | | \| - - - - - - - - |
| / | | / | | | |
+ - -/- - - - - - - + + - - -/- - - - - - +\ | | |
/ / \ - - - - - - - - |
/ / \ | KEYBOARD | |
MASTER WORKSPACE INSTANCE WORKSPACE \ + - - - - - - - + |
<-/ [] [] [] /| |
/ [] [] [] / | |
+ - - - - - - - - + |
|
PHYSICAL DEVICE WORKSPACE --+
FIGURE 2.4 -- THE DOMAINS
However a device need not be interested in the whole master workspace, only in a portion of it. As part of its session attributes, each adaptation unit has a window, a rectangular region in the virtual display, which delimits its area of interest in the master. This portion of the master domain will be referred as the instance workspace. Then, for each adaptation unit, there is an instance workspace whose spatial attributes (dimension and position within the master) are those of its window definition.
All adaptation units communicate with the virtual terminal "relative" to their own instance workspace. As far as the virtual terminal is concerned, each instance workspace defines a "real" terminal, although in fact it is just an intermediate representation of the real device. In essence, the instance workspace is the coordinate space where both virtual terminal and adaptation unit rendezvous. (See section 2.3 for a discussion of how this instance workspace is mapped onto the device workspace).
The window dimensions are the exclusive choice of the adaptation unit that owns it. With these dimensions the adaptation unit specifies to the virtual terminal how much of the master is to be viewed; data elements not contained within the boundaries of the window are clipped. Varying the dimension of the window results in corresponding changes on the amount of the master that is viewed.
In contrast, the position of the window on the master might not be under direct control of the adaptation unit. To understand the dynamics of a window, we introduce the notion of a master cursor and an instance cursor. The master cursor is a read/write pointer, which is a part of the virtual display architecture. In turn, the instance cursor is a pointer owned by the adaptation unit, which is a part of the state information maintained by the virtual display. Normally, both master and instance cursors are bound together so that motion of one cursor translates into an equivalent motion of the other. As long as the adaptation unit does not explicitly unbind its instance cursor from the master cursor, the active region of the master (i.e., the position where the master cursor lies) is guaranteed to be always within the instance space, and thus viewable. This means that certain operations on the virtual display will implicitly relocate the window of an adaptation unit within the bounds of the master workspace to insure the tracking of the master cursor. (The actual algorithm which enforces this tracking rule, called the viewing algorithm, has not been included here.) This window relocation is viewed at the real terminal as either vertical or horizontal scrolling.
However, an adaptation unit has the choice to bypass this rule by detaching its instance cursor from the master, effectively getting complete control of its cursor to view other portions of the master space. If the virtual display has an I/O file extension, then the adaptation unit can pan its window on the file-extended space well beyond the present contents of the master space. Therein lies the power of a stable-store data structure when coupled with the concept of windowing.