Controlling storage access for merge operations

The computer program product optimizes database merge operations by using control mechanisms to minimize data transfer and improve performance in computing environments, addressing inefficiencies in existing systems.

JP7546556B2Active Publication Date: 2024-09-06INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2021520341
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-11-06
Filing Date
2019-11-05
Publication Date
2024-09-06
Estimated Expiration
2039-11-05

AI Technical Summary

Technical Problem

Existing database processing systems require significant memory and time for transferring data between memory and processor storage during merge operations, leading to inefficient performance.

Method used

A computer program product that includes instructions for merging multiple input lists by determining when an input list becomes empty and using control mechanisms to optimize data access and processing, reducing the amount of data transferred and improving overall performance.

Benefits of technology

The solution reduces data access and enhances performance by minimizing data transfer and optimizing merge operations within a computing environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007546556000017
    Figure 0007546556000017
  • Figure 0007546556000004
    Figure 0007546556000004
  • Figure 0007546556000012
    Figure 0007546556000012
Patent Text Reader

Abstract

Storage accesses for the merge operation are minimized. Multiple records from multiple input lists are merged. The merging includes determining that one input list of the multiple input lists has become empty, and based on the determination that the input list has become empty, checking a control specific to the input list. The control is used to determine how to proceed, such as whether to terminate the merge or continue the merge.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] One or more aspects relate generally to facilitating processing within a computing environment, and in particular to facilitating merging processing. [Background technology]

[0002] One aspect of computer processing in which merging is employed is in database processing. A database is a structured collection of data, usually divided into data records. Sorting and merging collections of data records are common database operations performed by software applications.

[0003] Databases can require significant amounts of memory, such as a terabyte or more, and therefore a significant portion of the time spent merging sorted sets of data records is spent transferring data between memory and processor storage. Summary of the Invention

[0004] The shortcomings of the prior art are overcome and additional advantages are provided by the provision of a computer program product for facilitating processing within a computing environment. The computer program product includes a computer readable storage medium having stored thereon instructions readable by a processor for performing a method. The method includes merging, by the processor, a plurality of records of a plurality of input lists. The merging includes determining that an input list of the plurality of input lists has become empty, and based on the determination that the input list has become empty, checking a control specific to the input list, which determines how to proceed. Based on the control, performing the processing.

[0005] Use of one or more controls to direct the behavior of an operation (e.g., a merge operation) when a particular input list becomes empty can reduce data accesses, reduce the amount of data transferred, improve performance of the operation, and improve overall performance within the computing environment.

[0006] In one example, performing the processing includes terminating the merging based on the control being a value of 1, and in another example, performing the processing includes continuing the merging based on the control being another value.

[0007] In one embodiment, the control includes a plurality of indicators, one indicator of the plurality of indicators being assigned to a selected input list of the plurality of input lists and another indicator of the plurality of indicators being assigned to another input list of the plurality of input lists.

[0008] Further, in one embodiment, a determination is made as to whether the emptied input list indication is to be stored at the selected location, the determination being based at least in part on the control, based on the determination specifying that the indication is to be stored, the input list indication is stored at the selected location.

[0009] As an example, determining whether the instruction is to be stored includes checking the other control, where the other control being set to a selected value indicates that the instruction is to be stored in the selected location, where the other control is set in part based on the control.

[0010] In one embodiment, setting the other control includes checking whether the control is at a defined value and determining whether a particular condition code is set, and based on the control being at a defined value and the particular condition code being set, the other control is set to a selected value.

[0011] In one example, the control is specified by an instruction, such as a reordering instruction, which in one example is defined based on a selected instruction set architecture, which in one embodiment specifies a location of a parameter block in memory, and the parameter block in memory contains the control.

[0012] Computer-implemented methods and systems relating to one or more aspects are also described and claimed herein. Additionally, services relating to one or more aspects may also be described and claimed herein.

[0013] Other features and advantages are realized by the techniques described herein. Other embodiments and aspects are described in detail herein and are considered a part of the claimed aspects.

[0014] One or more aspects are particularly pointed out and distinctly claimed as examples in the claims at the end of this specification. The foregoing, as well as objects, features, and advantages of the one or more aspects, will become apparent from the following detailed description taken in conjunction with the accompanying drawings. [Brief description of the drawings]

[0015] [Figure 1A] FIG. 1 illustrates an example of a computing environment for incorporating and using one or more aspects of the present invention. [Figure 1B] 1B illustrates further details of the processor of FIG. 1A in accordance with one or more aspects of the present invention. [Diagram 2] FIG. 1 illustrates another example of a computing environment for incorporating and using one or more aspects of the present invention. [Figure 3A] FIG. 2 illustrates one form of list reordering instruction in accordance with an embodiment of the present invention. [Figure 3B] 4 illustrates an example of fields of an implicit register (general purpose register 0) used by a list reordering instruction in accordance with an aspect of the present invention. FIG. [Figure 3C]FIG. 11 illustrates an example of function code for a list sorting instruction in accordance with an aspect of the present invention. [Figure 3D] 3 illustrates an example of fields of an implicit register (general purpose register 1) used by a list reordering instruction in accordance with an aspect of the present invention. FIG. [Figure 3E] 2 is a diagram showing an example of the contents of a register (R1) specified by a list sorting instruction according to an embodiment of the present invention. FIG. [Figure 3F] FIG. 2 illustrates an example of the contents of a register (R1+1) used by a list reordering instruction in accordance with an aspect of the present invention. [Figure 3G] 1 is a diagram showing an example of the contents of a register (R2) specified by a list sorting instruction according to an embodiment of the present invention. FIG. [Figure 3H] FIG. 2 illustrates an example of the contents of a register (R2+1) used by a list reordering instruction in accordance with an aspect of the present invention. [Figure 3I] 11 illustrates an example of the contents of a parameter block used by the SORTL-QAF function of a list sorting instruction in accordance with an embodiment of the present invention. [Figure 3J] FIG. 2 illustrates an example of a fixed length record format used by list reordering instructions in accordance with an aspect of the present invention. [Figure 3K] 11A illustrates an example of the contents of a parameter block used by the SORTL-SFLR function of a list sorting instruction in accordance with an embodiment of the present invention. [Figure 4A] FIG. 2 illustrates an example of a SORTL-SFLR in accordance with one or more embodiments of the present invention. [Figure 4B] FIG. 2 illustrates an example of a SORTL-SFLR in accordance with one or more embodiments of the present invention. [Figure 5A] FIG. 13 illustrates an example of a summary of values ​​of inputs to a SORTL-SFLR function in accordance with an embodiment of the present invention. [Figure 5B] FIG. 2 illustrates an example of restrictions on modifications to address and length fields of the input list of a SORTL-SFLR function in accordance with an embodiment of the present invention. [Figure 6A] 1 illustrates an example of a first operand position / first operand prior to executing SORTL with merge mode indication set to 0 in accordance with an embodiment of the present invention. [Figure 6B] 1 illustrates an example of a first operand position / first operand after executing SORTL with merge mode indication set to 0 in accordance with an embodiment of the present invention. [Figure 6C] 13 illustrates an example of a second operand position / second operand prior to executing SORTL with merge mode indication set to 0 in accordance with an embodiment of the present invention. [Figure 6D] 1 illustrates an example of a second operand position / second operand after executing SORTL with merge mode indication set to 0 in accordance with an embodiment of the present invention. [Figure 7A] 1 illustrates an example of a first operand position / first operand prior to executing SORTL with merge mode indication set to 1 in accordance with an embodiment of the present invention. [Figure 7B] 1 illustrates an example of a first operand position / first operand after executing SORTL with merge mode indication set to 1 in accordance with an embodiment of the present invention. [Figure 8] FIG. 13 illustrates an example of certain fields of a parameter block used in accordance with an embodiment of the present invention. [Figure 9] FIG. 2 illustrates an example of a variable length record format used by list reordering instructions in accordance with an aspect of the present invention. [Figure 10] FIG. 4 illustrates an example of a process associated with a selected control in accordance with an aspect of the present invention. [Figure 11A] FIG. 1 illustrates an example of facilitating processing within a computing environment in accordance with an aspect of the present invention. [Figure 11B] FIG. 1 illustrates an example of facilitating processing within a computing environment in accordance with an aspect of the present invention. [Figure 12A] FIG. 1 illustrates another example of a computing environment for incorporating and using one or more aspects of the present invention. [Figure 12B] FIG. 12B shows further details of the memory of FIG. 12A. [Figure 13] FIG. 1 illustrates one embodiment of a cloud computing environment. [Figure 14] FIG. 13 is a diagram showing an example of an abstract model layer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] In accordance with an aspect of the present invention, capabilities are provided to facilitate processing within a computing environment. As one example, a single instruction (e.g., a single designed hardware machine instruction at a hardware / software interface) is provided to perform an operation such as sorting and / or merging data records of one or more input lists. For example, the instruction is executed on a general-purpose processor.

[0017] The instructions, in one or more aspects, include one or more controls used to minimize the number of times data is transferred between memory and processor (e.g., central processing unit) storage when a merge is performed, e.g., the number of passes over the data (e.g., records being merged) is minimized, minimizing data accesses, thereby improving performance of the merge operation and overall system performance.

[0018] As an example, one or more controls are provided to direct the behavior of an operation when a particular input list becomes empty during the operation. Based on the input list becoming empty (e.g., the length of the input list becomes zero), the operation either terminates processing or continues as specified by the corresponding control. In one example, controls and corresponding behaviors for a selected single input list are provided independent of controls for other input lists.

[0019] In one example, when comparing keys (of the records being merged) of equal value, keys from an input list that contain independent empty controls are selected in the sort order to come after other keys with the same value from the other input lists.

[0020] If the control specifies that an operation terminates when an empty input list occurs, and if an empty input list occurs during the operation, a particular condition code is set to inform a program (e.g., the program issuing the instruction) of this condition, and execution of the instruction terminates. After an operation terminates due to a described condition, the program may modify the specification of one or more input lists before resuming the operation.

[0021] As an example, an instruction can be re-executed to resume operation, and control can be applied to sort in ascending and descending order.

[0022] One embodiment of a computing environment for incorporating and using one or more aspects of the present invention is described with reference to Figure 1A. The computing environment 100 includes, for example, a processor 102 (e.g., a central processing unit), memory 104 (e.g., main memory, also referred to as system memory, primary storage, central storage, storage), and one or more input / output (I / O) devices or interfaces 106, coupled together via, for example, one or more buses 108 or other connections or both.

[0023] In one example, processor 102 is based on the z / Architecture® hardware architecture provided by International Business Machines Corporation of Armonk, New York and is included in a server such as an IBM Z® server also provided by International Business Machines Corporation and implementing the z / Architecture hardware architecture. One embodiment of the z / Architecture hardware architecture is described in “z / Architecture Principles of Operation,” IBM Publication No. SA22-7832-11, 12 th edition, September 2017, which is incorporated herein by reference in its entirety. However, the z / Architecture hardware architecture is only one exemplary architecture, and other architectures or other types of computing environments or both may include and / or use one or more aspects of the invention. In one example, the processor runs an operating system, such as the z / OS® operating system, also provided by International Business Machines Corporation.

[0024] The processor 102 includes multiple functional components used to execute instructions. As shown in FIG. 1B, these functional components include, for example, an instruction fetch component 120 for fetching instructions to be executed, an instruction decode unit 122 for decoding the fetched instructions and obtaining operands for the decoded instructions, an instruction execution component 124 for executing the decoded instructions, a memory access component 126 for accessing memory to execute the instructions, if necessary, and a writeback component 130 for providing results of the executed instructions. One or more of these components may include or have access to at least a portion of one or more other components that provide a reordering / merging process (or other process that may employ one or more aspects of the present invention) in accordance with one or more aspects of the present invention. The one or more other components include, for example, a reordering / merging component (or other component) 136. The functionality provided by component 136 is described in further detail below.

[0025] Another example of a computing environment for incorporating and using one or more aspects of the present invention is described with reference to Figure 2. In one example, the computing environment is based on the z / Architecture hardware architecture, although the computing environment may be based on other architectures offered by International Business Machines Corporation or other companies.

[0026] 2, in one example, a computing environment includes a central electronics complex (CEC) 200. The CEC 200 includes multiple components, such as, for example, memory 202 (also referred to as system memory, main memory, primary storage, central storage, or storage) coupled to one or more processors (also referred to as central processing units (CPUs)) 204 and an input / output subsystem 206.

[0027] Memory 202 includes, for example, one or more logical partitions 208, a hypervisor 210 that manages the logical partitions, and processor firmware 212. One example of hypervisor 210 is the Processor Resource / System Manager (PR / SM™) hypervisor offered by International Business Machines Corporation (Armonk, NY). As used herein, firmware includes, for example, the microcode of a processor. Firmware includes, for example, hardware level instructions and / or data structures used in implementing higher level machine code. In one embodiment, firmware includes, for example, microcode including trusted software or proprietary code that controls operating system access to the system's hardware, typically provided as microcode specific to the underlying hardware.

[0028] Each logical partition 208 can function as a separate system, that is, each logical partition can be reset independently, run a guest operating system 220, such as the z / OS® operating system, or other operating systems, and operate with different programs 222. An operating system or application program running within a logical partition appears to have access to the entire complete system, when in fact only a portion of it is available.

[0029] The memory 202 is coupled to a processor (e.g., CPU) 204, which is a physical processor resource that can be assigned to a logical partition. For example, a logical partition 208 includes one or more logical processors, each of which represents all or a portion of the physical processor resource 204 that can be dynamically assigned to a logical partition.

[0030] Additionally, memory 202 is coupled to an I / O subsystem 206, which may be part of the central electronics complex or separate from the central electronics complex. The I / O subsystem 206 directs the flow of information between the main memory 202 and an input / output control unit 230 and input / output (I / O) devices 240 coupled to the central electronics complex.

[0031] Many types of I / O devices may be used. One particular type is a data storage device 250. The data storage device 250 may store one or more programs 252, one or more computer readable program instructions 254, or data, or a combination thereof, etc. The computer readable program instructions may be configured to perform the functions of an embodiment of an aspect of the present invention.

