Data Organization for a Real-Time Process Control System

One way of storing data so that it can be accessed quickly by a number of separate processes is to put the data in a block of shared memory—memory that can be accessed directly by multiple programs. The following information model represents a scheme for organizing the data within that shared memory. The organization is based on tables, rows, and columns, so that as a result, the mapping between the application information model and the physical data organization is quite straightforward.

A data organization of the sort represented here is relatively easy to implement, since it depends only on a shared memory concept (common to real-time operating systems) and some method of binding the variables of the application code to the data organization. The binding method is necessarily language-dependent: Note that the language assumed here is FORTRAN.

Part I: Graphical Model

Graphical Model

Part II: Objects and Attributes

1. REGION (R)

Region ( Region Name, Length, Start Address )

Identifiers:
Region Name

The region object models the global shared region (shared memory construct) of the operating system.

1.1. Region.Region Name

Each global shared region which is generated is given a unique name by which it is known to the operating system. The region name attribute records this unique identifier of a global shared region.

Domain: Any legal global shared region name (operating system dependent, typically 1-6 alphanumeric characters).

1.2. Region.Length

The length of the global shared region in words.

Domain: Operating system dependent, typically, a positive multiple of 256.

1.3. Region.Start Address

The address in physical memory of the lowest-addressed word in the global shared region. [Mention here any operating system constraints, such as: This address lies on a page boundary.]

Domain: Machine and operating system dependent.

2. COMMON BLOCK (CB)

Common Block ( Common Block Name, Length, Start Address, Region )

Identifiers:
Common Block Name

The Common Block object models the "COMMON block within a global shared region" construct of the operating system/link-editor.

2.1. Common Block.Common Block Name

A FORTRAN COMMON block is known to the link-editor by its name—the 1- to 6-character alphanumeric "label" of a labelled COMMON block.

Domain: FORTRAN COMMON block names.

2.2. Common Block.Length

The length of the COMMON block in words. The lengths are defined to be thoses acceptable to the link-editor: The lengths must be such that when taken together with the start addresses, no overlap occurs.

Domain: word count

2.3. Common Block.Start Address

The address within the global shared region of the lowest-addressed word of the COMMON block.

Domain: physical word address

2.4. Common Block.Region (R)

The name of the global shared region that contains the COMMON block. This attribute implements the relationship Region CONTAINS Common Block.

Domain: Same as Region.Region Name

References:
Region.Region Name (across R1)

3. ALLOCATION BLOCK (AB)

Allocation Block ( Data Type, Element Width, Permitted Access, Common Block Name, Index of First Unused Word )

Identifiers:
Data Type + Element Width + Permitted Access

An allocation block is a unit of contiguous physical storage used to contain columns which are alike in certain ways: they are of the same FORTRAN data type, they require physical storage of the same granuarity, and they require the same protection from destruction. The Allocation Block object models this implementation unit of the control system architecture.

3.1. Allocation Block.Data Type

The FORTRAN data type of all data stored in this allocation block.

Domain: real, integer, character, logical

3.2. Allocation Block.Element Width

The size, in bytes, of the smallest element of data stored in this allocation block. This width is the measure of granularity for the block: how finely this block can be divided from the application's point of view. The element width does not take into account boundary alignment problems; that is, the element width of a character is 1, not 2.

Domain: byte count

3.3. Allocation Block.Permitted Access

The type of data access (reads and writes) allowed for the data in this allocation block. The permitted access attribute applies only to programs that have not been given special write access permissions.

Domain: read only, read and write

3.4. Allocation Block.Common Block Name (R)

Each allocation block of the system architecture is implemented via a COMMON block. This architectural world relationship is modeled by the Common Block Name attribute, which records the name of the COMMON block.

Domain: Same as Common Block.Common Block Name

References:
Common Block.Common Block Name (across R2)

3.5. Allocation Block.Index of First Unused Word

Columns are placed in the allocation block starting at the lowest numbered address of the block. This attribute records where the next column vector to be allocated may be placed. Note that this is a FORTRAN index: It starts at 1 and advances by 1 for each separately addressable element of the allocation block.

Domain: physical address

4. TABLE (T)

Table ( Long Table Name, Short Table Name, Number of Rows, Number of Rows in Use )

Identifiers:
Short Table Name

All data in this system is perceived to be stored in tables consisting of rows and columns. A relational view has been imposed on the data. The Table object models these tables.
Note: The Table table is frequently called the "Table of tables"—an uncommon construction—to clarify descriptions.

4.1. Table.Long Table Name

Each table has been assigned a name indicative of the world object it models. Note that this is a name, rather than a description. Legal long table names consist of as many as 30 alphanumeric characters.

Domain: See above

4.2. Table.Short Table Name

Each table in the system is assigned a unique two-character name for purposes of identification. This short table name is an identifier for the Table object.

