Method and apparatus for performing conditional operations on externally shared data5742830Abstract A Structured External Storage (SES) processor is linked by a communication means to one or more general purpose processors. Two or more applications executing on the one or more general purpose processors communicate function request messages to a message processor within the SES to effect serialized sharing of data within the SES. Within the message processor, a predicate function means executes unconditionally on receipt of one of the function request messages, and a data function means executes conditionally and atomically with respect to the predicate function means following a "successful" condition produced by the predicate function means. The predicate function means comprises a predicate compare function means and a predicate update means, the predicate compare function means executing unconditionally and producing a "successful" or "unsuccessful" result, the predicate means executing conditionally and atomically with respect to the predicate compare function means, following a "successful" result by the predicate update compare function means. Claims The invention claimed is: Description CROSS REFERENCE TO RELATED APPLICATIONS
______________________________________
Fixed Global Controls Acronym
______________________________________
SID limit SL
Total control space TCS
______________________________________
The program-modifiable global controls are summarized in the following table.
______________________________________
Program-Modifiable Global Controls
Acronym
______________________________________
Free control space FCS
Free space FS
SID vector SV
Total space TS
______________________________________
Free Control Space (FCS) An object or field that specifies the amount of control stroage which has not yet been assigned and is available for assignment to a structure. The free-control-space value is initialized to the same value as the total-control-space value. Free Space (FS) An object or field that specifies the amount of storage which has not yet been assigned and is available for assignment to a structure. The free-space value is initialized to the same value as the total-space value and represents the largest structure size that may be allocated in the SES facility. SID Limit (SL) An object or field that specifies the maximum supported SID value. SID Vector (SV) An object or field that specifies the assigned SIDs. Total Control Space (TCS) An object or field that specifies the amount of storage defined in the SES control storage and available for the allocation of control objects for a structure. Total Space (TS) An object or field that specifies the amount of storage defined in the SES storage and available for the allocation of structures.
______________________________________
List Limits Acronym
______________________________________
List-number limit LNL
Lock-table-entry-characteristic limit
LTEXL
User-identifier limit UIDL
______________________________________
List-Number Limit (LNL) An object or field that specifies the maximum list number. Lock-Table-Entry-Characteristic Limit (LTEXL) An object or field that specifies the maximum size of a lock-table entry. User-Identifier Limit (UIDL) An object or field that specifies the maximum user identifier. The maximum-user-identifier value is the maximum number of list-structure users and list-notification vectors that can be attached to each list structure. SES List Structure A list structure consists of list-structure controls, user controls, and either a lock table, or a list set with list controls and list-entry controls, or both. Each lock table consists of a sequence of one or more entries, which are numbered consecutively starting at zero. The list-structure type and lock-table-entry characteristic determines whether all the lock-table entries have a global-lock-manager object, a local-lock-managers object, or both. The list-structure controls are initialized when the list structure is created. The list-structure controls contain the structure size, list-structure type, lock-table-entry count, nonzero-lock-table-entry count, lock-table-entry size, list count, list-element size, maximum data-list-entry size, maximum list-set-entry count, list-set-entry count, maximum list-set-element count, list-set-element count, user-identifier vector and user-structure controls. The user controls are created and initialized when a list-structure user is attached. The user controls contain a list-notification token, system identifier, and user-attachment control. Each list set consists of one or more lists, which are numbered consecutively starting at zero. There are list controls associated with each list. The list controls contain a list-entry count or list-element count, a list-entry-count limit or list-element-count limit, a list-monitor table, a list-state-transition count, and a user list control. Each list consists of a sequence of zero or more entries. The list-structure type determines whether all the list entries in the list set have a data list entry, an adjunct list entry, or both. There are list-entry controls associated with each list entry. The controls contain list-entry-location information, a data-list-entry size, and a version number. LIST STRUCTURE OBJECTS List Structure (111) The possible list-structure objects consist of: (Reference numbers are to FIG. 2.) List-structure controls 201 User controls 210 List controls 314 List-entry controls 315 Lock table 205 List set 202 List-Structure Controls The fixed list-structure controls are initialized when the list structure is created and remain unchanged until it is deallocated. The program-modifiable list-structure controls are initialized when the list structure is created. The program-modifiable control values may be changed by SES commands. The fixed list-structure controls are summarized in the following table. (Those that are key to the present invention are shown in FIG. 2.)
______________________________________
Fixed List-Structure Controls
Acronym
______________________________________
List count LC
List-element characteristic
LELX
List-structure type LST
Lock-table-entry characteristic
LTEX
Lock-table-entry count LTEC
Maximum data-list-entry size
MDLES
Maximum list-set-element count
MLSELC
Maximum list-set-entry count
MLSEC
Structure size SS
______________________________________
The program-modifiable list-structure controls are summarized in the following table.
______________________________________
Program-Modifiable List-Structure Controls
Acronym
______________________________________
List-set-element count LSELC
List-set-entry count LSEC
Nonzero-lock-table-entry count
NLTEC
User-identifier vector UIDV
User-structure control USC
______________________________________
Note that in the definition of the terms below, the convention "<aaa"> is used in many of the figure references for defined terms. The arrow brackets "< >" indicate list structure usage of the defined term as a response operand on a list structure command. The "aaa" is the block number reference in the drawings attached to this specification. (2XX indicates FIG. 2; 3XX indicates FIG. 3; 4XX indicates FIG. 4; etc.) List Count (LC): 211 433 <488> An object or field that specifies the number of lists created. List-Element Characteristic (LELX): 462 <485> An object or field that specifies the number of bytes in each list element. List-Set-Element Count (LSELC): <490> An object or field that specifies the number of list elements that have been assigned to list entries or retry-data blocks, or both, in the list set. List-Set-Entry Count (LSEC): <492> An object or field that specifies the number of existing list entries in the list set. List-Structure Type (LST): 204 447 <483> A object or field that indicates the list objects created on allocation. A field contains a counter indicator (CI), a lock indicator (LI), a data indicator (DI), an adjunct indicator (AI), a name indicator (NI), and a key indicator (KI). The counter indicator specifies that either: a list-entry count and list-entry-count limit are defined or a list-element count and list-element-count limit are defined. The lock indicator specifies whether or not a lock table is created. The data and adjunct indicators specify whether: no list set is created, list entries have adjunct only, list entries have data only, or list entries have data and adjunct in the list entries. The name indicator specifies whether or not list entries are named. The key indicator specifies whether or not the list entries are keyed. Lock-Table-Entry Characteristic (LTEX): 425 <484> An object or field that specifies the number of bytes in each lock-table entry. Lock-Table-Entry Count (LTEC): 427 <487> An object or field that specifies the number of lock-table entries allocated. Maximum Data-List-Entry Size (MDLES): 437 <4B3> An object or field that specifies the maximum size of the data list entry. Maximum List-Set-Element Count (MLSELC): <481> An object or field that specifies the maximum number of list elements that are available for assignment to list entries or retry-data blocks, or both, in the list set. Maximum List-Set-Entry Count (MLSEC): <480> An object or field that specifies the maximum number of possible list entries in a list set. Nonzero-Lock-Table-Entry Count (NLTEC): <491> An object or field that specifies the number of nonzero lock-table entries that exist in the structure. Structure Size (SS): 466 <482> An object or field that specifies the amount of storage allocated. User-Identifier Vector (UIDV): <495> An object or field that specifies the assigned UIDs. User Structure Control (USC): 467 <494> A field per structure defined by the user. User Controls (210) The user controls are created and initialized when a list-structure user is assigned and are deleted when the list-structure user is unassigned. The user controls are summarized in the following table.
______________________________________
User Controls Acronym
______________________________________
List-notification token
LNT
System identifier SI
User-attachment control
UAC
______________________________________
List-Notification Token (LNT): 441 A value that specifies a list-notification vector to the system. System Identifer (SI); <456> 605 termed LNSID System Identifier (SI): <456>605 termed LNSID A value specified by the program when a message path is activated. The system identifier is maintained in the message-path status vector and copied into the user controls when an attach-list-structure-user command is communicated over the message path. User-Attachment Control (UAC): 475 <499> A field per attached user defined by the user. List Controls (314) There is a list-controls object for every list created in a list structure. All the list controls except the list-entry-count limit and the list-element-count limit are initialized to zero when the list structure is created. The list controls are summarized in the following table. (Significant controls are illustrated in FIG. 3.)
______________________________________
List Controls Acronym
______________________________________
List-element count LELC
List-element-count limit
LELCL
List-entry count LEC
List-entry-count limit LECL
List-monitor table LMT
List-state-transition count
LSTC
User list control ULC
______________________________________
List-element Count (LELC): 312 <4B2> An object or field that specifies the number of list elements currently in the list. List-Element-Count Limit (LELCL): 313 4AA <4B4> An object or field that specifies the maximum number of possible list elements in a list. This object is initialized to the maximum list-set-element count when a list structure is created. List-Entry Count (LEC): 301 <446> An object or field that specifies the number of list entries currently in the list. List-Entry-Count Limit (LECL): 303 469 <459> An object or field that specifies the maximum number of possible list entries in a list. This object is initialized to the maximum list-set-entry count when a list structure is created. List-State-Transition Count (LSTC): <4B1> An object or field that specifies the number of empty to not-empty list-state transitions that have occurred. User List Control (ULC): 472 <497> A field per list defined by the user. List-Monitor Table (316) The list-monitor table contains information used to process the list-notification vector of each user who has registered interest in the state transitions of the list. The list-monitor table is a sequence of objects, called list-monitor-table entries. The number of list-monitor-table entries is determined when the table is created and is equal to the maximum number of list-structure users. The list-monitor-table entries are numbered from zero to the user-identifier limit. Each list-monitor-table entry has a list-monitoring-active-bit object, a list-notification-request-type object and a list-notification-entry-number object. List-Monitoring-Active Bit (LMAB): 608 An object or field that specifies whether the user associated with the list-monitor-table entry is monitoring the list-state transitions of the list. When a user is not monitoring a list, all previously issued list-notification commands on behalf of the associated user for this list are complete. List-Notification-Request Type (LNRT): 445 602 An object or field that indicates whether the list-notification-vector summaries are to be updated when an empty to not-empty state transition occurs on a monitored list. List-Notification-Entry Number (LNEN): 442 603 An object or field that specifies a list-notification-vector entry. List-Entry Controls (315) There is a list-entry-controls object for every list entry within a structure. The list-entry controls are initialized when a list entry is created and are deleted when the list entry is deleted. The list-entry controls are summarized in the following table.
______________________________________
List-Entry Controls Acronym
______________________________________
Data-list-entry size DLES
List-entry identifier LEID
List-entry key/list-entry name
LEK/LEN
List number LN
Version number VN
______________________________________
Data-List-Entry Size (DLES): 317 436 <451> An object or field that specifies the size of the data list entry. List-Entry Identifier (LEID): 308 404 <410> An object or field that designates the list entry. A list-entry identifier is unique to a list set and is assigned by the SES. List-Entry Key (LEK): 311 428 <449> An object or field that partially designates the position of the list entry in the list. List-Entry Name (LEN): 310 405 <448> An object or field that fully designates the position of the list entry in the list set. A list-entry name is unique to a list set at any particular instant and is provided by the program. List Number (LN): 305 423 <430> An object or field which designates the list that the list entry is in. Version Number (VN): 304 411 <408> An object or field that is conditionally compared and conditionally updated. The version number is initialized to zero when a list entry is created. Lock Table (205) The lock table is a sequence of objects, called lock-table entries <455>. The number of lock-table entries is determined when the table is created. The lock-table entries are numbered from zero to the lock-table-entry count less one. For a specific lock table, the entries have one size which is a power of 2 in the range of 1 to the maximum lock-table-entry size. The size of the largest lock table is limited by the free space and the size of all the controls required to support the list structure. Each lock-table entry <455> has a global-lock-manager (GLM 207) object and an optional local-lock-managers (LLM 208) object. A lock-table entry whose size is one byte has only a global-lock-manager object. When a lock-table-entry size is greater than one byte, the leftmost byte is the global-lock-manager object, and the remaining bytes form the local-lock-managers object. Lock tables with an entry size of one byte do not support local-lock managers. Lock tables with an entry size of at least two bytes do support local-lock managers. The global-lock-manager object of a lock-table entry contains a field called a user identifier. The local-lock-managers object of a lock-table entry contains a string of local-lock bits, where each bit represents a user identifier. The lock-table objects have a value of zero when the table is allocated and may be modified by subsequent commands. List Set (202) The list set is a sequence of objects, called lists. The number of lists is determined when a list set is created. The lists are numbered from zero to the list count less one. List (109) A list is a sequence of objects, called list entries (302). The number of possible entries is determined when the list structure is created. A list entry may also act as a retry-data block. The relative position of a list entry in the sequence is determined when the entry is created and may be changed when any list entry is created, deleted, or moved. A list entry is located by means of a list-entry identifier, list-entry name, or by position. The size of the largest list is limited by the free space and the size of all the controls required to support the list structure. A list entry has up to two objects: a data list entry (306) and an adjunct list entry (309) 434 <4A1>, depending on the list-structure type. A data-list entry consists of from one to MDLES list elements. The data-list-entry size is determined when the data-list entry is written. The adjunct-list-entry size is static. A list entry exists when it is created and ceases to exist when it is deleted. LIST STRUCTURE OPERANDS The storage objects and processes are accessed using commands issued by the program. Each list-structure command has three parts: A message-command block containing: Message header Request operands Reserved area A message-response block containing: Response descriptor Response operands Reserved area An optional data block, depending on the command The command descriptions contain the formats of the message-command blocks, message-response blocks, and data blocks. This section defines the list-structure operands, except for those operands that are also objects. Operands that are also objects can be found under "Global Objects" or "List Structure Objects", with a FIG. 4 reference number beside them (indicating their use as either request or response operands). Comparative Global-Lock Manager (CGLM): 415 A value that is compared to the global-lock-manager object. Comparative Version Number (CVN): 421 A value that is compared to the version-number object. Current Data Index (CDI): <4B0> A value that indexes to the current list-entry name or list-entry identifier in the data block for the delete-list-entries command. Data-Block Size (DBS): 4A3 A value that specifies the size of the data block. Delete-Entries-Locator Type (DELT): 440 <4A6> A value that indicates whether a list entry is located by list-entry identifier or list-entry name and whether or not the list numbers are compared for the delete-list-entries command. Delete-List-Entries Count (DLEC): <4A7> A value that specifies the number of deleted list entries. Direction (DIR): 406 A value that indicates how the positions of the list entries are numbered relative to a designated position. The direction is either left to right, or right to left. Entry-to-Element Ratio (ETELR): 461 <486> A field consisting of two unsigned binary integers that specify the target for the relative number of list entries to list elements possible in the list set. The integer specified in the first field divided by the sum of the two numbers represents the fraction of the total of the maximum list-set-element and the maximum list-set-entry count that consists of list entries. The integer specified in the second field divided by the sum of the two numbers represents the fraction of the total of the maximum list-set-element and the maximum list-set-entry count that consists of list elements associated with data list entries and retry-data blocks. Ending Data Index (EDI): 4A9 A value that indexes to the last list-entry name or list-entry identifier in the data block for the delete-list-entries command. Entry-Locator Type (ELT): 429 A value that indicates how a list entry is located for a read, replace, or delete operation, or as the source of a move operation, and whether list-number comparison is requested. The list entry is located by list-entry identifier, list-entry name, unkeyed position or keyed position. For a create or the target of a move operation, the target list-entry position is located by keyed position when the entries are keyed, or by unkeyed position when the entries are not keyed. Key-Request Type (KRT): 439 A value that indicates how a keyed list entry is located when an entry is replaced, moved, read or deleted. The type determines the relationship between the list-entry-key object and the list-entry-key operand. 00 Equals list-entry-key operand 01 Less than or equal to the list-entry-key operand 10 Greater than or equal to the list-entry-key operand 11 Invalid The key-request type is ignored when the entry-locator type is ignored or when the entries are not located by list-entry key. List-Control Type (LCT): 468 The list-control type specifies either (1) the list-element-count or list-entry-count limit is written, depending on the counter indicator or (2) the user list control, both or neither are written. List-Entry Type (LET): 435 A value that indicates whether data list entries, adjunct list entries, or both are read or replaced upon normal completion of the command execution. Local-Lock Managers (LLM): 416 A value which identifies users with local interest in the lock-table entry. Local-Lock Bit (LLB): 413 A value that is written to a local-lock manager. Lock-Request Type (LRT): 412 A value that indicates the type of lock request. The lock request type specifies (1) that No lock process is requested, (2) to compare the global-lock managers, (3) to replace the global-lock manager, (4) to replace a local-lock manager, (5) to replace the global-lock and local-lock managers. Lock-Table-Entry Number (LTEN): 414 <431> A value that specifies an entry in a lock table. Move-Entry-Locator Type (MELT): 479 A value that indicates which key is used when a keyed list entry is moved. The move-entry-locator type specifies whether The target key is the LEK in the list entry or the TLEK in the MCB. Read-List-Entries Count (RLEC): <4A2> A value that specifies the number of list entries read. Read-List Type (RLT): 4AB A value that indicates whether list-entry controls, data, list entries, adjunct list entries, or any combination are read upon normal completion of the command execution. Response Code (RC): 407 The response code indicates the result of executing a list command. Restart Token (RT): 4A4 <4A5> A value that controls the reading or deleting of list entries on the read-list-set and delete-list-set commands. Retry Index (RX): 4AC A VALUE that designates either a particular retry buffer or none. Retry Version Number (RVN): 4AD <4A0> A value that specifies the version number stored in the retry buffer. Starting Data Index (SDI): 4A8 A value that indexes to the first list-entry name or list-entry identifier in the data block for the delete-list-entries command. Target Direction (TDIR): 478 A value that indicates how the positions of the list entries are numbered relative to a designated target position for a moved list entry. The target direction is either left to right or right to left. Target List-Entry Key (TLEK): 452 A value that partially specifies the targeted position to which a list entry is moved. Target List Number (TLN): 453 A value that designates the list to which a list-entry is moved. User Identifier (UID): 418 <419> A value that identifies a user. When the lock-request type specifies global-lock-manager and local-lock-managers replacement, the user identifier specifies a global-lock manager. When the lock-request type specifies global-lock-manager replacement, the user identifier specifies a global-lock manager and, when local-lock managers exist, it also specifies a local-lock manager. When the lock-request type specifies local-lock-manager replacement, The user identifier specifies a local-lock manager. Version-Request Type (VRT): 422 A value that indicates the type of version-number request to (1) compare the version numbers or (2) to increment, decrement, or replace the version number, or both, or neither. Write-Request Type (WRT): 420 A value that indicates the type of write request. The writer-request type specifies (1) to replace a list entry, (2) to Create a list entry, or (3) to replace or create a list entry. LIST STRUCTURE PROCESSES The following processes may be invoked by the SES list-structure commands. The set of processes invoked by a command are listed in the command description. Allocating a List Structure The user structure control is updated on the allocate-list-structure command. A list structure is created on the first successful invocation of the allocate-list-structure command for a structure that does not already exist. A list structure is initially allocated after one or more successful invocations of the allocate-list-structure command. These operations are referred to generically as list-allocation processes. Creating a List Structure When a list structure is created, the list-structure type determines the attributes of the created structure. The list-structure type has indicators for each of the following: counters, locks, data, adjunct, name, and key. When the counter indicator in the list-structure type specifies that the list-entry count and list-entry-count limit are defined and allocation is successful, the list controls for each list contain a list-entry count and a list-entry-count limit. When the counter indicator in the list-structure type specifies that the list-element count and list-element-count limit are defined and allocation is successful, the list controls for each list contain a list-element count and a list-element-count limit. When the lock indicator in the list-structure type specifies that a lock table is created and allocation is successful, a lock table is created with a width as specified by the lock-table-entry characteristic and a length as specified by the lock-table-entry count. When the data indicator in the list-structure type specifies that list entries have data and allocation is successful, storage is allocated for the creation of list elements. The size of the list elements is specified by the list-element characteristic. When the adjunct indicator in the list-structure type specifies that list entries have adjunct and allocation is successful, each list entry created in the structure has an adjunct list entry. When the name indicator in the list-structure type specifies that the list entries have names and allocation is successful, each list entry created in the structure has a list-entry name associated with it. When the key indicator in the list-structure type specifies that the list entries have keys and allocation is successful, each list entry created in the structure has a list-entry key associated with it. When a list structure is created, (1) the free-space and free-control-space global controls are updated, (2) the appropriate field in the structure-identifier vector is set, and (3) the list-structure and list controls are initialized. Deallocating a List Structure When a list structure is deallocated, the storage is freed, the free-space and free-control-space global controls are updated, the appropriate field in the structure-identifier vector, and all the list-monitoring-active objects are reset. Attaching a List-Structure User A list-structure user is attached by means of the attach-list-structure-user command. When a list-structure user is attached, the user controls are initialized, the appropriate field in the user-identifier vector is updated, and the user is placed in the attached state. Detaching a List-Structure User A list-structure user is detached after one or more successful invocations of the detach-list-structure-user command. When a list-structure user is detached, the list-monitoring-active object has been updated in all the list-monitor-table entries associated with the user. The user controls are deleted and the assigned field in the user-identifier vector is updated. The list-monitoring-active bit is updated only after all list-notification commands issued to the associated list and user are complete. Comparing Global-Lock Managers Global-lock-manager comparison always occurs before a lock-table entry is written or may occur before a list entry is created, replaced, read, moved or deleted, depending on the command and lock-request type. The global-lock-manager object is compared with the comparative-global-lock manager specified. When they match, the global-lock-manager comparison succeeds, and the command continues. When they do not match, the global-lock-manager comparison fails, and an indicative response code is returned. Comparing Local-Lock Managers Local-lock-manager comparison may occur before a lock-table entry is written or before a list entry is created, replaced, read, moved or deleted, depending on the command code and lock-request type. There are two lock-request types that cause local-lock-manager comparison: global-lock-manager replacement, and local-lock-manager replacement. When a local-lock-manager object exists and a global-lock-manager replacement is requested, the local-lock-manager-object value is ANDed with a mask of all ones except for the local-lock bit corresponding to the user identifier specified. This ANDed value is then compared with zero. When they match, the local-lock-manager comparison succeeds. When they do not match, the local-lock-manager comparison fails. When a local-lock-manager object exists and a local-lock-manager replacement is requested, the local-lock bit corresponding to the user identifier specified is compared with the local-lock-bit value specified. When they match, the local-lock-manager comparison fails. When they do not match, the local-lock-manager comparison succeeds. When the local-lock-manager comparison fails, an indicative response code is returned. Writing a Lock-Table Entry One or both of the objects contained within a lock-table entry may be replaced, depending on the lock-request type specified. A global-lock manager may be replaced when a lock-request type specifies to replace the global-lock-manager or to replace the global-lock and local-lock managers and the global-lock-manager comparison succeeds. One or more local-lock managers are replaced when a lock-request type specifies to replace a local-lock-manager or to replace the global-lock and local-lock managers and the global-lock-manager comparison succeeds. Replacing a Global-Lock Manager The global-lock-managers are compared and the local-lock-managers may be compared when global-lock-manager replacement is requested. When the global-lock-manager comparison succeeds, the global-lock manager may be replaced with the user identifier specified, regardless of whether or not the local-lock-manager comparison succeeds. Replacing a Local-Lock Manager The global-lock-managers and local-lock-managers are compared when local-lock-manager replacement is requested. When the global-lock-manager comparison succeeds, the local-lock bit corresponding to the user identifier specified may be replaced with the local-lock-bit value specified, regardless of whether or not the local-lock-manager comparison succeeds. Replacing the Global-Lock and Local-Lock Managers The global-lock-managers are compared when global-lock and local-lock-managers replacement is requested. When the global-lock-manager comparison succeeds, the global-lock manager may be replaced with the user identifier specified and the local-lock managers are replaced with the local-lock managers specified. Locating a List Entry or List-Entry Position The designated list entry is the first entry relative to the designated position before an entry is deleted, when an entry is read, replaced or moved, or after an entry is created. The designated position is specified (1) by an unkeyed position, (2) by a keyed position, (3) by a list-entry identifier, or (4) by a list-entry name, depending on the entry-locator type specified and the type of structure allocated. A list entry is located by unkeyed position when an entry-locator type specifies locate by unkeyed position or an unkeyed list entry is created or moved; that is, the designated position is specified by means of a list number and a direction. A list entry is located by keyed position when the list entries are keyed and an entry-locator type specifies locate by keyed position or a keyed list entry is created or moved; that is, the designated position is specified by means of a list number, direction, and a list-entry key. A list entry is located by list-entry identifier when an entry-locator type specifies locate by list-entry identifier; that is, the designated position is the position of the identified list entry. A list entry is located by list-entry name when the list entries are named and an entry-locator type specifies locate by list-entry name; that is, the designated position is the position of the named list entry. A list entry has a position relative to the designated position. When a list entry is created, moved, or deleted, the relative positions of the successive list entries are changed. In these cases, the first entry is the designated list entry and successive entries are determined by the direction specified. Regardless of how a list entry is located, when a left-to-right direction is specified, the last entry is the rightmost entry in the list, and when a right-to-left direction is specified, the last entry is the leftmost entry in the list. When a list entry is located by list-entry identifier, the designated list entry is the identified list entry. When a list entry is located by list-entry name, the designated list entry is the named list entry. When a list entry is located by unkeyed position and a left-to-right direction is specified, the designated list entry is the leftmost entry in the list. When a list entry is located by unkeyed position and a right-to-left direction is specified, the designated list entry is the rightmost entry in the list. When (1) a list entry is located by keyed position, (2) entry deletion, read, replacement or movement is requested, (3) a list entry with an equal key, a less than or equal key, or a greater than or equal key, exists on the list, depending on the key-request type, and (4) a left-to-right direction is specified, then the designated source list entry is the leftmost entry with a key equal, with the largest key less than or equal, or with the smallest key greater than or equal to the specified list-entry-key request operand. When (1) a list entry is located by keyed position, (2) entry deletion, read, replacement or movement is requested, (3) a list entry with an equal key, a less than or equal key, or a greater than or equal key, exists on the list, depending on the key-request type, and (4) a right-to-left direction is specified, then the designated list entry is the rightmost entry with a key equal, with the largest key less than or equal, or with the smallest key greater than or equal to the specified list-entry-key request operand. When (1) a list entry is located by keyed position, (2) entry creation or movement is requested, (3) a list entry with an equal key exists on the list, (4) a left-to-right direction is specified, then the designated target position is the position of the leftmost entry with the same key. When (1) a list entry is located by keyed position, (2) entry creation or movement is requested, (3) a list entry with an equal key exists on the list, (4) a right-to-left direction is specified, then the designated target position is the position of the rightmost entry with the same key. When (1) a list entry is located by keyed position, (2) entry creation or movement is requested, and (3) all entries on the list have a key greater than the specified key, the designated target position is the leftmost position in the list. When (1) a list entry is located by keyed position, (2) entry creation or movement is requested, (3) at least one list entry on the list has a key less than the specified key, and (4) there is no list entry in the list that matches the specified key, then the designated target position is the first position after the rightmost entry with a key less than the specified list-entry key in the list. When a list entry is located by list-entry identifier or by list-entry name, the designated position exists when the list entry exists. When a list entry is located by unkeyed position, the designated position exists when the list exists. When a list entry is located by keyed position and entry creation or movement is requested, the designated target position exists when the list exists. When a list entry is located by keyed position and entry creation is not requested, the designated position exists when a list entry in the list has a key that is equal, greater than or equal, or less than or equal to the specified list-entry key in the list, depending on the key-request type. When the designated position does not exist, an indicative response code is returned. Comparing List Numbers When the of the entry-locator type specifies list-number comparison and a list entry is not created, a list-number comparison is requested. When list-number comparison is requested, the list-number object is compared with the list number specified. If they do not match, the list-number comparison fails, and an indicative response code is returned. Comparing Counts There are three sets of counts that are compared, depending on the process requested: the list-set-entry counts, the list-set-element counts, and the list entry counts or list-element counts, depending on the count indicator. Comparing List-Element Counts The list-element-count-limit object is compared with the list-element-count operand whenever a list entry is written or moved and the count indicator in the list-structure type is one. If the sum of the list-element count and the number of additional list elements required exceeds the list-element-count limit, the list is full. When the list is full and a write or move operation is requested, an indicative response code is returned. The list-element-count limit or list-entry-count limit is updated on a write-list-controls command, depending on the list-control type. Comparing List-Entry Counts The list-entry-count-limit object is compared with the list-entry-count operand whenever a list entry is created or moved and they exist. A list is full when the number of list entries created matches or exceeds the list-entry-count limit. When the list is full and a create or move operation is requested, an indicative response code is returned. Comparing List-Set-Element Counts The maximum list-set-element-count object is compared with the list-set-element-count object whenever a data list entry is written. If the sum of the list-set-element count and the number of additional list elements required exceeds the maximum-list-set-element count, the list set is full. When the list set is full, and list-entry creation or retry-data block creation is requested, an indicative response code is returned. Comparing List-Set-Entry Counts The maximum list-set-entry-count object is compared with the list-set-entry-count object whenever a list entry is created. A list set is full when the number of list entries created and not deleted matches the maximum list-set-entry count. When a list set is full and list-entry creation or retry-data block creation is requested, an indicative response code is returned. Updating Counts There are three types of counts that are updated, depending on the process requested: the list-set-entry count, the list-set-element count, and the list-entry count or list-element count, depending on the count indicator. Updating the List-Element Counts The list-element counts are updated whenever a list entry is created, deleted, or moved to another list or replaced and the number of list elements associated with the list entry is changed or a retry-data block is created or deleted. When the list entry is also the retry-data block, the count is at most incremented or decremented by the number of list elements associated with the list entry. Updating the List-Entry Counts The list-entry counts are updated whenever they exist and a list entry is created, deleted, or moved to another list. Updating the List-Set-Element Count The list-set-element count is updated whenever a list entry is created, deleted, or replaced and the number of list elements associated with the list entry is changed or a retry-data block is created or deleted. When the list entry is also the retry-data block, the count is at most incremented or decremented by the number of list elements associated with the list entry. Updating the List-Set-Entry Count The list-set-entry count is updated whenever a list entry is created or deleted. Comparing Version Numbers Version numbers may be compared when an entry is replaced, read, moved, or deleted, depending on the version-request type specified. When a version-request type specifies to compare the version numbers, the version-number object is compared with the comparative-version-number request operand. When they match, processing continues. When they do not match, the version-number comparison fails, and an indicative response code is returned. Updating a Version Number A version number may be updated when an entry is created, replaced, read, or moved, depending on the version-request type specified. When a version-request type of specifies to decrement the version number, the version number is decremented by one. When a version-request type specifies to increment the version number, the version number is incremented by one. When a version-request specifies to replace the version number, the version-number object is set to the version-number request operand. Writing a List Entry A list entry may be written on a write-list-entry or a write-and-move-list-entry command. A list entry is written when an entry is created or replaced. When a list entry is created, the data and adjunct indicators within the list-structure-type object are used to determine whether or not to write the data or adjunct list entry, or both. When a list entry is replaced, the data and adjunct indicators within the list-entry-type operand are used to determine whether or not to write the data or adjunct list entry, or both. When the data indicator specifies that the list entries have data, the data list entry is written from the data block. When the adjunct indicator specifies that the list entries have adjunct, the adjunct list entry is written from the adjunct-list-entry-value request operand. When the data list entry is replaced and the data-list-entry-size operand is smaller than the data-list-entry-size object, the data-list entry is contracted to the new size, the data block is stored in the data-list entry, and the data-list-entry-size object in the list-entry controls is updated with the value of the data-list-entry-size operand. When the data list entry is replaced and the data-list-entry-size operand is larger than the data-list-entry-size object, the data-list entry is expanded to the new size, the data block is stored in the data-list entry, and the data-list-entry-size object in the list-entry controls is updated with the value of the data-list-entry-size operand. Creating a List Entry List-entry creation is requested on a write-list-entry command, depending on the write-request type specified. When a write-request type specifies to create a list entry, list-entry creation is unconditionally requested. When a write-request type specifies to replace or create a list entry, list-entry creation is conditionally requested; that is, the list-entry creation is requested when the designated list entry does not exist. When the list set and list is not full and list-entry creation is requested, a list entry may be created. When a list entry is created, the list-set-entry count and when it exists, the associated list-entry count are each incremented by one. When a list entry is created, the list-set-element count and when it exists, and the associated list-element count are each increased by the value of the data-list-entry size. A list entry is created at the first entry position relative to the designated position, and the relative position of all succeeding entries is increased by one. Replacing a List Entry A list entry may be replaced on a write-list-entry command. When a write-request type specifies to replace a list entry or to replace or create a list entry and the designated list entry exists, the list entry may be replaced. When a list entry is replaced, the list-set-element count and when it exists, the associated list-element count are each increased or decreased by the change in the data-list-entry size. The position of an entry is not affected when it is replaced. When a write-request type specifies to replace a list entry and the designated list entry does not exist, an indicative response code is returned. Reading a List Entry A list entry may be read on a read-list-entry, move-and-read-list-entry, or read-and-delete-list-entry command, and one or more list entries may be read on a read-list or read-list-set command. When the list-entry type specifies data list entries, one or more data list entries may be read into the data area, depending on the command executed. When the list-entry type specifies adjunct list entries, one adjunct list entry may be read into the adjunct-list-entry-value response operand, or one or more adjunct list entries are read into the data area, depending on the command executed. When a read-list or read-list-set command is executed, the adjunct or data list entries are always read into the data area. Otherwise, when any other command that does a read operation is executed, the adjunct list entry is read into the response operand. The position of an entry is not affected by a read operation. Moving a List Entry A list entry may be moved on a move-list-entry, a write-and-move-list-entry, or a move-and-read-list-entry command. List entries may be moved between lists or to the same list within a list set. A list entry is moved from the first entry position relative to the designated position, and the relative position of all succeeding entries is decreased by one. A list entry is moved to the first entry position relative to the targeted position, and the relative position of all succeeding entries is increased by one. When a list entry is moved from one list to another and list-entry counts exist, the list-entry count of the source list is decremented by one and the list-entry count of the target list is incremented by one. When a list entry is moved from one list to another and list-element counts exist, the list-element count of the source list is decreased by the value of the data-list-entry size and the list-element count of the target list is increased by the same amount. Deleting a List Entry A list entry may be deleted on a delete-list-entry or a read-and-delete-list-entry command and one or more list entries may be deleted on a delete-list-set or delete-list-entries command. An entry is deleted at the first entry position relative to the designated position, and the relative position of all succeeding entries is decreased by one. When a list entry is deleted, the list-set-entry count and when list-entry counts exist, the associated list-entry count are each decremented by one. When a list entry is deleted, the list-set-element count and when list-element counts exist, and the associated list-element count are each decreased by the value of the data-list-entry size. Writing the Retry Buffer When the retry index specifies a retry buffer, the retry-version-number request operand and all the response operands except for the response descriptor are stored in the retry-information portion of the retry buffer specified by the retry index. When the retry index specifies a retry buffer and a data list entry is read, the data list entry is also stored in the retry-data-block portion of the retry buffer specified by the retry index. Notifying a List Monitor Processing of a list-notification command consists of three operations; message-path selection, initiation, and completion. When a list-state transition occurs, one or more list-notification commands are initiated for each user who is monitoring the list to the system which attached the user. All the list-notification commands initiated as a result of a list-state transition are initiated before the command that caused the list-state transition is completed. The list-notification command provides the information necessary for the system to update one list-notification entry and, when requested, the associated list-notification summaries, to reflect the new list state. A user becomes a list monitor by registering with the list by means of the register-list-monitor command. A user ceases to be a list monitor by deregistering from the list by means of the deregister-list-monitor command or by detaching from the list structure by means of the detach-list-structure-user command. A list-notification command issued to a system for a user as a result of a not-empty-to-empty list-state transition must complete before another list-notification command on behalf of the same list and user that specifies the opposite list-state transition may be issued. All SES list-structure commands capable of adding, deleting, or moving a list entry execute the list-monitor-notification process for each user monitoring a list that changes state. This section defines the list-structure operands for the list notification command.
______________________________________
List-Notification Operands
Acronym
______________________________________
Non-empty state change NESC
List-notification-entry number
LNEN
List-notification token LNT
Summary update SU
______________________________________
Non-empty State Change (NESC): 443 A value that indicates that the list transition from the associated list notification bit vector entry was either an empty to not-empty transition (value is one) or a not-empty to empty transition (value is zero). List-Notification-Entry Number (LNEN): 442 An object or field that specifies a list-notification-vector entry. List-Notification Token (LNT): 441 A value that specifies a list-notification vector to the system. Summary Update (SU): termed LNRT 445 A value that indicates whether the list-notification-vector summaries are to be updated when an empty to not-empty state transition occurs on a monitored list. List structure commands This section summarizes the list structure commands that are supported by the SES facility 110. List structure commands are direct commands which are communicated from the CPC 101-104 to the message processing function 113 of the SES via the Send Message CPU instruction. List structure commands are categorized as follows: Structure commands which allocate, read, and write list structures 111, list structure controls 201, and list controls 314. User commands which allow a user (program) to identify itself to the SES, and to register as a monitor of specific lists 109 in the SES. Lock only commands which support read, write, and clear operations on lock table objects 206. Single-list-entry commands which support read, write, move and delete operations on one list entry object 302. Multiple-list-entry commands, which support read and delete operations on multiple list objects/entries 302. Structure commands The structure commands are: Allocate-list-structure (ALST), Deallocate-list-structure (DLST), Read-list-structure-controls (RLSC), Read-list-controls (RLC), and Write-list-controls (WLC). ALST Command The ALST command creates (allocates) a list structure 111. The allocate-list-structure command creates a list structure when the structure identifier is not assigned and there is sufficient free space and sufficient free control space available in the SES for creating the requested lock-table entries, lists and associated controls, and at least one list entry when a list set is requested. The allocate-list-structure command continues the initial allocation of a list structure when the structure identifier is assigned and initial allocation of the structure has not completed. When the structure is allocated, a checkpoint is established and the maximum list-set-entry count, maximum list-set-element count, allocated structure size and an indicative response code are returned in the response operands. When a model-dependent time period has elapsed before the allocation process is completed, the maximum list-set-entry count, maximum list-set-element count, allocated structure size and an indicative response code is returned in the response operands. When insufficient free control space but sufficient free space is available in SES for the structure, an indicative response code is returned in the response operand. When insufficient free space is available in SES for the structure, an indicative response code is returned in the response operand. When the initial allocation of the list structure has not completed, the initial allocation is continued. DLST Command The DLST command deallocates the list structure 111 associated with the specified structure identifier. The designated list structure is deallocated and an indicative response code is returned in the response operand. When a model-dependent time period has elapsed before the deallocation process is completed, an indicative response code is returned in the response operand. RLSC Command The RLSC command returns (in the response operands) the list-structure controls 201 associated with the specified structure identifier. RLC Command The RLC command returns (in the response operands) the list controls 314 associated with the specified structure identifier and list number. WLC Command The WLC command writes/updates the list controls 314 associated with the specified structure identifier and list number. The write-list-controls command writes the list controls, depending on the list-control type. User commands The user commands are: Attach-list-structure-user (ALSU), Detach-list-structure-user (DLSU), Register-list-monitor (RLM), Deregister-list-monitor (DLM), and Read-user-controls (RUC). ALSU Command The ALSU command executes the attachment process. FIG. 12 is a flowchart showing the process for the ALSU command. The attach-list-structure-user command attaches the list-structure user. When the list-structure user is attached, an indicative response code is returned in the response operand. DLSU Command The DLSU command completes the detachment process and changes the state of the user identifier 418 to unassigned. FIG. 13 is a flowchart showing the process for the DLSU command. The detach-list-structure-user command continues detaching the list-structure user. The detach-list-structure-user command completes detaching the list-structure user when the list-monitoring-active bit of all the list-monitor-table entries associated with the list-structure user is reset. After processing all list monitor tables, the DLSU command waits for all initiated LN commands associated with the list structure user to complete 1501. The user identifier is placed in the unassigned state. When the list-structure user is detached, an indicative response code is returned in the response operand. When the model-dependent time period has elapsed before the detachment process is complete, an indicative response code is returned in the response operand. RLM Command The RLM command registers a list structure user as a list monitor by updating the list monitor table 316. It is described in FIG. 16. When the specified list-structure user is attached with a valid list-notification token, the list-monitoring-active field is updated and the list-notification-request type and list-notification entry number are updated in the list-monitor-table entry of the specified list and user, and the list-entry count or the list-element count and an indicative response code are returned in the response operands. When the specified list-structure user is attached with an invalid list-notification token, an indicative response code is returned in the response operand. DLM Command The DLM command deregisters a list structure user as a list monitor. It is described in FIG. 15. The list-monitoring-active field is updated in the list-monitor-table entry of the specified list and user. Then the DLM command waits for all initiated LN commands associated with the list and user to complete 1701. An indicative response code is returned in the response operand. RUC Command The RUC command returns the user controls 210 in the response operands. Lock-only commands The lock-only commands are: Read-lock-table-entry (RLTE), Write-lock-table-entry (WLTE), Read-next-lock-table-entry (RNLTE), and Clear-lock-table (CLT). RLTE Command The RLTE command returns the lock-table-entry value of the lock-table-entry 206 specified by the structure identifier and lock-table-entry number. The lock-table-entry value of the lock-table entry specified by the structure identifier and lock-table-entry number and an indicative response code are returned in the response operands. WLTE Command The WLTE command compares the global-lock managers 207 and conditionally replaces the global-lock managers, the local-lock managers 208 or both. When a global-lock manager is replaced and there are no other local-lock managers or when a local-lock manager is replaced with the opposite value, or when the global-lock and the local-lock managers are replaced, an indicative response code is returned in the response operand. When a global-lock manager is replaced and there are one or more other local-lock managers, or when a local-lock manager is replaced with the same value, then an indicative response code is returned in the response operand. When global-lock manager comparison fails, an indicative response code is returned in the response operand. RNLTE Command The RNLTE command conditionally reads the next nonzero lock-table entry 206. The read-next-lock-table-entry command scans the lock-table entry starting at the lock-table-entry number specified and proceeds sequentially in ascending lock-table-entry number order until a nonzero entry or the end of the lock table is reached, or a model-dependent time period elapses. When the end of the lock table is reached without encountering a nonzero entry, the last lock-table-entry number and an indicative response code are returned in the response operands. When a model-dependent time period has elapsed before the end of the lock table is reached, an indicative response code is returned in the response operand. When a nonzero lock table entry is reached, the lock-table-entry number, the lock-table-entry value, and response code 2 are returned in the response operands. CLT Command The CLT command zeros one or more lock-table entries 206. The clear-lock-table command zeros the lock-table entries starting at the lock-table-entry number specified and proceeds sequentially in ascending lock-table-entry-number order until a model-dependent time period elapses or the end of the lock | ||||||