[0032] In one example, the processor 204 includes a sorting / merging component (or other components) 260 to perform one or more of sorting and / or merging (or other operations that may employ one or more aspects of the present invention). In various examples, there may be one or more components that perform these tasks. Many variations are possible.

[0033] Central electronics complex 200 may include and / or be coupled to removable / non-removable, volatile / non-volatile computer system storage media. For example, central electronics complex 200 may include and / or be coupled to non-removable, non-volatile magnetic media (commonly referred to as "hard drives"), magnetic disk drives for reading from and writing to removable, non-volatile magnetic disks (e.g., "floppy disks"), and / or optical disk drives for reading from and writing to removable, non-volatile optical disks, such as CD-ROMs, DVD-ROMs, or other optical media. It should be understood that other hardware and / or software components may be used with central electronics complex 200, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archive storage systems.

[0034] Additionally, central electronics complex 200 may operate in numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, or configurations, or combinations thereof, that may be suitable for use with central electronics complex 200 include, but are not limited to, personal computer (PC) systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, microcomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of these systems or devices.

[0035] Although various examples of computing environments are described herein, one or more aspects of the present invention may be used with many types of environments. The computing environments provided herein are merely examples. Furthermore, although one or more aspects of the present invention are described with reference to reordering instructions, one or more of the aspects are applicable to other processes and / or instructions that perform merging. Reordering instructions are merely an example.

[0036] In accordance with an aspect of the invention, a processor, such as processor 102 or 204, employs an improved reordering function that provides a mechanism for reordering multiple lists of unsorted input data into one or more lists of sorted output data. In one example, the improved reordering function is installed in a system when a capability indicator is set, e.g., to 1. As one particular example of a z / Architecture hardware architecture, when the improved reordering function is installed in a z / Architecture architecture mode, capability bit 150 is set, e.g., to 1. This function, in one embodiment, also provides a mechanism for merging multiple lists of sorted input data into a single list of sorted output data. This function includes, e.g., a list reordering instruction, an embodiment of which is described below.

[0037] An embodiment of details regarding the list reordering instruction is described with reference to FIGS. 3A-3K. The instruction, in one example, executes on a general-purpose processor (e.g., processor 102 or 204). In the description herein, specific locations of fields, specific fields, or specific sizes of fields, or combinations thereof are indicated (e.g., specific bytes and / or bits). However, other locations, fields, or sizes, or combinations thereof may be provided. Furthermore, while setting bits to specific values ​​(e.g., 1 or 0) is specified, this is merely an example. Bits may be set to different values, such as opposite values ​​or other values, in other examples. Many variations are possible.

[0038] Referring to FIG. 3A, in one example, the format of a list sort (SORTL) instruction 300 is an RRE format that uses an extended operation code (opcode) to indicate the registers and the operation of the registers. As an example, the instruction includes an operation code field 302 (e.g., bits 0-15) that includes an operation code indicating a sort and / or merge operation, a first register field (R1) 304 (e.g., bits 24-27) that specifies a first pair of general purpose registers, and a second register field (R2) 306 (e.g., bits 28-31) that specifies a second pair of general purpose registers. The contents of the register specified by the R1 field 304 are referred to as the first operand (in storage), and the contents of the register specified by the R2 field 306 are referred to as the second operand (in storage). The contents of R1+1 specify the length of the first operand, and the contents of R2+1 specify the length of the second operand. In one example, bits 16-23 of the instruction are reserved and should contain zeros. If not, the program may not operate compatibly in the future. As used herein, a program is the issuer of list reordering instructions. A program may be a user program, an operating system, or other type of program.

[0039] In one embodiment, execution of an instruction includes use of one or more implicit general purpose registers (i.e., registers not explicitly specified by the instruction). For example, as described herein, execution of a list reordering instruction uses general purpose registers 0 and 1. General purpose register 0, in one example, is used to specify whether merging is performed and to specify the reordering function to be performed by the instruction, and general purpose register 1 is used to provide the location of a parameter block used by the instruction. In another example, general purpose register 0 is not used to specify whether merging is performed, but instead, merging is / is not set by the machine (e.g., processor) and cannot be changed by a mode indicator. Other variations are possible.

[0040] 3B, general purpose register 0 (308) includes merge mode field 310 (described below) and function code field 312. In one particular example, bit positions 57-63 of general purpose register 0 contain the function code, although in other embodiments, other bits may be used to contain the function code. If bits 57-63 of general purpose register 0 specify a function code that is not assigned or installed, then in one example, a specification exception is recognized.

[0041] Exemplary assigned function codes for the list sort instructions are shown in FIG. 3C and include, for example, function code 0 (313) indicating a SORTL-QAF (query available functions) function, function code 1 (315) indicating a SORTL-SFLR (fixed length record sort) function, and function code 2 (317) indicating a SORTL-SVLR (variable length record sort) function. Each code uses a parameter block, the size of which, in one example, depends on the function. For example, for the SORTL-QAF function, the parameter block is 32 bytes, and for SORTL-SFLR and SORTL-SVLR, the parameter block is 576+16×N IS and N IS is the number of input lists specified by the interface size. No other function codes are assigned in this example. Although exemplary functions and function codes are described, other functions and / or function codes may be used.

[0042] As previously indicated, general purpose register 0 also includes merge mode field 310. In one example, bit 56 of general purpose register 0 specifies the mode of operation (merge mode) that applies to, for example, the SORTL-SFLR and SORTL-SVLR functions. In one example, if the specified function is SORTL-QAF, then bit 56 of general purpose register 0 is ignored. Additionally, in one example, bit positions 0 through 55 of general purpose register 0 are ignored.

[0043] Further details regarding the other implicit register (general purpose register 1) used by the list reordering instructions are described with reference to FIG. 3D. The contents of general purpose register 1 (314) specify, for example, the logical address 316 of the leftmost byte of the parameter block in storage. In one example, the parameter block is specified on a doubleword boundary, and a specification exception is recognized if it is not. Further details regarding the parameter block are described below.

[0044] For the specified function (e.g., SORTL-QAF, SORTL-SFLR, SORTL-SVLR), the contents of general purpose registers 0 and 1 are not changed. Additionally, in one example, R1 field 304 specifies an even and odd general purpose register pair. This is to specify the even numbered register, not general purpose register 0, otherwise a specification exception is recognized. If the specified function is SORTL-SFLR or SORTL-SVLR, then the contents of general purpose register R1 318 specify, for example, the logical address 320 of the leftmost byte of the first operand, and the contents of general purpose register R1+1 (322) specify the length 324 of the first operand, for example, in bytes, as shown in Figures 3E-3F. If the specified function is SORTL-SFLR or SORTL-SVLR, then, for example, the first operand is specified on a doubleword boundary, otherwise a specification exception is recognized. Data in the form of records is selected from a set of input lists and stored into the location of the first operand (e.g., starting at the address specified using R1). If the SORTL-QAF function is specified, the contents of general registers R1 and R1+1 are ignored.

[0045] Additionally, for the specified function (e.g., SORTL-QAF, SORTL-SFLR, SORTL-SVLR), in one example, the R2 field 306 specifies an even and odd general-purpose register pair. This is to specify the even numbered registers, not general-purpose register 0, and a specification exception is recognized if this is not the case. If the specified function is SORTL-SFLR or SORTL-SVLR and the merge mode (MM) is 0, the contents of general-purpose register R2 326 specify, for example, the logical address 328 of the leftmost byte of the second operand, and the contents of general-purpose register R2+1 (330) specify the length 332 of the second operand, for example, in bytes, as shown in Figures 3G-3H. If the specified function is SORTL-SFLR or SORTL-SVLR and the merge mode (MM) is 0, the second operand should be specified on a doubleword boundary, and in one example, a specification exception is recognized if this is not the case. If MM is 0, the starting address and length of each output list, called the output list delineations (OLD), are stored in the location of the second operand (e.g., starting at the address specified using R2). If the SORTL-QAF function is specified or MM is 1, the contents of general registers R2 and R2+1 are ignored.

[0046] During execution, in one embodiment, the function specified by the function code in general register 0 is performed. If the specified function is SORTL-SFLR or SORTL-SVLR, in one embodiment the following occurs as part of the operation: The address in general register R1 is incremented by the number of bytes stored in the first operand's location, and the length in general register R1+1 is decremented by the same number. If MM is 0, the address in general register R2 is incremented by the number of bytes stored in the second operand's location, and the length in general register R2+1 is decremented by the same number.

[0047] In one example, the formation and updating of the address and length depends on the addressing mode.

[0048] In one embodiment, the following applies in 24-bit addressing mode: The contents of bit positions 40 through 63 of general registers R1, R1, and R2 form the addresses of the parameter block, first operand, and second operand, respectively, while the contents of bit positions 0 through 39 are ignored. Bits 40 through 63 of the updated first and second operand addresses replace the corresponding bits in general purpose registers R1 and R2, respectively. The carry out from bit position 40 of the updated addresses is ignored, and the contents of bit positions 32 through 39 of general purpose registers R1 and R2 are set to 0. The contents of bit positions 0 through 31 of general purpose registers R1 and R2 are unchanged. The contents of bit positions 32 through 63 of general registers R1+1 and R2+1 form a 32-bit unsigned binary integer that specifies the number of bytes in the first and second operands, respectively. The contents of bit positions 0 through 31 of general registers R1+1 and R2+1 are ignored. Bits 32 through 63 of the updated first and second operand lengths replace the corresponding bits in general purpose registers R1+1 and R2+1, respectively. The contents of bit positions 0 through 31 of general purpose registers R1+1 and R2+1 remain unchanged.

[0049] In one embodiment, the following applies in 31-bit addressing mode: The contents of bit positions 33 through 63 of general registers R1, R1, and R2 form the addresses of the parameter block, first operand, and second operand, respectively, while the contents of bit positions 0 through 32 are ignored. Bits 33 through 63 of the updated first and second operand addresses replace the corresponding bits in general purpose registers R1 and R2, respectively. The carry out from bit position 33 of the updated addresses is ignored, and the contents of bit position 32 of general purpose registers R1 and R2 are set to 0. The contents of bit positions 0 through 31 of general purpose registers R1 and R2 are unchanged. The contents of bit positions 32 through 63 of general registers R1+1 and R2+1 form a 32-bit unsigned binary integer that specifies the number of bytes in the first and second operands, respectively. The contents of bit positions 0 through 31 of general registers R1+1 and R2+1 are ignored. Bits 32 through 63 of the updated first and second operand lengths replace the corresponding bits in general purpose registers R1+1 and R2+1, respectively. The contents of bit positions 0 through 31 of general purpose registers R1+1 and R2+1 remain unchanged.

[0050] In one embodiment, the following applies in 64-bit addressing mode: The contents of bit positions 0 through 63 of general registers 1, R1, and R2 constitute the addresses of the parameter block, the first operand, and the second operand, respectively. Bits 0 through 63 of the updated first and second operand addresses replace the corresponding bits in general registers R1 and R2, respectively. The carry out of bit position 0 of the updated addresses is ignored. The contents of bit positions 0 through 63 of general purpose registers R1+1 and R2+1 form 64-bit unsigned binary integers that specify the number of bytes in the first and second operands, respectively. Bits 0 through 63 of the updated first and second operand lengths replace the corresponding bits in general purpose registers R1+1 and R2+1, respectively.

[0051] In access register mode, access registers 1, R1, and R2 specify the address spaces containing the parameter block, the first operand, and the second operand, respectively.

[0052] Further details regarding the various features are provided below. Function code 0: SORTL-QAF (Query available functions)

[0053] The SORTL-QAF (query) function provides a mechanism to indicate the availability of all installed features, installed parameter block formats, and available interface sizes. The interface size is the number of input lists available to a program. The size of the parameter blocks for the SORTL-SFLR and SORTL-SVLR functions is proportional to the interface size specified by the program.

[0054] One exemplary format of a parameter block for a SORTL-QAF function is described with reference to Figure 3I. In one example, a parameter block 340 for a SORTL-QAF function (e.g., function code 0) includes an installed capabilities vector 342, an installed interface size vector 344, and an installed parameter block type vector 346. In one particular example, these vectors are stored in bytes 0-15, bytes 16, and bytes 24-25, respectively, of the parameter block. Each of these vectors is described further below.

[0055] As an example, bits 0 to 127 of installed function vector 342 correspond to function codes 0 to 127 of list sorting instructions, respectively. If a bit is, for example, 1, the corresponding function is installed, and if not, the function is not installed.

[0056] Additionally, in one example, bits 0 through 7 of installed interface size vector 344 indicate the interface sizes available to the program. The interface size is the number of input lists specified by the program for the SORTL-SFLR and SORTL-SVLR functions. In one example, bits 0 through 7 of installed interface size vector 344 correspond to the following interface sizes: bits 0, 1, 5 through 7 - reserved, bit 2 - 32 input lists, bit 3 - 64 input lists, and bit 4 - 128 input lists. Other examples are possible.

[0057] If a bit in the installed interface sizes vector 344 is, for example, a 1, then the corresponding interface size is available to the program. One or more bits may be stored as 1. For example, a value of binary 00101000 indicates that interface sizes of 32 and 128 input lists are available. In one example, bits 0-1 and 5-7 are reserved and stored as 0. Additionally, in one example, if the reordering enhancement feature is installed, then an interface size of 32 input lists is available. Thus, bit 2 is stored as 1. Other examples are possible.

[0058] In addition to the above, in one example, bits 0 through 15 of installed parameter block formats vector 346 correspond to parameter block formats 0 through 15, respectively. If a bit is, for example, a 1, the corresponding parameter block format is installed, otherwise the parameter block format is not installed. In one example, reserved bytes 17 through 23 and 26 through 31 of the parameter block are stored with 0.

[0059] The contents of general purpose registers R1, R2, R1+1, and R2+1 are ignored by the SORTL-QAF function.

[0060] The parameter block recognizes PER (program event recording) storage change events, if applicable. The parameter block recognizes PER zero address detection events, if applicable.

[0061] In one example, condition code 0 is set when the SORTL-QAF function completes execution; condition codes 1, 2, and 3 are not applicable to the query function. Function code 1: SORTL-SFLR (fixed length record sort)