Domain: See above

4.3. Table.Number of Rows

The number of rows allocated for the table. Each column that belongs to the table is allocated sufficient physical storage to contain exactly this number of elements.

Domain: row count

4.4. Table.Number of Rows in Use

Only a subset of the rows allocated for a table need be in use at any given time. This attribute records the count of rows in use.

Domain: row count

5. COLUMN (C)

Column ( FORTRAN Variable Name, Column Name, Table Name, Elements in Data Item, Data Type, Element Width, Permitted Access, Storage Width, Start Index )

Identifiers:
FORTRAN Variable Name

The data in this control system is perceived to be stored in tables made up of rows and columns. Physical storage of the data is based on the columns of these tables. The Column object models the column vector, the fundamental storage construct for columns.

The Column table is referred to as the "Table of Columns," to parallel the "Table of tables" terminology.

5.1. Column.FORTRAN Variable Name

Every column in the system has been assigned a unique 6-character name for purposes of direct access via FORTRAN. This name is a FORTRAN variable name (composed of letters and numbers only; the initial character is alphabetic); in addition, a number of conventions, described in the programming standards document for this project, rule the selection of the initial character of the name.

This attribute is an identifier for the Column object.

Domain: See above

5.2. Column.Column Name

Associated with each column is a descriptive name, consisting of as many as 30 alphanumeric characters.

Domain: See above

5.3. Column.Table Name (R)

The name of the table to which this column belongs. This attribute implements the Table IS COMPOSED OF Columns relationship.

Domain: Same as Table.Short Table Name

References:
Table.Short Table Name (across R4)

5.4. Column.Elements in Data Item

Associated with the intersection of a row and a column of a table is a certain amount of data, known as a data item. The data item may be simple (a single real number, or a character, for example) or more complex: a string of characters or a matrix of reals. An element is the smallest nondivisible unit of data contained in the data item.

This attribute gives the number of elements contained in each data item.

Domain: element count

5.5. Column.Data Type (R)

The FORTRAN data type of elements in this column vector. This attribute, together with Column.Element Width and Column.Permitted Access, implements the relationship Column IS STORED IN Allocation Block.

Domain: Same as Allocation Block.Data Type

References:
Allocation Block.Data Type (across R3)

5.6. Column.Element Width (R)

The size, in bytes, of a single element.

Domain: Same as Allocation Block.Element Width

References:
Allocation Block.Element Width (across R3)

5.7. Column.Permitted Access (R)

The type of data access (reads and writes) allowed for the column vector. The permitted access attribute applies only to programs to which special access rights have NOT been granted (that is, it applies to non-privileged programs only).

Domain: Same as Allocation Block.Permitted Access

References:
Allocation Block.Permitted Access (across R3)

5.8. Column.Storage Width

The number of bytes required to store a single data item (all of the data associated with the intersection of one row with this column). The storage width takes into account the FORTRAN boundary alignment rules, and hence is always an even number.

Domain: byte count

5.9. Column.Start Index

The index, within an allocation block, of the first element of the column vector. This is a FORTRAN index: It starts with one and advances by one for each separately addressable unit of data in the allocation block.

Domain: FORTRAN index

Part III: Relationships

R1.Region CONTAINS Common Block (1:Mc)
Common Block IS CONTAINED IN Region

A global shared region can contain zero, one, or many COMMON blocks, while every COMMON block must be contained in one global shared region. This is a one-to-many conditional relationship (1:Mc). This relationship is reflected in the model by the attribute Common Block.Region, the domain of which is the same as that of Region.Region Name.

Formalization:
Common Block.RegionRegion.Region Name

R2.Common Block MAY BE AN Allocation Block (1:1c)
Allocation Block IS A Common Block

Each allocation block of the data architecture is implemented via a COMMON block. This relationship is reflected in the attribute Allocation Block.Common Block Name. Note that the relationship is conditional, reflecting the fact that there may be comon blocks in the shared memory which are NOT allocation blocks. (These common blocks are used for system functions unrelated to the data architecture.)

Formalization:
Allocation Block.Common Block NameCommon Block.Common Block Name

R3.Allocation Block STORES Column (1:M)
Column IS STORED IN Allocation Block

The STORES/IS STORED IN relationship is implemented by means of the attributes Column.Data Type, Column.Element Width, and Column.Permitted Access, which form a foreign key to the allocation block table.

Formalization:
Column.Data TypeAllocation Block.Data Type
Column.Element WidthAllocation Block.Element Width
Column.Permitted AccessAllocation Block.Permitted Access

R4.Table IS COMPRISED OF Column (1:M)
Column IS CONTAINED IN Table

The IS COMPRISED OF/IS CONTAINED IN relationship is implemented by the Column.Table Name attribute, which is a foreign key to the Table of tables.

Formalization:
Column.Table NameTable.Short Table Name