[0062] In one example, a set of input lists are sorted and stored in the first operand location as a set of output lists. Each list is a set of records, and referring to FIG. 3J, each record 350 includes a key 352 (e.g., a fixed-length key) and a payload 354 (e.g., a fixed-length payload).

[0063] Records from the input list are sorted based on the key values. Records may be sorted in ascending or descending order, as specified in the sort order (SO) field of the parameter block associated with function code 1, described below. Records in the input list may or may not be listed in sorted order.

[0064] The records of the output list may be sourced from multiple input lists and are stored in a sorted order. The number of output lists stored in the first operand position depends on the input data. In one example, if all active input lists contain records listed in the same order as specified in the SO field, only one output list is generated.

[0065] As indicated above, bit 56 of general register 0 specifies the mode of operation, called merge mode (MM), that applies to the SORTL-SFLR function. If the merge mode is e.g. 0, then for each output list stored in the first operand position, a brief description (OLD) of the corresponding output list is stored in the second operand position. Each OLD contains e.g. an 8-byte OLD address specifying the position of the first record in the corresponding output list, and an 8-byte OLD length specifying the length of the corresponding output list, e.g. in bytes. If the merge mode is 1, then the input lists are considered to be pre-sorted, i.e. all active input lists are considered to contain records in the same order as specified by the SO field of the parameter block.

[0066] If MM is 1 and each input list is presorted, the result stored in the first operand position is a single output list of records in sorted order. If MM is 1 and each input list is not presorted, the results are unpredictable.

[0067] When MM is, for example, 1, the contents of general purpose registers R2 and R2+1 are ignored and no information is stored in the second operand location. When MM is 1, the procedure used to distinguish the separation between output lists may not be performed, thereby potentially improving performance of the operation. When MM is 1, no data is stored in the continuation record recall buffer described below.

[0068] To generate a single list of records in sorted order from a set of randomly ordered records, in one example, a program may perform the following steps. 1. Divide the set of records evenly among an initial set of lists, each containing the records in random order. Run a list sort instruction with the initial set of lists as input lists and merge mode equal to 0 to generate an intermediate set of lists, each containing the records in sorted order, as well as the storage positions and lengths for each list of the intermediate set of lists. 2. Execute the list sort instruction with the intermediate set of lists as the input list and merge mode equal to 1 to produce a final single list containing the records in sorted order.

[0069] An example of a SORTL-SFLR using Merge Mode equal to 0 is shown in FIG. 4A. The example includes inputs and resulting outputs. As shown, there are three input lists 400 (input list 0, input list 1, and input list 2). Additionally, examples of resulting first operands 402 and second operands 404 are shown. In one example, there are three lists in the first operand 402 (FIG. 4A), one list starts at address 1000 and has a length of 18, another list starts at address 1018 and has a length of 28, and a third list starts at address 1040 and has a length of 20, as shown in the second operand 404.

[0070] In one example, if two operations perform the same SORTL-SFLR function on the same set of unsorted input records using merge mode equal to 0, and the only difference between the two operations is the number of input lists used to specify the input data, the more input lists an operation uses, the fewer the number of output lists it will have. Figure 4B shows an example of an operation using six input lists 450 on the same input data as the example of Figure 4A using three input lists. Also shown is the resulting first operand 452, which contains two output lists instead of three, and a second operand 454, which provides a summary description of the two output lists.

[0071] As shown, the SORTL-SFLR function uses a parameter block, an example of which is described with reference to FIG. 3K. In the example parameter block described herein, specific locations within the parameter block of specific fields, and specific sizes of the fields are indicated (e.g., in specific bytes and / or bits). However, other locations and / or sizes of one or more of the fields may be provided. Additionally, while setting bits to specific values ​​(e.g., 1 or 0) is specified, this is merely an example. Bits may be set to different values, such as opposite values ​​or other values, in other examples. Many variations are possible.

[0072] In one example, for the SORTL-SFLR function, the parameters block 360 includes: Parameter Block Version Number (PBVN) 362: Bytes 0-1 of the parameter block specify the version and size of the parameter block. Bits 0-7 of the PBVN have the same format and definition as bits 0-7 of the Installed Interface Size List Vector (byte 16) of the parameter block for the SORTL-QAF (query) function. Bits 0-7 specify the number of input lists (N IS The size of the parameter block is given by the formula (576+16×N IS) is determined on a byte-by-byte basis. One bit out of bits 0 through 7 should have a value of one, otherwise a general operand-data exception is recognized. Bits 8 through 11 of the PBVN are reserved and should contain zeros; otherwise the program may not work compatibly in the future. Bits 12 through 15 of the PBVN contain an unsigned binary integer that specifies the parameter block format. The SORTL-QAF function provides a mechanism to indicate the available parameter block formats. If the specified parameter block size or format is not supported by the model, a general operand-data exception is recognized. The PBVN is specified by the program and does not change during the execution of the instruction.

[0073] Model Version Number (MVN) 364: Byte 2 of the parameter block is an unsigned binary integer that identifies the model on which the instruction executes. MVN is updated, for example, by the processor, during execution of the instruction. The value stored in MVN is model dependent.

[0074] MVN is an input to the operation if a continuation flag (CF) 368, described below, is 1. If CF is 1 and MVN identifies the same model as the model currently executing the instruction, data from a continuation state buffer (CSB) 390, described below, may be used to resume the operation. If CF is 1 and MVN identifies a different model than the model currently executing the instruction, some or all of the CSB fields may be ignored.

[0075] In one example, a program initializes MVN to 0. When instructions are re-executed with the intent of resuming operation, the program is expected not to change MVN, otherwise the results will be unpredictable.

[0076] Sort Order (SO) 366: Bit 56 of the parameter block specifies ascending sort order if it is 0 and descending sort order if it is 1. If ascending sort order is specified, each record in the output list contains a key that is equal to or greater than the key of the adjacent record to the left in the same output list. If descending sort order is specified, each record in the output list contains a key that is equal to or less than the key of the adjacent record to the left in the same output list. SO is not updated during execution of the instruction.

[0077] Continuation Flag (CF) 368: Bit 63 of the parameter block, when 1, indicates that the operation is partially completed and the contents of the continuation status buffer 390, and, if merge mode (MM) is 0, the contents of the continuation record recall buffer, may be used to resume the operation. Programs should initialize the Continuation Flag (CF) to 0 and not change the CF if an instruction is re-executed for the purpose of resuming the operation, otherwise the results will be unpredictable. In one example, the processor changes the CF if an instruction is re-executed.

[0078] Record Key Length 370: Bytes 10 through 11 of the parameter block contain an unsigned binary integer that specifies the size, in bytes, of the key in the record being processed during the operation. In one example, a general operand data exception is recognized if any of the following conditions are met: A key size of 0 bytes was specified. A key size was specified that is not a multiple of 8. A key size larger than 4096 bytes was specified. The record key length is not updated during execution of the command.

[0079] Record Payload Length 372 - If the SORTL-SFLR function is specified, bytes 14 through 15 of the parameter block contain an unsigned binary integer that specifies the size, in bytes, of the payload in the record being processed during the operation. In one example, a general operand data exception is recognized if any of the following conditions are met: A payload size was specified that was not a multiple of 8. The sum of the specified key size and payload size is greater than 4096 bytes. A payload size of 0 is valid.

[0080] When the SORTL-SVLR function is specified, the record payload length field in the parameter block is ignored. The record payload length is not updated during execution of the instruction.

[0081] Operand Access Intent (OAI) 374: bits 0-1 of byte 32 of the parameter block inform the CPU of future access intent for the input list and the first operand. The provided access intent may be used to modify cache line installation and replacement policies with respect to corresponding storage locations at various levels of caches in the storage hierarchy.

[0082] If bit 0 of the OAI field is 1, then storage locations designated as containing data from any active input list may be referenced as one or more operands of a subsequent instruction. If bit 0 of the OAI field is 0, then storage locations designated as containing data from any active input list may not be referenced as one or more operands of a subsequent instruction.

[0083] If bit 1 of the OAI field is 1, the storage location designated to contain the first operand may be referenced as one or more operands of a subsequent instruction. If bit 1 of the OAI field is 0, the storage location designated to contain the first operand may not be referenced as one or more operands of a subsequent instruction.

[0084] There is no guarantee that the CPU will use this information, and the period during which this information is available is undefined but finite.

[0085] If the next sequential instruction after the Next Instruction Access Intent (NIAI) is a list reordering (SORTL), the execution of the SORTL is not affected by the NIAI.

[0086] The OAI is not updated during the execution of the command.

[0087] Active Input Lists Count Code (AILCC) 376: Bits 1 through 7 of byte 33 of the parameter block are a 7-bit unsigned integer that specifies the number of an input list that marks the boundary between active and inactive input lists. For example, an input list with a list number less than or equal to the value of the AILCC field is in an active state. For example, an input list with a list number greater than the value of the AILCC field is in an inactive state. The number of input lists in an active state is one more than the value in the AILCC field.

[0088] An input list that is in an active state participates in the operation. An input list that is in an inactive state does not participate in the operation.

[0089] Bit 0 of byte 33 of the parameter block is reserved and should contain a zero, otherwise programs may not work in a future compatible manner.

[0090] In one example, a general operand data exception is recognized if the value of the AILCC field plus one is greater than the number of input lists described in the parameter block, as specified by bits 0 through 7 of the PBVN field.

[0091] The value specified in the AILCC field does not affect the size of the parameter block. Access exceptions apply to references to parameter block fields that specify the address or length of an input list that corresponds to an inactive input list.

[0092] The AILCC is not updated during the execution of an instruction.

[0093] Empty Input Lists Control (EILCL) 378: If bit 0 of byte 40 of the parameter block is 1, the operation terminates when the length of input list 0 becomes zero during the operation. If bit 0 of byte 40 of the parameter block is 0, the operation continues when the length of input list 0 becomes zero during the operation. If bit 1 of byte 40 of the parameter block is 1, the operation terminates when the length of any active input list other than input list 0 becomes zero during the operation. If bit 1 of byte 40 of the parameter block is 0, the operation continues when the length of any active input list other than input list 0 becomes zero during the operation.

[0094] If the length of the active input list is initially zero before execution of the instruction, the corresponding bit in EILCL does not apply.

[0095] The EILCL is not updated during the execution of an instruction.

[0096] It is expected that a program will not change the EILCL when instructions are re-executed with the intent of resuming operation, otherwise the results will be unpredictable.

[0097] Empty Input List Flag (EILF) 380: If EILCL is binary 11 and the operation terminates because the updated length of the active input list is equal to 0 and condition code 2 is set, for example, the processor stores a value of 1 in bit 2 of byte 40 of the parameter block, otherwise it stores a value of 0 in bit 2 of byte 40 of the parameter block. If EILF contains a value of 1, the input list number of the input list that was emptied during the operation is placed in the EILN field of the parameter block. In one example, a program initializes EILF to 0.

[0098] The EILF may be referenced at the beginning of execution of an instruction when operation is resumed. It is expected that a program will not modify the EILF when instructions are re-executed with the purpose of resuming operation, otherwise results will be unpredictable.

[0099] Empty Input List Number (EILN) 382: if a condition causes a value of 1 to be stored in the EILF field, for example by a processor, the input list number of an input list that was emptied during operation is stored in byte 41 of the parameter block, otherwise a value of 0 is stored in byte 41 of the parameter block.

[0100] At the start of an operation, EILN is ignored. In one example, a program initializes EILN to 0.

[0101] Incomplete Input List Flag (IILF) 384: A value of 1 is stored in bit 0 of byte 46 of the parameter block, for example by the processor, if an operation is terminated as a result of attempting to process an incomplete input list, otherwise a value of 0 is stored in bit 0 of byte 46 of the parameter block. An active input list is considered to be incomplete if the length of the corresponding input list is greater than 0 and less than the number of bytes in the record specified by the input list address. This condition may exist at the beginning of an operation or may occur during an operation. If the IILF contains a value of 1, the input list number of the incomplete input list that occurred is placed in the IILN field of the parameter block. In one example, a program initializes the IILF to 0.

[0102] If the operation terminates with condition code 2 and the resulting value in the IILF field is 0, the operation terminated due to an empty input list. If the operation terminates with condition code 2 and the resulting value in the IILF field is 1, the operation terminated due to an incomplete input list.

[0103] The IILF may be referenced at the beginning of execution of an instruction when operation is being resumed. It is expected that the program will not modify the IILF when instructions are re-executed for the purpose of resuming operation, otherwise results will be unpredictable.

[0104] Incomplete Input List Number (IILN) 386: If a condition causes a value of 1 to be stored in the IILF field, for example by the processor, the input list number of the incomplete input list that occurred is stored in byte 47 of the parameter block, otherwise a value of 0 is stored in byte 47 of the parameter block. If multiple input lists are incomplete, which incomplete input list number is stored in the IILN field is model dependent. In one example, a program initializes IILN to 0.

[0105] At the start of the operation, IILN is ignored.

[0106] Continuation Record Recall Buffer Origin 388: A 4K byte buffer in storage, called the continuation record recall buffer, is provided by the program for the CPU to store and reference data between two executions of the same list sort instruction in case the operation ends and may be resumed later. The 52 bits starting at bit 0 of byte 56 and continuing through bit 3 of byte 62 of the parameter block contain an unsigned binary integer used in forming a continuation record recall address aligned on a 4K byte boundary. The continuation record recall address is, for example, the logical address of the leftmost byte of the continuation record recall buffer.

[0107] In 24-bit addressing mode, bits 40 through 51 of the continuation record recall buffer origin, appended on the right with 12 zeros, form the continuation record recall address. In 31-bit addressing mode, bits 33 through 51 of the continuation record recall buffer origin, appended on the right with 12 zeros, form the continuation record recall address. In 64-bit addressing mode, bits 0 through 51 of the continuation record recall buffer origin, appended on the right with 12 zeros, form the continuation record recall address.

[0108] In access register mode, access register 1 specifies the address space in storage that contains the continuation record recall buffer.

[0109] If merge mode (MM) is 0 and the operation terminates after storing one or more records and successful completion did not occur, the key of the last record stored in the first operand is also stored in the continuation record recall buffer. If MM is 1, the continuation record recall buffer origin is ignored.

[0110] During execution of the instruction, the continuation record recall buffer origin is not changed.

[0111] It is expected that the program will not change the continuation record recall buffer origin when instructions are re-executed with the intent of resuming operation, otherwise the results will be unpredictable.

[0112] Continuation State Buffer (CSB) 390: Internal state data is stored by the processor, for example, in bytes 64-575 of the parameter block if a condition causes a value of 1 to be stored in the CF field, otherwise bytes 64-575 of the parameter block are undefined and may be modified. The stored internal state data is model dependent and may then be used to resume operation when the instruction is re-executed. In one example, a program initializes the continuation state buffer to 0. It is expected that the program will not modify the continuation state buffer when an instruction is re-executed with the intent of resuming operation, otherwise results will be unpredictable.

[0113] As an example, the internal state data includes information about the input list, such as information about previous comparisons of records in the input list to determine the next comparison to be made. The internal state data is model dependent, in that it may be stored or presented differently depending on the processor model. Other variations are possible.

[0114] In one embodiment, an instruction may be partially completed by one model in the configuration, and execution may resume in a different model in the configuration. In one embodiment, the different models may maintain different internal states, but in one example, each model may interpret the contents, if any, of the CSB that is employed to resume operation. When operation resumes, the MVN indicates what contents, if any, of the CSB the machine can interpret.

[0115] Addresses of Input List N 392, 394, 396: A parameter block defines multiple input lists. The number of input lists defined in a parameter block (N IS ) is specified by bits 0 to 7 of PBVN362. The input list contains bits 0 to (N IS The parameter block specifies, for example, the logical address of an 8-byte input list for each input list. For input list number N, the contents of bytes 576+16×N through 583+16×N of the parameter block specify, for example, the logical address of the leftmost byte of input list number N in storage.

[0116] The addresses of each input list specified by the AILCC field that correspond to an active input list become inputs to the operation and are updated by the operation. The addresses of each input list specified by the AILCC field that correspond to an inactive input list are ignored by the operation.

[0117] If an address in the input list is an input to an operation, then in one embodiment the following applies: In 24-bit addressing mode, bits 40 through 63 of the input list's address specify the location of the leftmost byte of the input list in storage, and the contents of bits 0 through 39 of the input list's address are treated as zero. In 31-bit addressing mode, bits 33 through 63 of the input list's address specify the location of the leftmost byte of the input list in storage, and the contents of bits 0 through 32 of the input list's address are treated as zero. In 64-bit addressing mode, bits 0 through 63 of the input list's address specify the location of the leftmost byte of the input list in storage.

[0118] In access register mode, access register 1 specifies the address space in storage that contains the active input list.

[0119] For an input list to be in an active state, the address of the corresponding input list must be specified on a doubleword boundary; if not, in one case a general operand-data exception will be recognized.

[0120] When an operation updates the addresses of an input list, in one embodiment the following applies: When one or more records in an input list are processed as part of an operation, the address of the corresponding input list is incremented by the number of bytes that the processed record occupies in storage. The formation and updating of the input list address is determined by the addressing mode. In 24-bit addressing mode, bits 40 through 63 of the updated input list address replace the corresponding bits in the parameter block's input list address field, the carry from bit position 40 of the updated input list address is ignored, and the contents of bit positions 0 through 39 of the parameter block's input list address field are set to zero. In 31-bit addressing mode, bits 33 through 63 of the updated input list address replace the corresponding bits in the parameter block's input list address field, the carry from bit position 33 of the updated input list address is ignored, and the contents of bit positions 0 through 32 of the parameter block's input list address field are set to zero. In 64-bit addressing mode, bits 0 through 63 of the updated input list address replace the corresponding bits in the input list address field of the parameter block, and the carry out from bit position 0 of the updated input list address is ignored.

[0121] In 24-bit and 31-bit addressing modes, when an instruction finishes executing and the instruction was not suppressed, disabled, or aborted, the addresses of the 64-bit input lists corresponding to the active input list are updated, respectively, even if their addresses are not incremented.

[0122] Length of Input List N 393, 395, 397: The parameter block specifies the length of the input list, 8 bytes, for each input list. For input list number N, bytes 584+16×N through 591+16×N of the parameter block contain an unsigned integer that specifies the number of bytes in input list number N.

[0123] The length of each input list specified by the AILCC field that corresponds to an active input list is an input to the operation and is updated by the operation. The length of each input list specified by the AILCC field that corresponds to an inactive input list is ignored by the operation.

[0124] In the various addressing modes, the contents of bit positions 0 through 63 of the input list length field specify the length of the corresponding input list.

[0125] If one or more records of an input list are processed as part of an operation, the length of the corresponding input list is decremented by the number of bytes that the processed records occupy in storage. In various addressing modes, bits 0 through 63 of the updated input list length replace bits 0 through 63 in the corresponding input list length field of the parameter block.

[0126] Reserved: There are one or more reserved fields in the parameter block (i.e., fields that contain no other information). As input to an operation, the reserved fields should contain zeros. If they do not, the program may not run compatibly in the future. When the operation completes, the reserved fields may be stored as 0 or may remain unchanged.

[0127] Figures 5A-5B summarize an example of the original and final values ​​of the inputs to the SORTL-SFLR function, including the fields in the parameter block.

[0128] In one embodiment, it is not required or expected that the program will modify the parameter block between terminating the operation with condition code 3 being set and branching back and re-executing the instruction to resume the operation.

[0129] In one embodiment, the SORTL-SFLR function involves multiple comparisons between keys of records from different input lists. When comparing keys, in one example, the following holds: Keys are treated as unsigned binary integers and are also known as unstructured data. When determining which key contains the minimum or maximum value, it may not be necessary to access all bytes of each key being compared. The number of bytes of each key that are compared at one time is called the key comparison unit and is model dependent. The number of bytes of the key that are accessed is an integer number of key comparison units. When comparing keys of equal value, in one example, the key from the input list with the highest input list number is selected to be before other keys with the same value in the sort order. In this case, the corresponding record from the input list with the highest input list number is stored in the first operand before other records with the same key value. This is true for ascending and descending sort orders.

[0130] One implementation may maintain a history of previous comparisons between records from the active input list. When this history is available and applicable, it may be referenced instead of accessing and comparing previously compared records. Referencing the history reduces the execution time required to generate a result and improves processing within the computing environment.

[0131] The SORTL-SFLR function involves selecting records from a set of input lists in a specified sort order and placing the selected records in the first operand position. As the operation proceeds, the current values ​​of the address of the first operand and the address of the active input list are maintained. The function proceeds in units of operation. During each unit of operation, for each active input list, the key specified by the corresponding current input list address is examined and one record is placed in the first operand position.

[0132] If merge mode (MM) is 0, the active input list specifies lists, and each of these lists is treated as containing records in random order, e.g., from left to right. If MM is 0, the records stored in the first operand position constitute one or more output lists, and the starting address and length of each output list are stored in the second operand position. If MM is 0, each unit of operation includes the following steps in the specified order, as one example: 1. Determine whether the next record to be stored in the first operand position may be included in the most recent output list (the output list containing the record most recently stored in the first operand position) as follows: If the continuation flag (CF) is 0 and the first unit of operation is being processed, then no record has been stored in the first operand position and the next record to be stored becomes the first record in the output list. If CF is 1, the previous execution of the instruction ended with a condition code of 1, and the first unit of operation for the current execution of the instruction has been processed, then the next record to store will be the first record in the output list. If CF is 1, IILF is 0, and EILF is 0, and the previous execution of the instruction ended with a condition code of 2, and the first unit of action for the current execution of the instruction is being processed, then the next record to store will be the first record in the output list. If CF is 1, IILF or EILF is 1, the previous execution of the instruction ended with condition code 2, and the first unit of operation for the current execution of the instruction is being processed, the next record to store may be included in the latest output list. If CF is 1, the previous execution of the instruction ended with condition code 3, and the first unit of operation for the current execution of the instruction is being processed, the next record to store may be included in the latest output list. If the unit of operation being processed is not the first unit of operation for the current execution of the instruction, the next record to store may be included in the current output list. 2. Determine the set of records that are eligible to be included in the most recent output list, if the next record to be stored is eligible to be included in the most recent output list. For each active, nonempty, and nonincomplete input list, compare the key of the record specified by the address of the current input list (the current input key) with the key of the record most recently stored in the first operand position (the previously stored key). For this reason, a reference to a previously stored key is not a reference to the first operand position. Instead, the reference is either to the input list whose key was selected, or to a continuation record recall buffer. If operation is being resumed and the current execution of the instruction has not yet placed any record in the first operand position, the reference is to a continuation record recall buffer. If the sort order is ascending and the value of the current input key is greater than or equal to the value of the previously stored key, then consider the current input key to belong to the set of keys eligible for inclusion in the latest output list. If the sort order is descending and the value of the current input key is less than or equal to the value of the previously stored key, then consider the current input key to belong to the set of keys eligible for inclusion in the latest output list. If the number of keys in the set of keys eligible for inclusion in the latest output list is zero, then the next record to store will be the first record in the output list. If the number of keys in the set of keys eligible for inclusion in the latest output list is not zero, then the next record to store will be included in the latest output list. 3. If the next record to store is to be included in the current output list, compare the keys in the set of keys eligible to be included in the current output list. If the sort order is ascending, select the smallest key value and corresponding record. If the sort order is descending, select the largest key value and corresponding record. 4. If the next record to store is to be the first record in the output list, compare the keys of the records specified by the addresses of the current input lists that correspond to input lists that are active, nonempty, and not incomplete. If the sort order is ascending, select the smallest key value and corresponding record. If the sort order is descending, select the largest key value and corresponding record. 5. The selected record is placed in the current first operand position. 6. The address of the current first operand is incremented by a number of bytes equal to the length of the selected record. 7. The address of the current input list corresponding to the input list containing the selected record is incremented by a number of bytes equal to the length of the selected record.

[0133] As part of the operation when merge mode is 0, for each output list stored in the first operand location, a corresponding output list summary description (OLD) is stored in the second operand location. Each OLD contains, for example, an 8-byte OLD address specifying the location of the first record in the corresponding output list, and, for example, an 8-byte OLD length specifying the length of the corresponding output list in bytes. If the operation terminates with condition code 3, an EILF equal to condition codes 2 and 1, or an IILF equal to condition codes 2 and 1, the most recent output list being processed at the end of the operation may have been partially processed and not completely processed. That is, the number of records in a partially processed output list is an intermediate value and may be increased when the operation is resumed. In that case, the output list summary description (OLD) corresponding to the partially processed output list is not placed in the second operand location until the output list has been completely processed after the operation is resumed.

[0134] If merge mode is 0 and the operation terminates after storing one or more records and successful completion does not occur, the key of the last record stored in the first operand position is also stored in the continuation record recall buffer.

[0135] If merge mode is 0 and the operation terminates due to normal completion, one or more output lists are placed in the first operand position, and a description of the output lists is placed in the second operand position. The program may use the description of the output lists as the address and length values ​​of the input lists in the parameter block for subsequent SORTL operations.

[0136] 6A-6D show the first and second operands before and after executing SORTL-SFLR with merge mode equal to 0. With reference to FIGS. 6A-6B, FOSA 600 is the start address of the first operand (location specified by R1), FOEA 602 is the end address of the first operand (location specified by R1+(R1+1)-1), and OL 604 is the output list (e.g., output list 1...output list N). With further reference to FIGS. 6C-6D, SOSA 610 is the start address of the second operand (location specified by R2), SOEA 612 is the end address of the second operand (location specified by R2+(R2+1)-1), and OLD 614 is the output list specification (e.g., output list specification 1...output list specification N).

[0137] If merge mode (MM) is 1, the active input list specifies lists, and each of these lists is treated as containing records, from left to right, in the order specified by the SO field of the parameter block. When MM is 1, the records stored in the first operand positions constitute a single output list. When MM is 1, each unit of operation includes the following steps in the specified order, as one example: 1. Compare the keys of the records specified by the addresses of the current input lists that correspond to active, non-empty, and non-incomplete input lists. If the sort order is ascending, select the smallest key value and corresponding record. If the sort order is descending, select the largest key value and corresponding record. 2. The selected record is placed in the current first operand position. 3. The address of the current first operand is incremented by a number of bytes equal to the length of the selected record. 4. The address of the current input list corresponding to the input list containing the selected record is incremented by a number of bytes equal to the length of the selected record.

[0138] 7A-7B show the first operand before and after executing SORTL-SFLR with merge mode equal to 1. With reference to FIGS. 7A-7B, FOSA 700 is the starting address of the first operand (the location specified by R1), FOEA 702 is the ending address of the first operand (the location specified by R1+(R1+1)-1), and OL 704 is the output list (e.g., Output List 1).

[0139] As part of the operation when merge mode is 0 or 1, the addresses and lengths of the active input lists are updated. For each active input list, the address of the input list is incremented by the number of bytes of the record from the input list that was selected during the operation and placed into the first operand position, and the length of the input list is decremented by the same number. The formation and updating of the addresses of the input lists is determined by the addressing mode.

[0140] As an operation proceeds, an incomplete input list may occur. An incomplete input list is recognized during a unit of operation that attempts to reference records from the incomplete input list. Multiple units of operation may be completed before the incomplete input list is recognized. This is true when merge mode is 0 or 1.

[0141] As the operation proceeds, an access exception may occur if an access exception is applicable for an access to the input list, the first operand, or the second operand. If an access exception exists for a storage location during a unit of operation that attempts to access that location, the access exception is recognized. Multiple units of operation may be completed before the access exception is recognized. This is true when merge mode is 0 or 1.

[0142] When an operation ends with partial completion, internal state data, which may include the history of previous comparisons between records, is stored in the Continuation State Buffer (CSB) field of the parameter block. If the instruction is subsequently re-executed with the intent of resuming the operation, the contents of the CSB may be read into the implementation and the history may be consulted when the operation resumes. This is true when merge mode is 0 or 1.

[0143] Successful completion occurs when the records from the active input list have been sorted and stored in the first operand.

[0144] When an operation ends due to successful completion, in one embodiment the following occurs: The address in general register R1 and the length in general register R1+1 are updated. If MM is 0, the address in general register R2 and the length in general register R2+1 are updated. For input lists that are in the active state, the Address of Input List N field and the Length of Input List N field are updated. The model version number is set. The continue flag is set to 0. The empty input list flag is set to 0. The empty input list number is set to 0. The incomplete input list flag is set to 0. The incomplete input list number is set to 0. Condition code 0 is set.

[0145] The formation and updating of the address and length depends on the addressing mode.

[0146] If normal completion occurs, the CSB field of the parameter block is undefined after the operation completes.

[0147] The operation ends when a CPU determined number of bytes have been processed and, in one embodiment, the following occurs: The address in general register R1 and the length in general register R1+1 are updated. If MM is 0, the address in general register R2 and the length in general register R2+1 are updated. For input lists that are in the active state, the Address of Input List N field and the Length of Input List N field are updated. The model version number is set. The continue flag is set to 1. If MM is 0 and one or more records have been positioned in the first operand position during execution of the instruction, the key value is stored in the continuation record recall buffer. The continuous state buffer is updated. The empty input list flag is set to 0. The empty input list number is set to 0. The incomplete input list flag is set to 0. The incomplete input list number is set to 0. Condition code 3 is set.

[0148] The formation and updating of the address and length depends on the addressing mode.

[0149] The number of bytes determined by the CPU is model-dependent and may be a different number each time the instruction is executed. The number of bytes determined by the CPU is usually non-zero. This number can reach zero, giving the appearance of a no-progress condition, but the CPU prevents the infinite recurrence of this no-progress condition.

[0150] For example, after an instruction has completed with condition code 3 set, the program is expected to branch back and re-execute the instruction to resume operation without changing either the input or output specifications for the instruction.

[0151] If bit 0 of the empty input list control (EILCL) is 1 and during an operation the length of input list 0 becomes 0 and normal completion does not apply, then in one embodiment the operation terminates and the following occurs: The address in general register R1 and the length in general register R1+1 are updated. If MM is 0, the address in general register R2 and the length in general register R2+1 are updated. For input lists that are in the active state, the Address of Input List N field and the Length of Input List N field are updated. The model version number is set. The continue flag is set to 1. If EILCL is binary 10 and MM is 0, the key value may be stored in the continuation record recall buffer. If EILCL is binary 11 and MM is 0, the key value is stored in the continuation record recall buffer. In either case, during execution of the instruction, one or more records are placed in the position of the first operand. The continuous state buffer is updated. The empty input list flag is set (see Figure 8, which shows the various parameter block fields when the operation ends). An empty input list number is set (see Figure 8). The incomplete input list flag is set to 0. The incomplete input list number is set to 0. Condition code 2 is set.

[0152] The formation and updating of the address and length depends on the addressing mode.

[0153] If bit 1 of the empty input list control (EILCL) is 1 and during an operation any active input list other than input list 0 becomes length 0 and normal completion does not apply, then in one embodiment the operation terminates and the following occurs: The address in general register R1 and the length in general register R1+1 are updated. If MM is 0, the address in general register R2 and the length in general register R2+1 are updated. For input lists that are in the active state, the Address of Input List N field and the Length of Input List N field are updated. The model version number is set. The continue flag is set to 1. If EILCL is binary 01 and MM is 0, the key value may be stored in the continuation record recall buffer. If EILCL is binary 11 and MM is 0, the key value is stored in the continuation record recall buffer. In either case, during execution of the instruction, one or more records are placed in the position of the first operand. The continuous state buffer is updated. The empty input list flag is set (see Figure 8). An empty input list number is set (see Figure 8). The incomplete input list flag is set to 0. The incomplete input list number is set to 0. Condition code 2 is set.

[0154] The formation and updating of the address and length depends on the addressing mode.

[0155] If an incomplete input list is encountered in an active state, the operation terminates and in one embodiment the following occurs: The address in general register R1 and the length in general register R1+1 are updated. If MM is 0, the address in general register R2 and the length in general register R2+1 are updated. For input lists that are in the active state, the Address of Input List N field and the Length of Input List N field are updated. The model version number is set. The continue flag is set to 1. If MM is 0 and one or more records have been positioned in the first operand position during execution of the instruction, the key value is stored in the continuation record recall buffer. The continuous state buffer is updated. The empty input list flag is set to 0. The empty input list number is set to 0. The Incomplete Input List Flag (IILF) is set to 1. The input list number of the incomplete input list that occurred is placed in the incomplete input list number (IILN) field of the parameter block. Condition code 2 is set.

[0156] The formation and updating of the address and length depends on the addressing mode.

[0157] If the length of the first operand is insufficient to store another record, the operation terminates and, in one embodiment, the following occurs: The address in general register R1 and the length in general register R1+1 are updated. If MM is 0, the address in general register R2 and the length in general register R2+1 are updated. For input lists that are in the active state, the Address of Input List N field and the Length of Input List N field are updated. The model version number is set. The continue flag is set to 1. If MM is 0 and one or more records are located in the first operand position during execution of the instruction, the key value may be stored in a continuation record recall buffer. The continuous state buffer is updated. The empty input list flag is set to 0. The empty input list number is set to 0. The incomplete input list flag is set to 0. The incomplete input list number is set to 0. Condition code 1 is set.

[0158] The formation and updating of the address and length depends on the addressing mode.

[0159] If the merge mode (MM) is 0 and the length of the second operand is less than 16, the operation terminates and, in one embodiment, the following occurs: The address in general register R1 and the length in general register R1+1 are updated. The address in general register R2 and the length in general register R2+1 are updated. For input lists that are in the active state, the Address of Input List N field and the Length of Input List N field are updated. The model version number is set. The continue flag is set to 1. When one or more records are located in the first operand position during execution of the instruction, the key value may be stored in a continuation record recall buffer. The continuous state buffer is updated. The empty input list flag is set to 0. The empty input list number is set to 0. The incomplete input list flag is set to 0. The incomplete input list number is set to 0. Condition code 1 is set.

[0160] The formation and updating of the address and length depends on the addressing mode.

[0161] If the execution of an instruction terminates with completion (and does not terminate with suppression, overriding, or abortion) and normal completion does not occur, the operation termination condition is called partial completion.

[0162] A PER storage alteration event is recognized, if applicable, for the first operand location, the second operand location, the continuation record recall buffer, and any portion of the stored parameter block. If a PER storage alteration event is recognized, additional bytes, less than 4K, are stored at the operand locations that intersect with the specified PER storage area before the event is reported.

[0163] PER zero address detection events are recognized, where applicable, for the parameter block, the first operand location, and the second operand location. Zero address detection does not apply to the input list address and continuation record recall buffer origin specified within the parameter block.

[0164] For a description of examples of other conditions that apply to the SORTL-SFLR function, see "Other Conditions" below.

[0165] If the instruction terminates with condition code 1, the program may modify the address of the first operand, the length of the first operand, the address of the second operand, the length of the second operand, the addresses of any active input lists, and the lengths of any active input lists, as necessary, and then resume operation.

[0166] If the instruction completes with condition code 2, the IILF is equal to 0, and the EILF is equal to 0, the program may modify the address of the first operand, the length of the first operand, the address of the second operand, the length of the second operand, the addresses of any active input lists, and the lengths of any active input lists, as necessary, and then resume operation.

[0167] If the instruction completes with condition code 2 and EILF is equal to 1, the program may modify the address and length of the input list specified by EILN, if necessary, and then resume operation. In this case, when merge mode (MM) is 1, the program may modify the address of the first operand and the length of the first operand.

[0168] If the instruction completes with condition code 2 and IILF is equal to 1, the program may modify the address and length of the input list specified by IILN, if necessary, and then resume operation. In this case, when merge mode (MM) is 1, the program may modify the address of the first operand and the length of the first operand.

[0169] If an instruction completes with condition code 3 and the program modifies the address or length of any active input list, the address or length of the first operand, or the address or length of the second operand before reexecuting the instruction to resume operation, the results are unpredictable. Function code 2: SORTL-SVLR (variable length record sort)

[0170] The SORTL-SVLR function operates identically to the SORTL-SFLR function, with the following exceptions: 9, the record includes a fixed-length key 900, an 8-byte payload length (PL) 902, and a variable-length payload 904. Thus, the record has a variable length. Bytes 14-15 of the parameter block for the SORTL-SVLR function are ignored. The least significant, e.g., two bytes, of the payload length field of each record contain an unsigned binary integer that specifies the length, in bytes, of the payload in the same record. A payload length of 0 is valid. The payload length should be a multiple of, e.g., 8, or, in one example, a general operand-data exception is recognized. The most significant, e.g., 6 bytes, of the payload length field are reserved and should contain zeros, or, in one example, the program may not work in a compatible manner in the future. The sum of the key length (8) and the payload length should not be greater than, e.g., 4096, or, in one example, a general operand-data exception is recognized. If a general operand-data exception is recognized as a result of an improper payload length, the address of the input list corresponding to the active input list in which this exception occurred specifies the logical address of the leftmost byte of the erroneous record. If a variable-length record is stored in the first operand position, the reserved bytes of the payload length field are not modified. During a unit of operation that attempts to look up only the keys of records from an input list that has an input list length greater than the key size and less than the record size, an incomplete input list may not be recognized. In this case, an incomplete input list is recognized when attempting to store a record from the incomplete input list into the first operand position.

[0171] The parameter block for the SORTL-SVLR function is identical to the parameter block for the SORTL-SFLR function, except for bytes 14-15 shown above.

[0172] For a description of other terms that apply to the SORTL-SVLR feature, see "Other Terms" below.

[0173] Special Conditions In one embodiment, an attempt is made to perform a list reordering and a specification exception is recognized if any of the following are true: Bits 57 through 63 of general register 0 specify a feature code that is either unassigned or not installed. The R1 field specifies an odd-numbered register or general register 0. The R2 field specifies an odd-numbered register or general-purpose register 0. This is true when merge mode (MM) is 0 or 1. The parameter block is not specified on a doubleword boundary. The SORTL-SFLR or SORTL-SVLR function is specified and the first operand is not specified on a doubleword boundary. If MM is 0, the SORTL-SFLR or SORTL-SVLR function is specified and the second operand is not specified on a doubleword boundary.

[0174] In one embodiment, an attempt is made to perform a list reordering and a general operand-data exception is recognized if any of the following are true: If the SORTL-SFLR or SORTL-SVLR function is specified and none or more than one of bits 0 through 7 of the parameter block version number contains a value of 1, the operation is suppressed. The SORTL-SFLR or SORTL-SVLR function was specified and the parameter block size or format specified by the parameter block version number is not supported by the model, in which case the action is suppressed. If the SORTL-SFLR or SORTL-SVLR function is specified and the record key length specifies a key size of 0, a key size that is not a multiple of 8, or a key size greater than 4096, the action is suppressed. If the SORTL-SFLR feature is specified and the record payload length specifies a payload size that is not a multiple of 8, or the payload size, when added to the key size, is greater than 4096, the operation is suppressed. If the SORTL-SVLR feature is specified and the record payload length specifies a payload size that is not a multiple of 8, or the payload size, when added to the key size, is greater than 4088, then the operation is either suppressed or aborted, depending on the model. If the SORTL-SFLR or SORTL-SVLR function is specified and the value of the active input list count code (AILCC) plus one is greater than the number of input lists represented by the parameter block, the operation is suppressed. If a SORTL-SFLR or SORTL-SVLR function is specified and the address of the input list corresponding to the active input list is not specified on a doubleword boundary, the operation is suppressed.

[0175] Other terms In one embodiment, the following conditions apply: Execution of the instruction is interruptible. If an interrupt occurs, the addresses in general purpose registers R1 and R2, the lengths in general purpose registers R1+1 and R2+1, and certain fields in the parameter block are updated so that when the instruction is executed again, it will resume at the point of the interrupt.

[0176] No access exceptions are recognized for locations more than 4K bytes to the right of the location specified by the address of the first operand.No access exceptions are recognized for locations more than 4K bytes to the right of the location specified by the address of the input list.

[0177] If an access exception is to be recognized for the first operand, the second operand, or either of the input lists, the result is either that the exception is recognized or that condition code 3 is set. If condition code 3 is set, the exception will be recognized when the instruction is re-executed to continue processing the same operand, assuming that the exception condition still exists.

[0178] If a record's key crosses a page boundary and an access exception condition exists on both pages, either access exception may be recognized.

[0179] If access exception conditions exist for multiple keys being processed during a single unit of operation, any of these conditions may be recognized.

[0180] If a parameter block crosses a page boundary and an access exception condition exists for both pages, the access exception is recognized for the leftmost page.

[0181] When an operation finishes with partial completion, up to 4K bytes of data may have been stored to the location specified by the address of the updated first operand, or to locations in the first operand to the right of that location. Such stores result in the setting of a modification bit, if applicable, and recognition of a PER storage modification event, if applicable. If the instruction is re-executed to continue processing the same operand, the stores to these locations are repeated.

[0182] When observed by this CPU, other CPUs, and channel programs, references to the parameter block, first operand, output list description buffer, and active input list may be multiple-access references; accesses to these storage locations are not necessarily block-concurrent, and the sequence of these accesses or references is not defined.

[0183] In one embodiment, if the specified function is SORTL-SFLR or SORTL-SVLR and any of the following are true, the results are unpredictable: The parameter block overlaps either the active input list or the first operand. Any active input list overlaps the first operand. Merge mode is 0 and the parameter block overlaps the second operand or continuation record recall buffer. The merge mode is 0 and either the active input list overlaps the second operand or the continuation record recall buffer. The merge mode is 0 and the first operand overlaps the second operand or a continuation record in the recall buffer. The merge mode is 0 and the second operand overlaps the continuation record recall buffer. The other CPU or channel program stores the key of the record in the input list or continuation record recall buffer.

[0184] Example of generated condition code: 0 Successful completion 1. The length of the first operand is less than the size of the record, or merge mode is 0 and the length of the second operand is less than 16 (i.e., the length of the first or second operand is insufficient to continue) 2 An incomplete input list was encountered (IILF=1) or EILCL was nonzero and the length of the input list became equal to zero during the operation (i.e., an incomplete or empty input list was encountered). 3 CPU-determined amount of data processed (i.e. CPU-determined completion)

[0185] Program Exceptions: Access (fetch input list, fetch and store parameter block and continuation record recall buffer, store operands 1 and 2) Data, general operands with DXC (Data Exception Code) 0 Arithmetic (unless Improved Sorting is installed) designation Transaction Constraints

[0186] The priority of execution of list reordering instructions is shown below. When multiple conditions exist with priority values ​​starting with 13, the condition recognized is the first one encountered as the operation proceeds. When the operation is resumed (the continue flag is 1 at the beginning of the instruction's execution), instead of first accessing the active non-empty input list, the history of previous comparisons between keys may be used. As a result, access exceptions for accesses to a particular input list may not occur at the same point in processing compared to when the history of previous comparisons is not used. When variable length records are processed, conditions that are a function of the record length may be partially evaluated before the payload length is determined and fully evaluated after the payload length is determined. As a result, the observed priority may differ between such conditions if it is determined that a condition exists only after partially evaluating the requirements, rather than after fully evaluating all of them.

[0187] Execution priority (SORTL) 1.~6. Exceptions with priority equal to the priority of the program interrupt condition for the general case. 7.A Access exception on halfword of second instruction. 7.B Operation exception. 7.C Transaction Constraints. 8.A Specification exception due to invalid function code or invalid register number. 8.B Specification exception caused by the first operand not being specified on a doubleword boundary. 8.C Specification exception caused by the first operand not being specified on a doubleword boundary. 8.D Specification exception caused by the second operand not being on a doubleword boundary and merge mode is 0. 9. Access exception regarding access to bytes 0 to 7 of the parameter block. 10. General Operand Data Exception caused by an unsupported value of the PBVN field in the parameter block. 11. Access exception for accessing any byte of the parameter block other than bytes 0 to 7. 12. General Operand Data Exception caused by an invalid value for a field in a parameter block other than the PBVN. 13.A Access exception regarding access to active input list. 13.B Access exception on access to continuation record recall buffer when merge mode is 0. 13.C Access exception on access to the first operand. 13.D Access exception on access to second operand when merge mode is 0. 13.E Condition code 2 caused by an incomplete input list. 13.F Condition code 1 due to insufficient length of first operand. 13.G Condition code 1 due to insufficient length of the second operand when merge mode is 0. 13.H General Operand Data Exception due to invalid payload length for variable length record. 13.I Condition code 2 due to an empty input list. 14. Condition code 3.

[0188] Programming Notes: In one embodiment, 1. The intended use of the empty input list control (EILCL) is as follows: EILCL(0:1) (Binary) Description 00 Stop after records from the active input list have been stored (i.e., all records from all active input lists). 10 Stop after input list 0 (always active) is empty. 11 Stop after any active input list is empty. 2. If the active input list count code (AILCC) is 0, i.e. there is only one active input list, the result stored in the first operand position is the same as the data fetched from input list 0. 3. Models that implement separate instruction and data caches may use the instruction cache to perform storage operand fetch references to data in the active input list. 4. If a program plans to call list sort multiple times with merge mode equal to 0 as part of processing a large data set, the program will, in one example, take advantage of the available input lists and split the records evenly between the input lists, thereby reducing the number of times the data is accessed when sorting the entire data set. 5. After a list sort using merge mode equal to 0 has finished with condition code 0 set and multiple output list summary descriptions (OLD) in the second operand, a program attempting to generate a single list of records in sorted order may invoke another list sort operation with an input list specified to be the OLD from a previous invocation of list sort. In this case, in one instance, the second invocation of list sort specifies merge mode equal to 1. Similarly, in one embodiment, List Sort using merge mode equal to 0 is called as many times as necessary or desired to generate a complete set of sorted lists from the multiple randomly ordered records, and then, in one example, List Sort is called as many times as necessary or desired to generate a single sorted list using merge mode equal to 1. 6. When merging multiple sorted lists into a single list, with (for example) ascending sort order, to reduce the number of times each record is accessed, the program, in one embodiment, performs the following process: Determines the maximum number of input lists (N) that can be used for list sorting. Compare the keys of the first records of the sorted lists that have not yet been merged into a single list. Select the N lists that contain the smallest first key values. Perform a list sort using a merge mode (MM) equal to 1, an empty input list control (EILCL) equal to the binary number 10, an input list of 0 specifying only the first record in the list containing the largest first key value among the N selected lists, and remaining input lists specifying the other N-1 selected lists. After the list sort has finished with a condition code of 2, an IILF equal to 0, and an EILF equal to 0, the process is repeated. 7. After condition code 1 is set and list sort is terminated, the program, in one example, performs the following actions before calling list sort again to resume operation: If the length of the first operand is less than the maximum record length of the record being processed, then the length of the first operand or the address and length of the first operand should be updated, as appropriate. If the merge mode (MM) is 0 and the length of the second operand is less than 16, the length of the second operand or the address and length of the second operand should be updated, as appropriate. If the length of any active input list is equal to 0, the address and length of the corresponding input list may be updated to specify that the other list of records is to be included in the sort operation. 8. After condition code 2 is set and list sort is terminated, the program, in one example, performs the following actions before calling list sort again to resume operation: If the incomplete input list flag (IILF) is 1, the length of the input list identified by the incomplete input list number (IILN) or the address and length of the input list should be updated, if necessary. If the empty input list flag (EILF) is 1, the length of the input list identified by the empty input list number (EILN) or the address and length of the input list should be updated, if necessary. If the IILF is 0, the EILF is 0, and the length of input list 0 is 0, then the length of input list 0 or the address and length of input list 0 should be updated, as appropriate. Additionally, the address and length of the active input list may be updated, which may be the appropriate action if only one record specified by input list 0 is initially present and the empty input list control (EILCL) is binary 10. If merge mode (MM) is 1 and the length of the first operand is less than the maximum record length of the records being processed, the length of the first operand or the address and length of the first operand should be updated, as appropriate. If MM is 0 and either IILF is 1 or EILF is 1, the address and length of the first operand and the address and length of the second operand should not be updated. If MM is 0, IILF is 0, EILF is 0, and the length of the first operand is less than the maximum record length of the record being processed, then the length of the first operand or the address and length of the first operand should be updated, as appropriate. If MM is 0, IILF is 0, EILF is 0, and the length of the second operand is less than 16, then the length of the second operand or the address and length of the second operand should be updated, as appropriate.

[0189] As described herein, in one aspect, a single instruction (e.g., a single engineered machine instruction (list sort)) is provided for performing sort and / or merge operations on a general-purpose processor. In one example, a program executing on a general-purpose processor that performs sort and / or merge operations on a database can replace a significant subset of the base instructions and perform the operations using a single instruction. For example, the instruction is a hardware instruction defined in an Instruction Set Architecture (ISA). As a result, the program complexity for the sort and / or merge operations is reduced. Furthermore, the performance of the operations (and therefore the processor) is improved.

[0190] The list sorting instructions are advantageously executed on a general purpose processor (e.g., a central processing unit, referred to herein as a processor) rather than a special purpose processor such as a graphics processing unit (GPU), a database engine (DBE), or other type of special purpose processor.

[0191] Although various fields and registers have been described, one or more aspects of the invention may use other more or fewer fields or registers, or other sized fields and registers, etc. Many variations are possible. For example, implied registers may be used in place of explicitly specified registers or fields of an instruction, or explicitly specified registers or fields may be used in place of implicit registers or fields, or both. Other variations are also possible.

[0192] In one example, list sorting instructions are useful for large amounts of data in a database (e.g., a commercial database), such as megabytes or terabytes of data. Thus, in accordance with an aspect of the present invention, one or more controls are provided to direct the behavior of the merge operation to minimize data accesses and the amount of data moved between memory and processor storage.

[0193] By way of example, the one or more controls include an empty input list control (EILCL), an empty input list flag (EILF), and an empty input list number (EILN). In one example, input list number 0 includes an empty input list control that is independent of other input lists.

[0194] An example illustrating the difference between processing a merge operation without an EILCL and processing a merge operation with an EILCL (for the same input data) in storage access is provided below. EILCL: Goal: Minimize the number of passes over the data. - Allows software (e.g., a program) to merge multiple input lists with minimal access to data in storage. - The hardware supports a finite number of input lists. - The input to the merge operation is multiple lists, where each list contains multiple records in sorted order. - The software maintains metadata for each list that is merged. This metadata includes the key value of the first record in the list being processed. - Each time software calls the sort / merge hardware, software specifies the input to the hardware to be the subset of the list that contains the lowest first record key value (for ascending sort order). Software specifies to hardware IL0 a single record from the remaining list (lists not processed by calls to the SORTL instruction) that is the first record of the list that contains the lowest key value (metadata). - Applies to ascending and descending sorting.

[0195] Example: Showing the difference between processing a merge operation without EILCL and processing a merge operation with EILCL (on the same input data).

[0196] Machine: Processes up to four input lists (IL) per action

[0197] Input: 8 lists (each list containing, say, 3 records in sorted order)

[0198] Order:Ascending

[0199] Input: List ID List contents ----- ------ L01 10 25 40 L02 30 56 90 L03 05 12 64 L04 21 59 83 L05 17 34 86 L06 52 79 94 L07 76 87 91 L08 43 63 77

[0200] ------

[0201] Without EILCL:

[0202] Action 1: Merge L01, L02, L03, and L04 into a new list L11.

[0203] Result: List ID List contents ----- ------ L01 L02 L03 L04 L05 17 34 86 L06 52 79 94 L07 76 87 91 L08 43 63 77 L11 05 10 12 21 25 30 40 56 59 64 83 90

[0204] Action 2: Merge L05, L06, L07, and L08 into a new list L21.

[0205] Result: List ID List contents ----- ------ L01 L02 L03 L04 L05 L06 L07 L08 L11 05 10 12 21 25 30 40 56 59 64 83 90 L21 17 34 43 52 63 76 77 79 86 87 91 94

[0206] Action 3: Merge L11 and L21 into the final list L31.

[0207] Result: List ID List contents ----- ------ L01 L02 L03 L04 L05 L06 L07 L08 L11 L21 L31 05 10 12 21 25 30 40 56 59 64 83 90 17 34...91 94

[0208] Note:- For each record, the storage is accessed twice.

[0209] ------

[0210] Using EILCL:

[0211] For each list, the software maintains metadata (MD) that contains, for example, the key value of the next record to be processed from the list.

[0212] Input: List ID Software MD List contents ----- --------- ------ L01 10 10 25 40 L02 30 30 56 90 L03 05 05 12 64 L04 21 21 59 83 L05 17 17 34 86 L06 52 52 79 94 L07 76 76 87 91 L08 43 43 63 77

[0213] Action 1: EILCL='10'b, generate a new list: L11 IL0:L04-1 Record:21 (First record from the list containing the fourth lowest value of metadata) IL1:L03 (a list containing the lowest metadata value) IL2:L01 (a list containing the second lowest value of the metadata) IL3:L05 (a list containing the third lowest value of the metadata)

[0214] Result: List ID Software MD List Contents ----- --------- ------ L01..25 ​​40 L02 30 30 56 90 L03..64 L04 .. 59 83 L05..34 86 L0 52 52 79 94 L07 76 76 87 91 L08 43 43 63 77 L1 05 10 12 17 21

[0215] The software updates the metadata of the processed listings: List ID Software MD List Contents ----- --------- ------ L01 25 25 40 L02 30 30 56 90 L03 64 64 L04 59 59 83 L05 34 34 86 L06 52 52 79 94 L07 76 76 87 91 L08 43 43 63 77 L11 05 10 12 17 21

[0216] Action 2: EILCL='10'b, add the result to L11 IL0:L08-1 Record:43 (First record from the list containing the fourth lowest value of metadata) IL1:L01 (a list containing the lowest metadata value) IL2:L02 (a list containing the second lowest value of the metadata) IL3:L05 (a list containing the third lowest value of the metadata)

[0217] Result: List ID Software MD List Contents ----- --------- ------ L01.. L02..56 90 L03 64 64 L04 59 59 83 L05..86 L06 52 52 79 94 L07 76 76 87 91 L08..63 77 L11 05 10 12 17 21 25 30 34 40 43

[0218] The software updates the metadata of the processed listings: List ID Software MD List Contents ----- --------- ------ L01.. L02 56 56 90 L03 64 64 L04 59 59 83 L05 86 86 L06 52 52 79 94 L07 76 76 87 91 L08 63 63 77 L11 05 10 12 17 21 25 30 34 40 43

[0219] Action 3: EILCL='10'b, add the result to L11 IL0:L08-1 Record:63 (First record from the list containing the fourth lowest value of metadata) IL1:L06 (a list containing the lowest metadata value) IL2:L02 (a list containing the second lowest value of the metadata) IL3:L04 (a list containing the third lowest value of the metadata)

[0220] Result: List ID Software MD List Contents ----- --------- ------ L01.. L02 90 L03 64 64 L04..83 L05 86 86 L06..79 94 L07 76 76 87 91 L08..77 L11 05 10 12 17 21 25 30 34 40 43 52 56 59 63

[0221] The software updates the metadata of the processed listings: List ID Software MD List Contents ----- --------- ------ L01.. L02 90 90 L03 64 64 L04 83 83 L05 86 86 L06 79 79 94 L07 76 76 87 91 L08 77 77 L11 05 10 12 17 21 25 30 34 40 43 52 56 59 63

[0222] Action 4: EILCL='10'b, add the result to L11 IL0:L06-1 Record:79 (First record from the list containing the fourth lowest value of metadata) IL1:L03 (a list containing the lowest metadata value) IL2:L07 (a list containing the second lowest value of the metadata) IL3:L08 (a list containing the third lowest value of the metadata)

[0223] Result: List ID Software MD List Contents ----- --------- ------ L01.. L02 90 90 L03.. L04 83 83 L05 86 86 L06..94 L0..87 91 L08.. L11 05 10 12 17 21 25 30 34 40 43 52 56 59 63 64 76 77 79

[0224] The software updates the metadata of the processed listings: List ID Software MD List Contents ----- --------- ------ L01.. L02 90 90 L03.. L04 83 83 L05 86 86 L0 94 94 L07 87 87 91 L08.. L11 05 10 12 17 21 25 30 34 40 43 52 56 59 63 64 76 77 79

[0225] Action 5: EILCL='10'b, add the result to L11 IL0:L02-1 record:90 (first record from the list containing the fourth lowest value of metadata) IL1:L04 (a list containing the lowest metadata value) IL2:L05 (a list containing the second lowest value of the metadata) IL3:L07 (a list containing the third lowest value of the metadata)

[0226] Result: List ID Software MD List Contents ----- --------- ------ L01.. L02.. L03.. L04.. L05.. L06 94 94 L07..91 L08.. L11 05 10 12 17 21 25 30 34 40 43 52 56 59 63 64 76 77 79 83 86 87 90

[0227] The software updates the metadata of the processed listings: List ID Software MD List Contents ----- --------- ------ L01.. L02.. L03.. L04.. L05.. L06 94 94 L07 91 91 L08.. L11 05 10 12 17 21 25 30 34 40 43 52 56 59 63 64 76 77 79 83 86 87 90

[0228] Action 6: EILCL='00'b (merge two lists - no need to stop until completely executed), add result to L11 IL0:L06 (Only one of the two lists remains) IL1:L07 (Only one of the two lists remains) IL2: Unused IL3: Unused

[0229] Result: List ID Software MD List Contents ----- --------- ------ L01.. L02.. L03.. L04.. L05.. L06.. L07.. L08.. L11 05 10 12 17 21 25 30 34 40 43 52 56 59 63 64 76 77 79 83 86 87 90 91 94

[0230] Note:- For each record, the storage is accessed once. - In this simple example, a process using EILCL executed the SORTL instruction six times instead of three times, but in a typical use case, the probability that a process using EILCL will employ more invocations of the SORTL instruction than a process not using EILCL is reduced. The typical use case, in one example, has the following characteristics: >The SORTL command can handle more than four input lists. >Each list contains a very large number of records. >The input contains too many lists. When considering overall performance, reducing the number of storage accesses associated with each record outweighs the overall time consumed by executing multiple SORTL instructions, in one embodiment.

[0231] One or more aspects of the present invention are closely related to computer technology and facilitate and improve the performance of processing in a computer. The use of controls to direct the behavior of an operation (e.g., a merge operation) when a particular input list becomes empty reduces data accesses, reduces the amount of data transferred, improves the performance of the operation, and improves the overall performance in a computing environment. Merged records may be used in many technology areas that manage and / or use large amounts of data, such as computer processing, medical informatics, security, etc. Providing optimizations in sorting / merging improves these technology areas by reducing execution time and storage requirements in retrieving and using the information.

[0232] One embodiment of a control-related process for directing the behavior of an operation, such as a merge operation, is described with reference to Figure 10. In one example, the process is performed by a processor (e.g., processor 102 or 204).

[0233] Referring to FIG. 10, an instruction is executed (step 1000), such as a list reordering instruction, another instruction that performs a merge, or another instruction that may use an input list that can become empty. In this example, the instruction is a list reordering instruction that performs a merge operation of multiple input lists. A determination is made as to whether an input list to the instruction has become empty (e.g., the length of the input list has become 0) (inquiry 1002). If it is determined that the input list has become empty, then in one example, a control (e.g., EILCL 378) is checked (step 1004). As an example, the control includes an indicator of input list 0 and other indicators of other input lists. The indicator of the control that is checked is based on the input list that has become empty. For example, if the empty input list is list 0, then a corresponding indicator of EILCL (e.g., bit 0 of EILCL) is checked, and if the empty input list is other than list 0, then the other corresponding indicator of EILCL (e.g., bit 1 of EILCL) is checked.

[0234] If the checked control's indicator is set to a defined value (e.g., 0) (inquiry 1006), the operation being performed by the instruction (e.g., a merge operation) continues (step 1008). However, if the checked control's indicator is not set to a defined value, but instead is set to some other value (e.g., 1), the operation terminates (step 1010).

[0235] Further, in one embodiment, a determination is further made as to whether a control (e.g., EILCL) is set to a selected value (e.g., EILCL 0:1 equal to 11'b') based on the operation terminating due to the input list being empty (INQUIRY 1012). If the value of EILCL is set to the selected value, a determination is further made as to whether a condition code (CC) resulting from the execution of the instruction is set to a particular value (e.g., CC=2) (INQUIRY 1014). Based on EILCL being set to, e.g., 11'b', the operation terminating due to the length of the active input list being equal to, e.g., 0, and the condition code being set to, e.g., 2, another control (e.g., EILF 380) is set to a selected value (e.g., 1) (STEP 1016). Further, an indication of an empty input list is stored (STEP 1018). For example, the input list number of the empty input list is placed in EILN field 382 of the parameter block.

[0236] Returning to inquiry 1002, if the input list is not empty, the process is terminated. Similarly, if the control is not set to a selected value (inquiry 1012) or if the condition code is not set to a particular value (inquiry 1014), the process is terminated.

[0237] Details of one embodiment that facilitates processing within a computing environment as it relates to one or more aspects of the present invention are further described with reference to FIGS. 11A-11B.

[0238] 11A, in one embodiment, multiple records of multiple input lists are merged (1100). The merging may include, for example, determining that one of the multiple input lists has become empty (1102), and based on the determination that the input list has become empty, checking a control specific to the input list, which determines how to proceed (1104). Based on the control, processing is performed (1106).

[0239] In one example, performing the processing includes terminating the merge based on the control being a value of 1 (1108), and in another example, performing the processing includes continuing the merge based on the control being another value (1110).

[0240] In one embodiment, the control includes a plurality of indicators (1112), one indicator of the plurality of indicators is assigned to a selected input list of the plurality of input lists, and another indicator of the plurality of indicators is assigned to another input list of the plurality of input lists (1114).

[0241] Further, in one embodiment, referring to Figure 1 IB, a determination is made as to whether the now emptied input list indication is to be stored at the selected location (1116). This determination is based at least in part on the control (1118). Based on the determination specifying that the indication is to be stored, the input list indication is stored at the selected location (1120).

[0242] As an example, determining whether the instruction is to be stored includes checking the other control 1122. The other control is set to a selected value indicating that the instruction is to be stored in the selected location 1124. The other control is set in part based on the control 1126.

[0243] In one embodiment, the other control is set (1128), which includes checking if the control is at a defined value (1130) and determining if a particular condition code is set, and based on the control being at a defined value and the particular condition code being set, the other control is set (1132) to a selected value.

[0244] In one example, the control is specified (1134) by an instruction, such as a reordering instruction (1136). The reordering instruction, in one example, is defined (1138) based on a selected instruction set architecture. The instruction, in one embodiment, specifies a location of a parameter block in memory, and the parameter block in memory contains the control (1140).

[0245] Other variations and embodiments are possible.

[0246] Aspects of the present invention may be used by many types of computing environments. Another embodiment of a computing environment for incorporating and using one or more aspects of the present invention is described with reference to FIG. 12A. In this example, the computing environment 10 includes a native central processing unit (CPU) 12, memory 14, and one or more input / output devices and / or interfaces 16, coupled together, for example, via one or more buses 18 or other connections. By way of example, the computing environment 10 may include a PowerPC® processor provided by International Business Machines Corporation (Armonk, NY), an HP Superdome with Intel Itanium II processor provided by Hewlett-Packard Co. (Palo Alto, CA), or other machines based on architectures provided by International Business Machines Corporation, Hewlett-Packard Co., Intel Corporation, Oracle Corporation, or other companies, or combinations thereof. IBM, z / Architecture, IBM Z, z / OS, PR / SM, and PowerPC are trademarks or registered trademarks of International Business Machines Corporation in at least one jurisdiction. Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the U.S. and other countries.

[0247] The native central processing unit 12 includes one or more native registers 20, such as one or more general purpose registers and / or one or more special purpose registers that are used during processing within the environment. These registers contain information that represents the state of the environment at any particular point in time.

[0248] Additionally, the native central processing unit 12 executes instructions and code stored in memory 14. In one particular example, the central processing unit executes emulator code 22 stored in memory 14. This code enables a computing environment configured with one architecture to emulate other architectures. For example, the emulator code 22 enables machines based on architectures other than the z / Architecture hardware architecture (e.g., PowerPC processors, HP Superdome servers, etc.) to emulate the z / Architecture hardware architecture and execute software and instructions developed based on the z / Architecture hardware architecture.

[0249] Further details regarding the emulator code 22 are described with reference to FIG. 12B. The guest instructions 30 stored in the memory 14 include software instructions (e.g., interrelated with machine instructions) that are developed to execute on an architecture other than that of the native CPU 12. For example, the guest instructions 30 may be designed to execute on a processor based on the z / Architecture hardware architecture, but are instead emulated on the native CPU 12, which may be, for example, an Intel Itanium II processor. In one example, the emulator code 22 includes an instruction fetch routine 32 for retrieving one or more guest instructions 30 from the memory 14 and optionally providing local buffering of the retrieved instructions. The emulator code 22 also includes an instruction conversion routine 34 for determining the type of the retrieved guest instruction and for converting the guest instruction into one or more corresponding native instructions 36. This conversion includes, for example, identifying a function performed by the guest instruction and selecting a native instruction to perform this function.

[0250] Additionally, emulator code 22 includes an emulation control routine 40 for causing execution of native instructions. Emulation control routine 40 may cause native CPU 12 to execute a routine of native instructions that emulate one or more already fetched guest instructions, and upon completion of such execution, return control to an instruction fetch routine to emulate the fetch of the next guest instruction or group of guest instructions. Execution of native instructions 36 may include reading data from memory 14 into a register, storing data from the register back to memory, or performing some type of arithmetic or logical operation as determined by a conversion routine.

[0251] For example, each routine is implemented in software that is stored in memory and executed by native central processing unit 12. In other examples, one or more of the routines or operations are implemented in firmware, hardware, software, or some combination thereof. Registers of the emulated processor may be emulated using registers 20 of the native CPU or by using locations in memory 14. In an embodiment, guest instructions 30, native instructions 36, and emulator code 22 may reside in the same memory or may be distributed among different memory devices.

[0252] The computing environments described above are only examples of computing environments that may be used: other environments may be used, including, but not limited to, other non-partitioned, other partitioned, or other emulated environments, or combinations thereof, and embodiments are not limited to any one environment.

[0253] Each computing environment may be configured to include one or more aspects of the present invention, for example, each computing environment may be configured to provide sorting and / or merging in accordance with one or more aspects of the present invention.

[0254] One or more aspects may relate to cloud computing.

[0255] Although this disclosure includes detailed descriptions of cloud computing, it should be understood that implementation of the subject matter presented herein is not limited to a cloud computing environment. Embodiments of the invention may be implemented in conjunction with any other type of computing environment now known or later developed.

[0256] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computational resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) and for rapidly provisioning and releasing these resources with minimal administrative effort or interaction with the service provider. This cloud model can include at least five characteristics, at least three service models, and at least four deployment models.

[0257] The features are as follows: On-Demand Self-Service: Cloud customers can automatically provision server time, network storage, and other computing power as they need it, without any unilateral, human interaction with the service provider. Broad network access: Cloud capabilities are available over the network and can be accessed using standard mechanisms, facilitating usage by heterogeneous thin- or thick-client platforms (e.g., mobile phones, laptops, and PDAs). Resource Pool: The provider's computing resources are pooled and offered to multiple consumers using a multi-tenant model. Different physical and virtual resources are dynamically allocated and reallocated according to demand. There is a sense of location independence, consumers usually have no control or knowledge regarding the exact location of the resources offered, although at a higher level of abstraction they may be able to specify a location (e.g. country, state, or data center). Rapid Elasticity: Cloud capacity can be provisioned quickly and elastically, in some cases automatically, to scale out quickly, and quickly released to scale in quickly. Capacity available for provisioning often appears to consumers as unlimited, available for purchase in any amount at any time. Metered Services: Cloud systems leverage metering to automatically control and optimize resource usage at a level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency to both providers and consumers of the services utilized.

[0258] The service model is as follows: SaaS (Software as a Service): The capability provided to the consumer is the use of the provider's applications running on a cloud infrastructure. Those applications can be accessed from a variety of client devices through thin-client interfaces such as web browsers (e.g., web-based email). The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or individual application functionality, except for the possibility of limited user-specific application configuration settings. PaaS (Platform as a Service): The capability provided to a consumer is to deploy applications that the consumer creates or acquires, written using programming languages ​​and tools supported by the provider, onto a cloud infrastructure. The consumer does not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but does have control over the deployed applications and, in some cases, the configuration of the application hosting environment. Infrastructure as a Service (IaaS): The capability provided to a consumer is the provisioning of processing, storage, network, and other basic computing resources over which the consumer can deploy and run any software, which may include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but has control over the operating systems, storage, and deployed applications, and in some cases has limited control over selected network components (e.g., host firewalls).

[0259] The deployment model is as follows: Private Cloud: This cloud infrastructure is operated solely for one organization. It can be managed by this organization or a third party and can exist on-premise or off-premise. Community Cloud: This cloud infrastructure is shared by multiple organizations to support a specific community with shared concerns (e.g., mission, security requirements, policy, and compliance considerations). It can be managed by these organizations or a third party and can reside on-premise or off-premise. Public Cloud: This cloud infrastructure is available for use by general users or large industry organizations and is owned by an organization that sells cloud services. Hybrid cloud: This cloud infrastructure is a combination of two or more clouds (private, community, or public) that remain unique but are bound together by standardized or proprietary technologies that allow for the portability of data and applications (e.g., cloud bursting to balance the load between clouds).

[0260] A cloud computing environment is a service-oriented environment with an emphasis on statelessness, loose coupling, modularity, and semantic interoperability. At the heart of cloud computing is an infrastructure that contains a network of interconnected nodes.

[0261] 13, an exemplary cloud computing environment 50 is shown. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 52 with which local computing devices used by cloud consumers (e.g., a personal digital assistant (PDA) or mobile phone 54A, a desktop computer 54B, a laptop computer 54C, and / or an automobile computer system 54N) can communicate. The nodes 52 may communicate with each other. The nodes 52 may be physically or virtually grouped in one or more networks (not shown), such as in a private cloud, community cloud, public cloud, or hybrid cloud, or combination thereof, as previously described herein. This allows the cloud computing environment 50 to provide an infrastructure, platform, and / or SaaS that does not require the cloud consumer to maintain resources on a local computing device. The types of computing devices 54A-N illustrated in FIG. 13 are intended as examples only, and it will be understood that computing node 52 and cloud computing environment 50 may communicate with any type of computer-controlled device via any type of network and / or network-addressable connection (e.g., a connection using a web browser).

[0262] Referring now to Figure 14, a set of functional abstraction layers provided by cloud computing environment 50 (Figure 13) is shown. It should be understood in advance that the components, layers, and functions shown in Figure 14 are intended to be illustrative only and that embodiments of the present invention are not limited thereto. As shown, the following layers and corresponding functions are provided: The hardware and software layer 60 includes hardware and software components. Examples of hardware components include mainframes 61, Reduced Instruction Set Computer (RISC) architecture based servers 62, servers 63, blade servers 64, storage devices 65, and networks and network components 66. In some embodiments, the software components include network application server software 67 and database software 68. The virtualization layer 70 provides an abstraction layer over which virtual entities such as virtual servers 71 , virtual storage 72 , virtual networks including virtual private networks 73 , virtual applications and operating systems 74 , and virtual clients 75 can be provided.

[0263] In one example, the management layer 80 may provide the functions described below: Resource provisioning 81 provides dynamic procurement of computational and other resources utilized to execute tasks within the cloud computing environment. Metering and pricing 82 provides cost tracking as resources are utilized within the cloud computing environment and billing and delivery for the utilization of those resources. In one example, those resources may include application software licenses. Security provides identity verification of cloud consumers and tasks, as well as protection of data and other resources. User portal 83 provides consumers and system administrators with access to the cloud computing environment. Service level management 84 provides allocation and management of cloud computational resources to meet required service levels. Service level agreement (SLA) planning and execution 85 provides advance provisioning and procurement of cloud computational resources in anticipation of upcoming demands and in accordance with SLAs.

[0264] The Workload Layer 90 illustrates examples of functionality available in a cloud computing environment. Examples of workloads and functionality that may be provided from this layer include mapping and navigation 91, software development and lifecycle management 92, virtual classroom instruction delivery 93, data analytics processing 94, transaction processing 95, and sorting and / or merging processing 96.

[0265] Aspects of the invention may be systems, methods, and / or computer program products at any possible level of technical detail of integration. The computer program product may include a computer readable storage medium including computer readable program instructions for causing a processor to perform aspects of the invention.

[0266] A computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of computer-readable storage media includes portable floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards or ridge structures in grooves in which the instructions are recorded, and any suitable combinations of these. As used herein, computer-readable storage media should not itself be construed to be ephemeral signals such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over wires.

[0267] The computer readable program instructions described herein may be downloaded from a computer readable storage medium to each computing device / processing device or to an external computer or storage device over a network (e.g., the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof) that may include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface within each computing device / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions for storage on a computer readable storage medium within each computing device / processing device.

[0268] The computer readable program instructions for carrying out the operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk®, C++, and procedural programming languages ​​such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partially on the user's computer as a standalone software package, partially on the user's computer and on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, to carry out aspects of the invention, electronic circuitry including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute computer readable program instructions to customize the electronic circuitry by utilizing state information of the computer readable program instructions.

[0269] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks included in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0270] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, where the instructions, executed by the processor of the computer or other programmable data processing apparatus, produce means for performing the functions / operations specified in the blocks of the flowcharts and / or block diagrams. These computer readable program instructions may be stored on a computer readable storage medium and capable of directing a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, such that the computer readable storage medium on which the instructions are stored comprises an article of manufacture containing instructions for performing aspects of the functions / operations specified in the blocks of the flowcharts and / or block diagrams.

[0271] Computer readable program instructions may be loaded into a computer, other programmable data processing apparatus, or other device such that the instructions, which execute on the computer, other programmable apparatus, or other device, perform the functions / acts specified in the blocks of the flowcharts and / or block diagrams, thereby causing a series of operable steps to be performed on the computer, other programmable apparatus, or other device to generate a computer-implemented process.

[0272] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of instructions, comprising one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions shown in the blocks may occur in a different order than that shown in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously or in reverse order, depending on the functionality involved. It is also noted that each block in the block diagrams and / or flowchart illustrations, as well as combinations of blocks included in the block diagrams and / or flowchart illustrations, may be implemented by a dedicated hardware-based system that performs the specified functions or operations or executes a combination of dedicated hardware and computer instructions.

[0273] In addition to the above, one or more aspects may be provided, offered, deployed, managed, serviced, etc. by a service provider that provides management of a customer's environment. For example, a service provider may create, maintain, support, etc., computer code and / or computer infrastructure that implements one or more aspects for one or more customers. In return, the service provider may receive payments from the customer, for example under a subscription and / or fee agreement. Additionally or alternatively, the service provider may receive payments from the sale of advertising content to one or more third parties.

[0274] In one aspect, an application may be deployed to execute one or more embodiments. As one example, deploying an application includes providing a computer infrastructure operable to execute one or more embodiments.

[0275] As yet another aspect, a computing infrastructure may be deployed that includes integrating computer readable code into a computing system, where the code in combination with the computing system is capable of executing one or more embodiments.

[0276] As yet another aspect, a process may be provided for integrating a computing infrastructure, the process including integrating computer readable code into a computer system, the computer system comprising a computer readable medium, the computer medium including one or more embodiments, the code in combination with the computer system capable of executing one or more embodiments.

[0277] Although various embodiments have been described above, they are merely examples. For example, computing environments of other architectures may be used to incorporate and use one or more embodiments. Furthermore, various instructions or operations may be used. Furthermore, various registers may be used and / or other types of indications (other than register numbers) may be specified. Many variations are possible.

[0278] Additionally, other types of computing environments may be beneficial and may be used. As an example, a data processing system may be used that includes at least two processors coupled directly or indirectly via a system bus to memory elements suitable for storing and / or executing program code. These memory elements may include, for example, local memory used during the actual execution of the program code, bulk storage, and cache memory for temporarily storing at least some of the program code to reduce the number of times the code must be retrieved from the bulk storage during execution.

[0279] Input / output devices or I / O devices (including but not limited to keyboards, displays, pointing devices, DASD, tapes, CDs, DVDs, thumb drives, and other storage media) may be coupled to the system either directly or through intervening I / O controllers. Network adapters may be coupled to the system to enable the data processing system to be coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modems, and Ethernet cards are just a few of the types of network adapters available.

[0280] The terms used herein are for the purpose of describing particular embodiments only and are not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural unless expressly indicated otherwise. It will be further understood that the terms "comprise" and / or "comprising" as used herein indicate the presence of stated features, integers, steps, operations, elements, or components, or combinations thereof, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof, or combinations thereof.

[0281] Corresponding structures, materials, acts, and equivalents of all means or steps and functional elements within the scope of the claims below are intended to include any structures, materials, or acts for performing functions in combination with other claimed elements, if any, when specifically claimed. The description of one or more embodiments has been presented for purposes of illustration and description, but is not intended to be exhaustive and is not limited to the disclosed forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments have been selected and described to best explain the various aspects and practical applications, and to enable others skilled in the art to understand various embodiments with various modifications as suitable for the particular use contemplated.

Claims

1. 1. A computer readable storage medium having recorded thereon a computer program for facilitating processing in a computing arrangement and storing instructions readable by a processor for performing a method, the method comprising: merging, by the processor, a plurality of records of a plurality of input lists of data provided to the processor from storage, said merging comprising: determining that an input list of the plurality of input lists has become empty; and obtaining from said memory for execution by said processor, upon determining that said input list has become empty, a control that is examined and checked by said processor based on said input list becoming empty, said control being an input to a memory of parameters used for controlling said merging, said parameters being set in said memory before said merging and not updated during said merging, said control comprising: an indicator having one or more bits examined by the processor as the parameter, the indicator being assigned to a selected input list of the plurality of input lists to control the merging of the input lists by the processor based on the selected input list becoming empty during the merging; a second indicator having one or more bits and different from the one indicator, the second indicator being assigned to a remaining input list of the plurality of input lists excluding the selected input list for controlling processing based on the remaining input list becoming empty during the merging; obtaining said control, determining that the emptied input list is the selected input list of the plurality of input lists; checking the indicator of the one of the controls assigned to the selected input list based on a determination that the selected input list has become empty during the merging to determine whether to continue or terminate the merging of the input lists based on the selected input list becoming empty during the merging; performing the merging of the input lists by the processor, with the one indicator of the control indicating that the one or more bits are set to a value for the merging to continue and that the merging continues based on the selected input list being empty; 23. A computer readable storage medium comprising:

2. 2. The computer-readable storage medium of claim 1, further comprising: performing processing by having the one indicator of the control set to another value to indicate that the merging is to terminate based on the selected input list being empty.

3. 2. The computer-readable storage medium of claim 1, further comprising: performing processing by having the remaining input list empty during the merging and the other indicator of the control being set to a selected value to indicate that the merging is terminated based on the remaining input list becoming empty during the merging.

4. 2. The computer-readable storage medium of claim 1, wherein the control is contained in a parameter block that is an input to and used by the merging.

5. The method further comprising: determining that an indication of the emptied input list is to be stored in a selected location, said determining being based at least in part on said control; storing the instruction in the input list at the selected location based on the determination that the instruction is designated to be stored; and The computer-readable storage medium of claim 1 , further comprising:

6. 6. The computer-readable storage medium of claim 5, wherein the determining that the instruction is to be stored includes checking another control, wherein the other control being set to a selected value indicates that the instruction is to be stored at the selected location, and wherein the other control is set in part based on the control.

7. The method further includes setting the other control, the setting comprising: checking that the control is a defined value; Determining that a particular condition code is set; and wherein based on the control being the defined value and the particular condition code being set, the other control is set to the selected value.

8. The computer-readable storage medium of claim 1 , wherein the control is specified by instructions and set prior to commencing the merging.

9. 9. The computer-readable storage medium of claim 8, wherein the instructions include reordering instructions, the reordering instructions being defined based on a selected instruction set architecture.

10. 1. A computer system for facilitating processing in a computing arrangement, the computer system comprising: Memory, a processor in communication with the memory; and wherein the computer system is configured to execute a method, the method comprising: merging, by the processor, a plurality of records of a plurality of input lists of data provided to the processor from storage, said merging comprising: determining that an input list of the plurality of input lists has become empty; and obtaining from said memory for execution by said processor, upon determining that said input list has become empty, a control that is examined and checked by said processor based on said input list becoming empty, said control being an input to a memory of parameters used for controlling said merging, said parameters being set in said memory before said merging and not updated during said merging, said control comprising: an indicator having one or more bits examined by the processor as the parameter, the indicator being assigned to a selected input list of the plurality of input lists to control the merging of the input lists by the processor based on the selected input list becoming empty during the merging; a second indicator having one or more bits and different from the one indicator, the second indicator being assigned to a remaining input list of the plurality of input lists excluding the selected input list for controlling processing based on the remaining input list becoming empty during the merging; obtaining said control, determining that the emptied input list is the selected input list of the plurality of input lists; checking the indicator of the one of the controls assigned to the selected input list based on a determination that the selected input list has become empty during the merging to determine whether to continue or terminate the merging of the input lists based on the selected input list becoming empty during the merging; performing the merging of the input lists by the processor, with the one indicator of the control indicating that the one or more bits are set to a value for the merging to continue and that the merging continues based on the selected input list being empty; 1. A computer system comprising:

11. 11. The computer system of claim 10, further comprising: performing processing by having the one indicator of the control set to another value to indicate that the merging is to terminate based on the selected input list being empty.

12. 11. The computer system of claim 10, wherein the control is contained in a parameter block that is an input to and used by the merging.

13. The method further comprising: determining that an indication of the emptied input list is to be stored in a selected location, said determining being based at least in part on said control; storing the instruction in the input list at the selected location based on the determination that the instruction is designated to be stored; and The computer system of claim 10 further comprising:

14. 14. The computer system of claim 13, wherein the determining that the instruction is to be stored includes checking another control, the other control being set to a selected value indicating that the instruction is to be stored at the selected location, the other control being set in part based on the control.

15. 1. A computer-implemented method for facilitating processing in a computing arrangement, the computer-implemented method comprising: merging, by a processor, a plurality of records of a plurality of input lists of data provided to the processor from storage, said merging comprising: determining that an input list of the plurality of input lists has become empty; and obtaining from said memory for execution by said processor, upon determining that said input list has become empty, a control that is examined and checked by said processor based on said input list becoming empty, said control being an input to a memory of parameters used for controlling said merging, said parameters being set in said memory before said merging and not updated during said merging, said control comprising: an indicator having one or more bits examined by the processor as the parameter, the indicator being assigned to a selected input list of the plurality of input lists to control the merging of the input lists by the processor based on the selected input list becoming empty during the merging; a second indicator having one or more bits and different from the one indicator, the second indicator being assigned to a remaining input list of the plurality of input lists excluding the selected input list for controlling processing based on the remaining input list becoming empty during the merging; obtaining said control, determining that the emptied input list is the selected input list of the plurality of input lists; checking the indicator of the one of the controls assigned to the selected input list based on a determination that the selected input list has become empty during the merging to determine whether to continue or terminate the merging of the input lists based on the selected input list becoming empty during the merging; performing the merging of the input lists by the processor, with the one indicator of the control indicating that the one or more bits are set to a value for the merging to continue and that the merging continues based on the selected input list being empty; 4. A computer-implemented method comprising:

16. 16. The computer-implemented method of claim 15, further comprising performing processing by having the one indicator of the control set to another value to indicate that the merging is to terminate based on the selected input list being empty.

17. 16. The computer-implemented method of claim 15, wherein the control is included in a parameter block that is an input to and used by the merging.

18. determining that an indication of the emptied input list is to be stored in a selected location, said determining being based at least in part on said control; storing the instruction in the input list at the selected location based on the determination that the instruction is designated to be stored; and The computer-implemented method of claim 15 further comprising:

19. 20. The computer-implemented method of claim 18, wherein the determining that the instruction is to be stored includes checking another control, wherein the other control being set to a selected value indicates that the instruction is to be stored at the selected location, and wherein the other control is set in part based on the control.

Citation Information

Patent Citations

  • Unbounded list processing

    US20170371977A1