"Compare and Delay"-Befehle

The 'COMPARE AND DELAY' instructions in multiprocessor environments address synchronization challenges by delaying program execution until predefined conditions are met, enhancing efficiency and resource utilization.

DE112015000203B4Active Publication Date: 2024-12-05INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
DE112015000203
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2014-03-14
Filing Date
2015-02-23
Publication Date
2024-12-05
Estimated Expiration
2035-02-23

AI Technical Summary

Technical Problem

Existing multiprocessor computing environments face challenges in efficiently synchronizing program execution across multiple processors, particularly in symmetric multiprocessing (SMP) and simultaneous multithreading (SMT) environments, where traditional synchronization mechanisms can lead to inefficiencies and resource wastage.

Method used

The introduction of 'COMPARE AND DELAY' (CAD and CADG) instructions that allow program execution to be delayed until a predefined event occurs, such as a memory comparison or timeout, enabling synchronized execution and efficient resource allocation by temporarily pausing processor tasks until conditions are met.

Benefits of technology

This solution enhances synchronization and resource utilization in multiprocessor environments by allowing efficient allocation of CPUs and ensuring synchronized execution of instruction streams, reducing wastage and improving overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A delay mechanism is provided that allows program execution to be delayed until a predefined event occurs, such as a memory location comparison returning a true condition, a timeout, a break being suspended, or another condition being met. The delay mechanism includes one or more "Compare and Delay" machine instructions used to delay execution. These instructions can be either a 32-bit "Compare and Delay" instruction (CAD instruction) or a 64-bit "Compare and Delay" instruction (CADG instruction).
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] One or more aspects relate generally to multiprocessor computing environments and, more particularly, to controlling program execution within such computing environments. BACKGROUND

[0002] In multiprocessor computing environments such as symmetric multiprocessing (SMP), multiple processors in the SMP environment use conventional synchronization mechanisms to synchronize execution within the environment. These synchronization mechanisms include serialization methods implemented in shared memory locations and may include semaphores or other shared memory markers or counters. To ensure processing progress, such mechanisms may also include additional code to limit the time spent waiting for a synchronization signal. These limits may include a simple program counter, a time-based mechanism, or another method.

[0003] Other multiprocessor environments, such as simultaneous multithreading (SMT) environments, may use the above methods or other methods to synchronize execution.

[0004] US 2006 / 0 069 833 A1 relates to a computer-implemented method for handling pending interrupt vectors from a list of pending interrupts. The method comprises batch-reading the set of pending interrupt vectors into a work list of work interrupt vectors. The method also comprises performing interrupt handling of the work interrupt vectors using an interrupt handling array until the work list is empty.

[0005] US Pat. No. 7,685,347 B2 relates to an interrupt controller that efficiently manages the execution of tasks by a multiprocessor computer system. The interrupt controller has inputs for receiving service requests to call service routines. The service routines have higher priorities than the tasks executed by the processors.

[0006] US Pat. No. 5,918,057 A relates to a method and apparatus for interrupt processing, particularly suitable for use in an interrupt controller of a multiprocessor system or device. Each interrupt request is assigned at least one target processor for processing the interrupt request.

[0007] US 2006 / 0 136 642 A1 relates to an interrupt distribution circuit that receives interrupt signals and distributes the interrupt signals among a plurality of processors. The interrupt distribution circuit can enable the construction of a multiprocessor system using a more cost-effective chipset designed for single-processor systems. SUMMARY

[0008] The invention is based on the object of creating an improved computer program product, a computer system for executing a machine instruction, and a method for executing a machine instruction. This object is achieved by the features of the independent claims. Embodiments are specified in the dependent claims.

[0009] By providing a computer program product for executing a machine instruction in a data processing environment, disadvantages of the prior art are overcome and advantages are provided. The computer program product includes a computer-readable storage medium readable by processing circuitry and storing instructions for execution by the processing circuitry to perform a method. The method includes, for example, obtaining by a processor a machine instruction for execution, the machine instruction defined for computer execution according to a computer architecture, the machine instruction including: an operation code to specify a compare and delay operation; one or more first fields with which to obtain a first operand; and one or more second fields with which to obtain a second operand;and executing the machine instruction by the processor, wherein the executing includes: comparing the first operand and the second operand to obtain a comparison result; determining whether a masking indicator corresponding to the comparison result is set to a defined value; and, based on determining that the masking indicator corresponding to the comparison result is set to the defined value, delaying completion of the machine instruction until a predefined event occurs.

[0010] Methods and systems relating to one or more embodiments are also described and claimed herein. Furthermore, services relating to one or more embodiments are also described and, where appropriate, claimed herein.

[0011] Additional features and advantages are realized. Other embodiments and aspects are described in detail herein and are considered part of the claimed invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] One or more aspects are particularly emphasized and expressly claimed as examples in the claims at the end of the specification. The above, as well as other objects, features, and advantages, will become apparent from the following detailed description taken in conjunction with the accompanying drawings, in which: Fig. 1A depicts one embodiment of a computing environment; Fig. 1B further details of the processor Fig. 1A; Fig. 2 depicts another example of a data processing environment; Fig. 3A depicts yet another example of a data processing environment; Fig. 3B further details of the memory Fig. 3A; Fig. Figure 4A illustrates an example of a compare and delay (CAD) command; Fig. Figure 4B shows another example of a compare and delay (CADG) command; the Fig. 5A and Fig. 5B depicts an embodiment of the logic corresponding to the “Compare and Delay” instructions from the Fig. 4A and Fig. 4B; the Fig. 6A to 6C depict another embodiment of processing corresponding to aspects of the “Compare and Delay” instructions from the Fig. 4A and Fig. 4B; Fig. 7 depicts an embodiment of a computer program product; Fig. 8 depicts an embodiment of a host computer system; Fig. 9 illustrates another example of a computer system; Fig. 10 depicts another example of a computer system having a computer network; Fig. 11 depicts an embodiment of various elements of a computer system; Fig. 12A an embodiment of the execution unit of the computer system of Fig. 11 depicts; Fig. 12B shows an embodiment of the branching unit of the computer system of Fig. 11 depicts; Fig. 12C an embodiment of the loading / storage unit of the computer system of Fig. 11 depicts; Fig. 13 depicts an embodiment of an emulated host computer system; Fig. 14 depicts an embodiment of a cloud computing node; Fig. 15 depicts an embodiment of a cloud computing environment; and Fig. 16 shows an example of abstraction model levels. DETAILED DESCRIPTION

[0013] According to one aspect, a capability is provided to delay program execution until a predefined event occurs, e.g., until a comparison of memory locations results in a true condition, a timeout is reached, an interrupt is suspended, or another condition is met. This capability includes, for example, a delay device having one or more "compare and delay" machine instructions that delay execution.

[0014] An embodiment of a data processing environment incorporating and using one or more aspects of the delay device is described with reference to Fig. 1A. A data processing environment 100 includes, for example, a processor 102 (e.g., a central processing unit), a memory 104 (e.g., main memory), and one or more input / output (I / O) devices and / or interfaces 106 interconnected, for example, via one or more buses 108 and / or other connections.

[0015] In one example, processor 102 is based on the z / Architecture offered by International Business Machines Corporation and is part of a server, such as the System z server, also offered by International Business Machines Corporation, which implements the z / Architecture. One embodiment of the z / Architecture is implemented in an IBM ® Publication entitled “z / Architecture Principles of Operation”, IBM ®Publication No. SA22-7832-09, Tenth Edition, September 2012, which is hereby incorporated by reference in its entirety. In one example, the processor executes an operating system such as z / OS, also offered by International Business Machines Corporation. IBM ® , Z / ARCHITECTURE ® and Z / OS ® (as well as the Z / VM mentioned below ® ) are registered trademarks of International Business Machines Corporation, Armonk, New York (USA). Other names mentioned herein may be registered trademarks, trademarks, or product names of International Business Machines Corporation or other companies.

[0016] In another embodiment, processor 102 is based on the Power Architecture offered by International Business Machines Corporation. One embodiment of the Power Architecture is described in "Power ISA™ Version 2.06 Revision B," International Business Machines Corporation, July 23, 2010, which is hereby incorporated by reference in its entirety. POWER ARCHITECTURE ® is a registered trademark of International Business Machines Corporation, located in Armonk, New York.

[0017] In another embodiment, the processor 102 is based on an Intel architecture offered by Intel Corporation. One embodiment of the Intel architecture is described in "Intel ® 64 and IA-32 Architectures Developer's Manual: Vol. 2B, Instructions Set Reference, AL“, Order Number 253666-045US, January 2013, and in “Intel ®64 and IA-32 Architectures Developer's Manual: Vol. 2B, Instructions Set Reference, MZ", Order Number 253667-045US, January 2013, each of which is incorporated herein by reference in its entirety. Intel ® is a registered trademark of Intel Corporation, based in Santa Clara, California.

[0018] The processor 102 includes a plurality of functional components used to execute instructions. As shown in Fig. For example, as depicted in Figure 1B, these functional components include an instruction fetch component 120 to fetch instructions to be executed; an instruction decode unit 122 to decode the fetched instructions and obtain operands of the decoded instructions; an instruction execution component 124 to execute the decoded instructions; a memory access component 126 to access memory when needed for instruction execution; and a write-back component 130 to provide the results of the executed instructions. In one aspect, one or more of these components may provide delay functionality by including at least a portion of, or having access to, a delay component 136. This functionality is described in more detail below.

[0019] In one embodiment, processor 102 also includes one or more registers 140 used by one or more of the functional components.

[0020] Another embodiment of a data processing environment incorporating and using one or more aspects of the delay device including the “Compare and Delay” instructions is described with reference to Fig. 2 described.

[0021] With a view to Fig. 2, in one example, a data processing environment 200 is based on the z / Architecture developed by International Business Machines (IBM ®) Corporation, located in Armonk, New York. The data processing environment 200 includes, for example, a central processor complex (CPC) 202 connected to one or more I / O units 206 via one or more control units 208. The central processor complex 202 includes, for example, a processor memory 204 (also known as main memory, main storage, central memory) connected to one or more central processors (also known as central processing units (CPUs)) 210 and an input / output subsystem 211, each of which is described below.

[0022] The processor memory 204 includes, for example, one or more partitions 212 (e.g., logical partitions) and processor firmware 213, which includes, for example, a logical partition hypervisor 214 (LPAR hypervisor) and other processor firmware 215. An example of the logical partition hypervisor 214 is the Processor Resource / System Manager (PR / SM) offered by International Business Machines Corporation, based in Armonk, New York.

[0023] A logical partition functions as a separate system and has one or more applications 220 (APPs) and optionally an operating system 222 (OS) located therein, which may be different for each logical partition. In one embodiment, the operating system is the z / OS operating system, the z / VM operating system, the z / Linux operating system, or the TPF operating system offered by International Business Machines Corporation, headquartered in Armonk, New York. The logical partitions 212 are managed by a logical partition's hypervisor 214, which is implemented by firmware executing in the processors 210. As used herein, firmware includes, for example, the microcode and / or millicode of the processor. It includes, for example, the hardware-level instructions and / or data structures used to implement machine code of a higher level of abstraction.In one embodiment, it includes, for example, vendor-specific code, typically provided as microcode containing trusted software or as microcode specific to the underlying hardware that controls operating system access to the system hardware.

[0024] The central processors 210 are physical processor resources associated with the logical partitions. Specifically, each logical partition 212 includes one or more logical processors, each of which represents all or a portion of the physical processor 210 associated with the partition. The logical processors of a particular partition 212 may either be dedicated to the partition, such that the underlying processor resource 210 is reserved for the partition; or they may be shared with another partition, such that the underlying processor resource may be available to another partition. In one example, one or more of the CPUs include aspects of the delay device 224 described herein.

[0025] The input / output subsystem 211 directs the flow of data between the input / output devices 206 and the main memory 204. It is coupled to the server in that it can be part of the central processing complex or separate from it. The I / O subsystem relieves the central processors of the task of exchanging data directly with the input / output devices and allows concurrent data processing and input / output processing. To provide data transfer, the I / O subsystem uses I / O data transfer adapters. There are various types of data transfer adapters, such as channels, I / O adapters, PCI cards, Ethernet cards, SCSI (Small Computer Storage Interface) cards, etc. In the specific example described here, the I / O data transfer adapters are channels, which is why the I / O subsystem is referred to herein as a channel subsystem. This is only an example, however.Other types of I / O subsystems can also be used.

[0026] The I / O subsystem uses one or more input / output paths as data transfer connections when managing the flow of data to or from the input / output devices 206. In this specific example, these paths are referred to as channel paths because the data transfer adapters are channels.

[0027] Another embodiment of a data processing environment incorporating and using one or more aspects of the delay device is described with reference to Fig. 3A. In this example, a computing environment 300 includes, for example, a native central processing unit (CPU) 302, memory 304, and one or more input / output devices and / or interfaces 306 interconnected, for example, via one or more buses 308 and / or other connections. The computing environment 300 may include, for example, a PowerPC processor, a pSeries server, or an xSeries server offered by International Business Machines Corporation located in Armonk, New York; an HP Superdome with Intel Itanium II processors offered by Hewlett Packard Co. located in Palo Alto, California; and / or other machines based on architectures offered by International Business Machines Corporation, Hewlett Packard, Intel, Oracle, or others.

[0028] Native central processing unit 302 includes one or more native registers 310, such as one or more general-purpose registers and / or one or more special-purpose registers used during processing within the environment. These registers contain data representative of the state of the environment at any given time.

[0029] In addition, the native central processing unit 302 executes instructions and code stored in memory 304. In one particular example, the central processing unit executes emulator code 312 stored in memory 304. This code enables a computing environment configured in one architecture to emulate a different architecture. For example, emulator code 312 enables machines based on architectures other than z / Architecture, such as PowerPC processors, pSeries servers, xSeries servers, HP Superdome servers, or others, to emulate z / Architecture and execute software and instructions developed based on z / Architecture.

[0030] Further details on the emulator code 312 are given with reference to Fig. 3B. Guest instructions 350 stored in memory 304 comprise software instructions (e.g., corresponding to machine instructions) designed to execute in a different architecture than that of native CPU 302. For example, guest instructions 350 may have been designed for execution in a z / Architecture processor 102, but are instead emulated in native CPU 302, which may be, for example, an Intel Itanium II processor. In one example, emulator code 312 includes an instruction fetch routine 352 to obtain one or more guest instructions 350 from memory 304 and, optionally, to provide local buffering for the obtained instructions. It also includes an instruction translation routine 354 to determine the type of guest instruction received and to translate the guest instruction into one or more corresponding native instructions 356.This translation includes, for example, identifying the function to be performed by the guest command and selecting the native command(s) that should perform the function.

[0031] Emulator code 312 further includes an emulation control routine 360 ​​to cause the native instructions to be executed. Emulation control routine 360 ​​may cause native CPU 302 to execute a routine with native instructions that emulate one or more previously received guest instructions and, upon completion of such execution, return control to the instruction fetch routine to emulate receiving the next guest instruction or group of guest instructions. Execution of native instructions 356 may include loading data from memory 304 into a register; storing data from a register back into memory; or performing another type of arithmetic or logical operation as determined by the translation routine.

[0032] For example, each routine is implemented in software stored in memory and executed by the native central processing unit 302. In other examples, one or more routines or operations are implemented in firmware, hardware, software, or any combination thereof. The registers of the emulated processor may be emulated using the native CPU's registers 310 or using locations in the memory 304. In embodiments, the guest instructions 350, the native instructions 356, and the emulator code 312 may be located in the same memory or may be distributed across different memory units.

[0033] The computing environments described above are merely examples of computing environments that may be used. Other environments, such as, but not limited to, other non-partitioned environments, other partitioned environments, and / or other emulated environments, may be used; embodiments are not limited to any single environment in any way.

[0034] Any computing environment can be configured to include a delay device for delaying program execution. The embodiments described herein refer to the z / Architecture, but other architectures may also include and utilize the delay device, including the "COMPARE AND DELAY" instructions described herein. The embodiments described herein are not intended to be limiting in any way.

[0035] According to one or more aspects, the delay facility is installed when a facility indicator bit of the z / Architecture, such as bit 128, is set to a value of one. Furthermore, a control register (e.g., CR 2) may be used to control which entities (e.g., operating system, application programming, etc.) within the environment are permitted to use the delay facility. If a selected bit, such as bit 60 of CR 2, is set to a value of one, the "COMPARE AND DELAY" instructions that are part of the delay facility are permitted to execute in a problem state (e.g., a non-privileged state) when the process is not in the supervisor state (e.g., a privileged state).

[0036] In one embodiment, the delay means includes two instructions: a 32-bit "COMPARE AND DELAY" (CAD) instruction and a 64-bit "COMPARE AND DELAY" (CADG) instruction, both of which are described below.

[0037] An embodiment of a format of the 32-bit “COMPARE AND DELAY” instruction is described with reference to Fig. 4A. As an example, a "COMPARE AND DELAY" (CAD) instruction 400 includes a plurality of operation code fields 402a, 402b specifying an operation code (opcode) designating a "compare and delay" operation; a register field (R1) 404 specifying a register whose contents include the first operand; a mask field (M3) 406; a base field (B2) 408; a first displacement field (DL2) 410; and a second displacement field (DH2) 412. The contents of the general purpose register designated by field B2 are added to the contents of a concatenation of fields DH2 and DL2 to form the second operand address, from which the second operand is obtained. The first and second operands are 32-bit signed binary integers. For example, the first operand is located at bit positions 32 to 63 of the general register R1. The second operand is, for example, a word in a memory.

[0038] In another embodiment, a 64-bit "COMPARE AND DELAY" (CADG) instruction 450 is provided, including a plurality of operation code fields 452a, 452b specifying an operation code designating a "compare and delay" operation; a register field (R1) 454 specifying a register whose contents include the first operand; a mask field (M3) 456; a base field (B2) 458; a first displacement field (DL2) 460; and a second displacement field (DH2) 462. The contents of the general register designated by field B2 are added to the contents of a concatenation of fields DH2 and DL2 to form the second operand address, from which the second operand is obtained. In this case, the first and second operands are 64-bit signed binary integers. For example, the first operand is located at bit positions 0 to 63 of the general register R1. The second operand is, for example, a double word in a memory.

[0039] During operation, regardless of the format of the "COMPARE AND DELAY" instruction, the first operand is compared with the second operand. If a mask bit corresponding to the comparison result, for example, in bit positions 0 through 2 of field M3, has a value of one, instruction completion is delayed; otherwise, instruction execution completes. Once the instruction is complete, the resulting condition code (CC) is determined from the final operand comparison.

[0040] During the delay, the command ends for one of the following reasons, whichever occurs first: ∗ The relationship between the operand values ​​that results in the delay is no longer represented by a bit position in field M3, which has the value 1. In this case, the instruction completes. ∗ An activated interrupt is suspended. In this case, the instruction can either be canceled (instruction execution does not continue but returns to the same instruction) or completed (instruction execution continues with the next instruction). * A model-dependent timing limit is reached. In this example, the limit is not greater than approximately one millisecond. In this case, the command completes. * A model-dependent, CPU-determined reason is detected. In this case, the instruction can be canceled or completed.

[0041] The second operand can be fetched multiple times during the delay. Before each fetch of the second operand, the specific operand is serialized. Each fetch of the second operand occurs block-parallel.

[0042] If multiple stores for the second operand are performed in rapid succession by another CPU or the I / O subsystem while the Compare and Delay facility is delaying, the instruction may, but is not required to, perform a comparison with one or more of the previously stored values.

[0043] An example of the comparison results and the corresponding bits in M3 is as follows: Vergleichsergebnis Bit in M3 Ist gleich 0 Erster Operand niedrig 1 Erster Operand hoch 2

[0044] Bit 3 of field M3 is reserved and should be zero; otherwise, the program will not be able to operate compatibly in the future.

[0045] Special conditions: ∗ The second operand must be on an integral limit equal to its size, otherwise a specification exception is detected. ∗ In the problem state, if bit 60 of control register 2 is zero, a privileged operation exception is detected.

[0046] Resulting condition code: 0 operands are equal 1 First operand is low 2 First operand is high 3 --

[0047] Program exceptions: ∗ Access (fetch, second operand) ∗ Operation exception (when the delay device is not installed) ∗ Privileged operation ∗ Specification ∗ Transaction specification Programming notes: 1. If bit positions 0 through 2 of field M3 contain zeros, the instruction does not cause a delay. If bit positions 0 through 2 of field M3 contain the binary number 111, a delay occurs. 2. Due to a save operation from another CPU or from the I / O subsystem, there is no guarantee that the comparison specified by the condition code is still true after the "COMPARE AND DELAY" has completed. 3. Depending on the program requirements, the value of the second operand may need to be checked again before a change is made, e.g., with a COMPARE AND SWAP instruction.

[0048] Further details on processing the “COMPARE AND DELAY” commands are described with reference to the Fig. 5A and Fig. 5B. With regard to Fig. 5A, in one embodiment, a processor receives a "COMPARE AND DELAY" (CAD or CADG) instruction (e.g., by fetching it, receiving it, being provided with the instruction, or otherwise obtaining the instruction), STEP 500, and executes it, STEP 502. Upon execution, the first operand is obtained from the register, and the second operand is fetched from memory. The first operand is pre-fetched, for example, by the program based on what the program wants to delay (e.g., until a counter reaches a certain value, etc.). The second operand is stored, for example, by another processor or an I / O subsystem.

[0049] The comparison of the operands provides a comparison result where the operands are either equal, operand 1 is less than operand 2 (i.e., first operand low), or operand 1 is greater than operand 2 (i.e., first operand high). The masking bit corresponding to the comparison result, at bit positions 0 through 2 of field M3, is checked. For example, if the comparison result is equal operands, the value of bit 0 in M3 is checked; if the comparison result is that the first operand is less than the second operand, bit 1 in M3 is checked; and if the comparison result is that the first operand is greater than the second operand, bit 2 in M3 is checked.

[0050] If the value of the checked bit is set to zero, the instruction is completed and processing of the "COMPARE AND DELAY" instruction ends. However, if the mask bit corresponding to the comparison result is set to one, the instruction is delayed, for example, until a predefined event occurs.

[0051] Further details on the execution of a “COMPARE AND DELAY” instruction by the processor that received the instruction are described in Fig. 5B. First, it is determined whether the processor executing the "COMPARE AND DELAY" instruction (CAD or CADG instruction) is in the supervisor state, INQUIRY 550. If the processor is not in the supervisor state, it is further determined whether a selected bit, e.g., bit 60, in a selected control register, e.g., control register 0, is set to indicate that this instruction may be executed in the problem state, INQUIRY 552. If bit 60 of control register 0 is set to zero, the instruction may not be executed in the problem state, and an exception is provided indicating a privileged operation exception, STEP 554. However, if bit 60 of control register 0 is set to one, indicating that the instruction may be executed in the problem state, processing continues with INQUIRY 556.If the processor is in the supervisor state, QUERY 550, processing continues with QUERY 556.

[0052] In QUERY 556, it is determined whether the second operand is correctly aligned, QUERY 556. For example, for the CAD instruction, it is determined whether the second operand is on a 4-byte boundary, and for the CADG instruction, it is determined whether the second operand is on an 8-byte boundary. If the second operand is not correctly aligned, a specification exception is provided, STEP 558. However, if the second operand is correctly aligned, the second operand is fetched from memory, STEP 558.

[0053] Additionally, the first operand from the selected register is obtained.

[0054] Next, in one embodiment, a condition code is determined by comparing the first operand and the second operand, STEP 560. In this particular example, if two operands (OP1 and OP2) are equal, the condition code (CC) is set to zero; if operand 1 is less than operand 2, the condition code is set to 1; and if operand 1 is greater than operand 2, the condition code is set to 2. The condition code represents a result of the comparison, and such a result is used to select the mask bit of M3 to be checked.

[0055] The masking bit corresponding to the comparison result is checked, and it is determined whether a masking condition is true or false, QUERY 562. In one example, the masking condition is true if bit 0 of M3 is 1 and the value of CC is zero; or if bit 1 of M3 is 1 and the value of CC is 1; or if bit 2 of M3 is 1 and the value of CC is 2. That is, the masking condition is true if the masking bit corresponding to the comparison result in bit positions 0 through 2 of field M3 (e.g., equal to, less than, greater than) is 1. If the masking condition is false, the instruction completes, and the condition code is set according to the last operand comparison, STEP 564.

[0056] If, back in INQUIRY 562, the masking condition is true, instruction completion is delayed, STEP 566. In one example, the instruction is delayed until a predefined event occurs. To determine whether the delay should continue or end, in one example, it is determined whether a model-dependent timeout has been reached, INQUIRY 568. If so, the instruction completes, and the condition code is set based on the last operand comparison, STEP 564. However, if the model-dependent timeout has not been reached, it is further determined whether an asserted interrupt has been suspended, INQUIRY 570. If an asserted interrupt has been suspended, the interrupt is initiated, and the instruction is canceled or completed, STEP 572. When the instruction completes, the condition code is set based on the last operand comparison.If there is no interrupt back in QUERY 570, it is further determined whether there is another CPU condition that should end the delay (e.g., a machine condition or some other event).

[0057] QUERY 574. If this is the case, the instruction is canceled or completed, STEP 576. When the instruction completes, the condition code is again set based on the last operand comparison. However, if no other CPU condition exists to end the delay, processing continues by re-fetching the second operand, STEP 558. This means that the delay continues. As stated here, the delay continues until, for example, one of the following events occurs, although their naming does not follow any particular order of precedence: ∗ the relationship of the operand values ​​that leads to the delay is no longer represented by a bit position in the field M3 that has the value 1; ∗ an activated interrupt is suspended; ∗ a model-dependent time limit is reached; ∗ a model-dependent, CPU-determined condition is detected.

[0058] Although the above event refers to a time limit, any other limit can be used.

[0059] The above describes in detail a delay device that includes "COMPARE AND DELAY" instructions, which is used to delay program execution until a defined event occurs. This allows, for example, a CPU to ensure that it is synchronized with a signal from another CPU. These instructions and this device can be used by an operating system scheduling routine to ensure that extremely detailed scheduling algorithms are quickly kept synchronized, or they can be used for other types of control. Various uses are possible. In further embodiments, programs other than the operating system can also use the delay device, including one or more of the delay instructions.

[0060] According to one aspect, the delay device provides a high-resolution means for synchronized execution of CPUs (also referred to as threads), for example, in an SMT environment, to realize efficient CPU allocation. By providing the delay, this device ensures efficient use of processor resources. In one example, in a multithreading environment, while a thread is delayed (i.e., while the thread is not productively using the processor), another thread can be allocated to the processor and processed.

[0061] Aspects of the delay facility are used by multiprocessor environments where the progress of a particular instruction stream should be synchronized with another instruction stream. By using a shared memory location as a trigger indicator, a processor can be temporarily delayed until, for example, another processor updates the shared location or until a model-dependent period of time has elapsed. A condition code is used to inform the program what caused the delay to end.

[0062] In addition to the above, aspects of the delay device are described with reference to the Fig. 6A to 6C. Starting with Fig. 6A, a processor receives a machine instruction, STEP 600, and executes the machine instruction, STEP 620. The machine instruction, in one embodiment, includes operational code to specify a compare and delay operation 602, one or more first fields (e.g., a register field) with which to obtain a first operand 604, and one or more second fields (e.g., a base field, a first displacement field, and a second displacement field) with which to obtain a second operand located at a memory location 606. In one embodiment, the memory location is shared between the processor and another processor and / or an I / O subsystem, where the another processor or I / O subsystem is to store the second operand. In another embodiment, the machine instruction includes a mask field with a mask indicator 608.In a concrete example, the masking field contains a first masking indicator for a comparison result according to which the first operand is equal to the second operand, a second masking indicator for a comparison result according to which the first operand is less than the second operand, and a third masking indicator for a comparison result according to which the first operand is greater than the second operand.

[0063] In one embodiment, the first or more first fields used to obtain the first operand include a register field, the register field containing a designation of a register, and the register containing the first operand 604. In another embodiment, an address of the second operand is provided in memory by adding the contents of a register specified in the base field to a concatenation of the second displacement field and the first displacement field, STEP 610.

[0064] As in Fig. 6B, in one embodiment, the processor executing the machine instruction includes comparing the first operand and the second operand to obtain a comparison result, STEP 630. The first operand is obtained, for example, from the register, and the second operand is fetched from memory, STEP 625. In a particular embodiment, it is first determined whether the machine instruction may be executed in a non-privileged state based on the processor not being in the supervisor state, INQUIRY 632. Based on determining that the machine instruction may be executed in a non-privileged state when the processor is not in the supervisor state, the comparison of the first operand and the second operand is performed, STEP 636.If the machine instruction is not authorized to do so, one embodiment initiates exception handling, STEP 634.

[0065] Afterwards, with a view to Fig. 6C determines whether a masking indicator corresponding to the comparison result is set to a defined value, QUERY 638. Based on the masking indicator corresponding to a comparison result being equal to a defined value, QUERY 638, the completion of the machine instruction is delayed until a predefined event occurs, STEP 640. During the delay, for example, in a multithreading environment, one or more other machine instructions or other programs of one or more other threads may be executing.

[0066] The predefined event includes, for example, a predefined limit being reached, QUERY 642; an enabled interrupt being suspended, QUERY 644; a selected processor condition occurring, QUERY 646; or determining that the mask indicator corresponding to a comparison result resulting from a further comparison of the first operand and the second operand is not set to the defined value, STEP 648.

[0067] In a specific example, if the predefined limit is not reached (QUERY 642), an enabled interrupt is not suspended (QUERY 644), and a selected processor condition has not occurred (QUERY 646), the delay continues. The second operand is fetched again (STEP 648), and the first and second operands are compared (STEP 650). Processing continues with (QUERY 638).

[0068] If, in INQUIRY 638, the mask indicator corresponding to the comparison result is not equal to the defined value, the instruction is completed (e.g., by ending the delay, if applicable), STEP 660, and a condition code is determined, STEP 662. In one embodiment, the condition code is equal to a first value (e.g., 0) if the comparison result is that the first operand is equal to the second operand, a second value (e.g., 1) if the comparison result is that the first operand is less than the second operand, and a third value (e.g., 2) if the comparison result is that the first operand is greater than the second operand.

[0069] If the predefined limit is again reached in QUERY 642, processing continues with STEP 660, where the command is completed and the condition code is set, STEP 662.

[0070] Further, if an enabled interrupt is suspended in QUERY 644 or a selected processor condition occurs, QUERY 646, the instruction either completes and a condition code is set, or the instruction is canceled, STEP 664.

[0071] Unless otherwise indicated, either implicitly by use or explicitly, the terms memory, central memory, main memory, working memory and main working memory are used interchangeably in this context.

[0072] With regard to FIG. Fig. 7, in one example, a computer program product 700 includes one or more non-transitory, computer-readable storage media 702 for storing thereon computer-readable program code means, logic, and / or instructions 704 to provide and enable one or more embodiments.

[0073] The present invention may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions embodied thereon for causing a processor to perform aspects of the present invention.

[0074] The computer-readable storage medium may be a tangible unit capable of retaining and storing instructions for use by an instruction execution unit. The computer-readable storage medium may be, for example, an electronic storage unit, a magnetic storage unit, an optical storage unit, an electromagnetic storage unit, a semiconductor storage unit, or any suitable combination of the foregoing units, but is not limited thereto. A non-exhaustive list of more specific examples of the computer-readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable CD-ROM, a DVD, a memory stick, a floppy disk, a mechanically encoded device such asPunched cards or raised structures in a groove with instructions recorded thereon, as well as any suitable combination of the foregoing. A computer-readable storage medium, as used herein, is not intended to be inherently transient 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 traveling through a fiber optic cable), or electrical signals transmitted over a wire.

[0075] Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to corresponding computing / processing devices or to an external computer or storage device over a network such as the Internet, a local area network (LAN), a wide area network (WAN), and / or a wireless network. The network may include copper transmission cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium within the respective computing / processing device.

[0076] Computer-readable program instructions for performing operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-specifying data, or either source code or object code written in any combination of one or more programming languages, such as an object-oriented programming language such as Smalltalk, C++, or the like, as well as conventional procedural programming languages ​​such as the C programming language or similar programming languages.The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on the 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 LAN or a WAN, or the connection may be made to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, an electronic circuit such asa programmable logic circuit, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) that execute computer-readable program instructions by using state data of the computer-readable program instructions to personalize the electronic circuit and perform aspects of the present invention.

[0077] 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 should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, may be implemented by computer-readable program instructions.

[0078] 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, such that the instructions, executing via the processor of the computer or other programmable data processing apparatus, produce a means for performing the functions / acts specified in the flowchart and / or block diagram block(s). These computer-readable program instructions may also be stored on a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable storage medium with instructions stored thereon comprises an article of manufacture that includes instructions that perform aspects of the functions specified in the flowchart and / or block diagram block(s).implement the function / action specified in the blocks of the flow chart and / or the block diagram.

[0079] The computer-readable program instructions may also be loaded into a computer, other programmable data processing apparatus, or other device to cause a series of functional steps to be performed on the computer, other programmable data processing apparatus, or other device, such that the instructions executing on the computer, other data processing apparatus, or other device implement the functions / acts specified in the block(s) of the flowchart and / or block diagram.

[0080] The flowcharts and block diagrams in the figures provide the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Thus, each block of the flowcharts or block diagrams may represent a module, segment, or portion of instructions comprising one or more executable instructions that may implement the one or more specified logical functions. In some alternative embodiments, the functions mentioned in the block may occur in a different order than that mentioned in the figures. For example, two consecutively illustrated blocks may actually occur substantially concurrently, or the blocks may sometimes execute in reverse order, depending on the functionality involved.It should also be noted that each block of the block diagrams and / or flowchart illustrations, as well as combinations of blocks in the block diagrams and / or flowchart illustrations, may be implemented or performed by special purpose hardware-based systems that perform the specified functions or acts or combinations thereof, or by combinations of special purpose hardware and computer instructions.

[0081] In addition to the above, one or more aspects may be provided, offered, implemented, managed, maintained, etc., by a service provider that provides management of customer environments. For example, the service provider may create, maintain, support, etc., computer code and / or computer infrastructure that performs one or more aspects for one or more customers. The service provider may, in turn, receive payment from the customer, for example, under a subscription and / or fee agreement. Additionally or alternatively, the service provider may receive payment from the sale of advertising content to one or more third parties.

[0082] According to one aspect, an application may be implemented to perform one or more embodiments. Thus, in one example, implementing an application may include providing computing infrastructure capable of performing one or more embodiments.

[0083] According to another aspect, a computing infrastructure may be implemented comprising integrating computer-readable code into a computing system, wherein the code, in conjunction with the computing system, is capable of performing one or more embodiments.

[0084] According to yet another aspect, a process for integrating a computing infrastructure may be provided, comprising integrating computer-readable code into a computer system. The computer system comprises a computer-readable medium, the computer medium comprising one or more embodiments. In conjunction with the computer system, the code is capable of performing one or more embodiments.

[0085] Although various embodiments are described above, they are merely examples. For example, computing environments of other architectures may be used to include and utilize one or more embodiments. Further, other instructions, instruction formats, instruction fields, and / or instruction values ​​may be used. Moreover, other restrictions may be provided and / or used in other ways. In other examples, one or more of the operands being compared may not be specified but may be, for example, implied. In other embodiments, a single-processor program may execute a "compare and delay" instruction and, depending on the contents of the second operand (e.g., stored by the processor executing the program), either continue immediately or delay the instruction, for example, until a timeout or interrupt.Many variations are possible.

[0086] Furthermore, other types of data processing environments may benefit and be used. For example, a data processing system suitable for storing and / or executing program code may be used, including at least two processors connected directly or indirectly via a system bus to memory elements. The memory elements include, for example, local memory used during actual execution of the program code, mass storage, and cache memory that provides temporary storage of at least a portion of the program code to reduce the frequency with which code must be retrieved from mass storage during execution.

[0087] Input / output, or I / O, devices (including, but not limited to, keyboards, displays, pointing devices, direct access storage devices (DASDs), tape, CDs, DVDs, USB flash drives, and other memory storage devices, etc.) may be connected to the system either directly or through intervening I / O controllers. Network adapters may also be connected to the system to enable the data processing system to connect to other data processing systems or to remotely located 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.

[0088] With a view to Fig. 8, representative components of a host computer system 5000 for implementing one or more embodiments are shown. The representative host computer 5000 includes one or more CPUs 5001 that communicate with a computer memory (i.e., central storage) 5002, as well as I / O interfaces to storage media devices 5011 and networks 5010 for communicating with other computers or SANs, and the like. The CPU 5001 conforms to an architecture having an architected instruction set and architecture-defined functionality. The CPU 5001 may include an Access Register Translation (ART) 5012 including an ART translation buffer (ALB) 5013 to select address space to be used for a Dynamic Address Translation (DAT) 5003 to translate program addresses (virtual addresses) into real addresses of a main memory.A DAT typically includes a translation lookaside buffer (TLB) 5007 for caching translations so that subsequent accesses to the block of computer memory 5002 do not require address translation delay. Typically, a cache 5009 is used between computer memory 5002 and processor 5001. Cache 5009 may be hierarchical, with a large cache available to multiple CPUs and smaller, faster (lower-level) caches between the large cache and each CPU. In some implementations, the lower-level caches are split to provide separate lower-level caches for instruction fetch and data access.

[0089] In one embodiment, an instruction is fetched from memory 5002 by an instruction fetch unit 5004 via a cache 5009. The instruction is decoded in an instruction decode unit 5006 and dispatched (in some embodiments with other instructions) to one or more instruction execution units 5008. Typically, multiple execution units 5008 are used, for example, an arithmetic execution unit, a floating-point execution unit, and a branch instruction execution unit. The instruction is executed by the execution unit, accessing operands from registers or memory specified by the instruction as needed. When an operand is to be accessed (loaded or stored) from memory 5002, a load / store unit 5005 typically processes the access under the control of the executing instruction.Instructions can be executed in hardware circuits or in internal microcode (firmware), or by a combination of these.

[0090] As mentioned, a computer system stores information in local (or main) memory, as well as addressing, protection, and referencing and modification records. Some aspects of addressing include the format of addresses, the concept of address spaces, the different types of addresses, and how one address type translates into another. A portion of main memory contains permanently assigned memory locations. Main memory provides the system with directly addressable, fast-access storage of data. Data, as well as programs, must be loaded into main memory (from input devices) before they can be processed.

[0091] Main memory may contain one or more smaller buffers with faster access, sometimes referred to as caches. A cache is usually physically associated with a CPU or I / O processor. Except for performance, the effects of the physical structure and the use of different storage media are generally imperceptible to the program.

[0092] Separate caches can be maintained for instructions and data operands. Information in a cache is held in contiguous bytes along an integral boundary, referred to as a cache block or cache line (or line for short). A model can provide an "EXTRACT CACHE ATTRIBUTE" instruction, which returns the size of a cache line in bytes. A model can also provide "PREFETCH DATA" and "PREFETCH DATA RELATIVE LONG" instructions, which preload memory contents into the data or instruction cache, or free data from the cache.

[0093] Memory content is viewed as a long horizontal sequence of bits. For most operations, memory access occurs from left to right. The bit sequence is divided into units of eight bits. An eight-bit unit is called a byte, which is the basic building block of all information formats. Each byte position in memory is identified by a unique, non-negative integer, which is the address of the byte position, or, simply put, the byte address. Adjacent byte positions have consecutive addresses, starting at 0 on the left and progressing from left to right. Addresses are unsigned binary integers and consist of 24, 31, or 64 bits.

[0094] Information is transferred one byte or group of bytes at a time between memory and a CPU or channel subsystem. Unless otherwise specified, in z / Architecture, for example, a group of bytes in memory is addressed by the leftmost byte of the group. The number of bytes in the group is either implicitly assumed or explicitly specified by the operation to be performed. When used in a CPU operation, a group of bytes is called an array. Within each group of bytes, in z / Architecture, for example, the bits are numbered from left to right. In z / Architecture, the leftmost bits are sometimes referred to as the "most significant bits" and the rightmost bits as the "least significant" bits. However, bit numbers are not memory addresses. Only bytes can be addressed.To act on individual bits of a byte in memory, the entire byte is accessed. The bits in a byte are numbered 0 to 7 from left to right (e.g., in the z / Architecture). The bits in an address can be numbered 8 to 31 or 40 to 63 for 24-bit addresses, or 1 to 31 or 33 to 63 for 31-bit addresses; for 64-bit addresses, they are numbered 0 to 63. In one example, bits 8 to 31 and 1 to 31 refer to addresses located in a 32-bit wide position (e.g., a register), while bits 40 to 63 and 33 to 63 refer to addresses in a 64-bit wide position. Within any other format with a fixed length of multiple bytes, the bits that comprise the format are numbered consecutively, starting with 0. For the purpose of error detection and, preferably, correction, one or more check bits may be transmitted with each byte or with a group of bytes.Such check bits are automatically generated by the machine and cannot be directly controlled by the program. Memory capacities are expressed in terms of the number of bytes. If the length of a memory operand field is implicitly specified by an instruction's operation code, it is called a fixed-length field, and this can be one, two, four, eight, or 16 bytes. For some instructions, larger fields may be implicitly specified. If the length of a memory operand field is not implied but explicitly specified, it is called a variable-length field. The length of variable-length operands can vary in increments of one byte (or in multiples of two bytes or other multiples for some instructions).When information is stored in memory, only the contents of the byte positions contained in the designated field are replaced, even if the width of the physical path to memory is greater than the length of the field being stored.

[0095] Certain units of information must be located on an integral boundary in memory. A boundary is said to be integral for a unit of information if its memory address is a multiple of the unit's length in bytes. Fields of 2, 4, 8, 16, and 32 bytes on an integral boundary are given special labels. A halfword is a group of two consecutive bytes on a two-byte boundary and forms the basic building block of instructions. A word is a group of four consecutive bytes on a four-byte boundary. A doubleword is a group of eight consecutive bytes on an eight-byte boundary. A quadword is a group of 16 consecutive bytes on a 16-byte boundary. An octetword is a group of 32 consecutive bytes on a 32-byte boundary.When a memory addresses halfwords, words, doublewords, quadwords, and octwords, the binary representation of the address contains one, two, three, four, and five rightmost zero bits, respectively. Instructions must be located on integral two-byte boundaries. There are no boundary alignment requirements for the memory operands of most instructions.

[0096] For units that implement separate caches for instructions and data operands, a significant delay may occur when the program stores into a cache line from which instructions are subsequently fetched, regardless of whether the store operation modifies the subsequently fetched instructions.

[0097] In one example, the embodiment may be implemented by software (sometimes referred to as licensed internal code, firmware, microcode, millicode, picocode, or the like, each term being consistent with one or more embodiments). With regard to Fig. 8, the processor 5001 of the system 5050 may access software program code embodying one or more aspects from long-term storage media devices 5011, such as a CD-ROM drive, tape drive, or hard disk drive. The software program code may be embodied on any of a variety of known media used with a data processing system, such as a floppy disk, a hard disk drive, or a CD-ROM. The code may be distributed on such media, or it may be distributed from computer memory 5002 or storage of a computer system to other computer systems over a network 5010 for use by users of such other systems.

[0098] The software program code includes an operating system that controls the function and interaction of the various computer components and one or more application programs. Program code is typically transferred from the storage media device 5011 to the relatively faster computer memory 5002, where it is available for processing by the processor 5001. The methods and techniques for providing software program code in memory, on physical media, and / or distributing software code over networks are well known and will not be discussed further here. Program code created and stored on a physical medium such as, but not limited to, electronic memory modules (RAM), flash memory, compact discs (CDs), DVDs, magnetic tape, and the like is often referred to as a "computer program product."The computer program product medium is typically readable by processing circuitry, preferably in a computer system for execution by the processing circuitry.

[0099] Fig. Figure 9 illustrates a representative workstation or server hardware system in which one or more embodiments may be implemented. The system 5020 of Fig. 9 shows a representative basic computer system 5021, such as a personal computer, a workstation, or a server with optional peripheral devices. The basic computer system 5021 includes one or more processors 5026 and a bus to connect the processor(s) 5026 to the other components of the system 5021 according to known techniques and to enable data transfer. The bus connects the processor 5026 to the memory 5025 and the long-term storage 5027, which may include, for example, a hard disk (e.g., a memory with a magnetic medium, a CD, a DVD, and a flash memory) or a tape drive. The system 5021 may also include a user interface adapter that connects the microprocessor 5026 via the bus to one or more interface devices, such asa keyboard 5024, a mouse 5023, a printer / scanner 5030, and / or other interface devices, which may be any interface device such as a touchscreen, a digital input block, etc. The bus also connects a display device 5022, such as an LCD screen or monitor, to the microprocessor 5026 via a display adapter.

[0100] System 5021 may communicate with other computers or networks of computers via a network adapter capable of communicating with a network 5029. Examples of network adapters include data transmission channels, token-ring networks, or modems. Alternatively, system 5021 may communicate using a wireless interface such as a Cellular Digital Packet Data (CDPD) card. System 5021 may be associated with other such computers in a LAN or a WAN, or system 5021 may be a client in a client / server arrangement with another computer, etc. All of these configurations, as well as the corresponding hardware and software for communicating, are well known in the art.

[0101] Fig. 10 illustrates a data processing network 5040 in which one or more embodiments may be implemented. The data processing network 5040 may include a plurality of individual networks, such as a wireless network and a wired network, each of which may include a plurality of individual workstations 5041, 5042, 5043, 5044. As will be appreciated by those skilled in the art, one or more LANs may additionally be included, where a LAN may include a plurality of intelligent workstations connected to a host processor.

[0102] Further with a view to Fig. 10, the networks may also include mainframe computers or servers, e.g., a gateway computer (client server 5046) or application server (remotely located server 5048 that can access a data repository and which, in turn, can be accessed by a workstation 5045). A gateway computer 5046 serves as the entry point into the individual networks. A gateway is required when one network protocol is to be connected to another network protocol. Gateway 5046 may preferably be connected to another network (such as the Internet 5047) via a data link. Gateway 5046 may also be connected directly to one or more workstations 5041, 5042, 5043, 5044 via a data link. The gateway computer may be implemented using an IBM eServer System z server available from International Business Machines Corporation.

[0103] With simultaneous reference to Fig. 9 and Fig. 10, the processor 5026 of the system 5050 may access software program code 5031, which may embody one or more aspects, from a long-term storage medium 5027, such as a CD-ROM drive or hard disk drive. The software program code may be embodied on any of a variety of known media used with a data processing system, such as a floppy disk, a hard disk drive, or a CD-ROM. The code may be distributed on such a medium, or it may be distributed from the memory or storage of a computer system over a network to other computer systems to users 5050, 5051 for use by users of such other systems.

[0104] The program code may alternatively be contained in the main memory 5025 and accessed by the processor 5026 using the processor bus. Such program code includes an operating system that controls the function and interaction of the various computer components and one or more application programs 5032. Program code is normally transferred from the storage medium 5027 to the relatively faster main memory 5025, where it is available for processing by the processor 5026. The methods and techniques for providing software program code in main memory, on physical media, and / or distributing software code over networks are known and will not be discussed further here. Program code that is stored on a physical medium such asA computer program product medium created and stored on, but not limited to, electronic memory modules (RAM), flash memory, compact discs (CDs), DVDs, magnetic tape, and the like is often referred to as a "computer program product." The computer program product medium is typically readable by processing circuitry, preferably in a computer system for execution by the processing circuitry.

[0105] The cache memory most readily available to the processor (and usually faster and smaller than other processor caches) is the lowest-level cache (L1 cache, or Level 1 cache), and the main memory (main working memory) is the highest-level cache (L3 cache, if there are three levels). The lower-level cache memory is often divided into an instruction cache (I-cache), which contains machine instructions to be executed, and a data cache (D-cache), which contains data operands.

[0106] With a view to Fig. Figure 11 depicts an exemplary processor embodiment for processor 5026. Typically, one or more levels of cache 5053 are used to buffer memory blocks to improve processor performance. Cache 5053 is a high-speed buffer that contains cache lines of memory data that are likely to be used. Typical cache lines contain 64, 128, or 256 bytes of memory data. Separate caches are often used to caching instructions and data. Cache coherence (synchronization of line copies in memory and caches) is often provided by various "snoop" algorithms known in the art. The main memory 5025 of a processor system is often referred to as a cache.In a processor system with four levels of cache memory 5053, main memory 5025 is sometimes referred to as Level 5 (L5) cache because it is typically faster and contains a portion of the non-volatile memory (DASD, tape, etc.) available to a computer system. Main memory 5025 performs caching of data pages written to and read from main memory 5025 by the operating system.

[0107] A 5061 program counter (instruction counter) tracks the address of the current instruction to be executed. In a z / Architecture processor, a program counter has 64 bits and can be truncated to 31 or 24 bits to support previous addressing restrictions. A program counter is typically contained in a computer's PSW (Program Status Word) so that it is preserved across context switches. Thus, a running program that has a program counter value can be interrupted, for example, by the operating system (context switch from the program environment to the operating system environment). The program's PSW maintains the program counter value while the program is inactive, and the operating system's program counter (present in the PSW) is used while the operating system is executing. The program counter is typically incremented by a value equal to the number of bytes of the current instruction.RISC (Reduced Instruction Set Computing) instructions are typically fixed-length, while CISC (Complex Instruction Set Computing) instructions are variable-length. IBM z / Architecture instructions are CISC instructions and are 2, 4, or 6 bytes long. The program counter 5061 is modified, for example, by a context switch operation or a branch execution operation of a branch instruction. During a context switch operation, the current program counter value is stored in the program status word along with other state information about the executing program (e.g., condition codes), and a new program counter value is loaded that points to an instruction of a new program module to be executed.A branch execution operation is performed to allow the program to make decisions or execute loops within the program by loading the result of the branch instruction into the program counter 5061.

[0108] Typically, an instruction fetch unit 5055 is used to fetch instructions for processor 5026. The fetch unit fetches either "next sequential instructions," target instructions of branch execution instructions, or the first instructions of a program following a context switch. Modern instruction fetch units often use prefetching techniques to prefetch instructions based on the likelihood that the prefetched instructions could be used. For example, a fetch unit might fetch 16 bytes of an instruction containing the next sequential instruction and additional bytes of other sequential instructions.

[0109] The fetched instructions are then executed by processor 5026. In one embodiment, the fetched instruction(s) are passed to a dispatch unit 5056 of the fetch unit. The dispatch unit decodes the instruction(s) and forwards information about the decoded instruction(s) to appropriate units 5057, 5058, 5060. An execution unit 5057 typically receives information about decoded arithmetic instructions from instruction fetch unit 5055 and performs arithmetic operations on operands according to the instruction's opcode. Operands are preferably provided to execution unit 5057 from memory 5025, from architected registers 5059, or from an immediate field of the executed instruction. When results of execution are stored, this occurs either in memory 5025, in registers 5059, or in other machine hardware (e.g., control registers, PSW registers, and the like).

[0110] Virtual addresses are translated into real addresses using a dynamic address translation 5062 and optionally using an access register translation 5063.

[0111] A processor 5026 typically has one or more units 5057, 5058, 5060 to execute the function of the instruction. Fig. 12A, an execution unit 5057 may communicate 5071 with the architecturally defined general purpose registers 5059, a decode / allocation unit 5056, a load / store unit 5060, and other processor units 5065 via interface logic 5071. An execution unit 5057 may use multiple register circuits 5067, 5068, 5069 to store data processed by the arithmetic logic unit (ALU) 5066. The ALU performs arithmetic operations such as adding, subtracting, multiplying, and dividing, as well as logical functions such as AND, OR, and XOR, rotating, and shifting. The ALU preferably supports special operations that are design-dependent. Other circuits may provide other architecturally defined facilities 5072 such as condition codes and recovery support logic.The result of an ALU operation is typically stored in an output register 5070, which can forward the result to a variety of other processing functions. Many processor unit arrangements exist, and the present description is intended to provide only a representative understanding of one embodiment.

[0112] For example, an ADD instruction would be executed in an execution unit 5057 with arithmetic and logic functionality, while a floating-point instruction would be executed in a floating-point execution unit with special floating-point capability. An execution unit preferably acts on operands identified by an instruction by performing a function defined by an operation code on the operands. For example, an ADD instruction may be executed by an execution unit 5057 on operands located in two registers 5059, which are identified by register fields of the instruction.

[0113] Execution unit 5057 performs arithmetic addition on two operands and stores the result in a third operand, where the third operand can be a third register or one of the two source registers. The execution unit preferably uses an ALU 5066, which is capable of performing a variety of logical functions such as shift, rotate, AND, OR, and XOR, as well as a variety of algebraic functions such as add, subtract, multiply, and divide. Some ALU 5066s are designed for scalar operations and some for floating-point operations. Depending on the architecture, data can be big-endian (with the least significant byte at the highest byte address) or little-endian (with the least significant byte at the lowest byte address). IBM z / Architecture uses big-endian data.Depending on the architecture, signed fields can be the sign and magnitude, a one's complement, or a two's complement. A two's complement number is advantageous in that the ALU does not need to provide subtraction capability, since both a negative value and a positive value in a two's complement simply require addition in the ALU. Numbers are generally described in shorthand, with a 12-bit field defining the address of a 4,096-byte block and is generally described, for example, as a 4-KB (kilobyte) block.

[0114] With a view to Fig. 12B, branch instruction information for executing a branch instruction is typically sent to a branch unit 5058, which often uses a branch prediction algorithm such as a branch history table (BHT) 5082 to predict the outcome of the branch before other conditional operations complete. The target value of the current branch instruction is retrieved and speculatively executed before the conditional operations complete. When the conditional operations complete, the speculatively executed branch instructions are either completed or discarded based on the conditions of the conditional operation and the speculative result.A typical branch instruction may check condition codes and branch to a destination address if the condition codes satisfy the branch instruction's branch requirement. A destination address may be calculated based on multiple numbers, such as numbers located in register fields or in an immediate field of the instruction. Branch unit 5058 may use an ALU 5074, which includes a plurality of input register circuits 5075, 5076, 5077 and an output register circuit 5080. Branch unit 5058 may, for example, exchange data 5081 with general purpose registers 5059, decode / arbitration unit 5056, or other circuits 5073.

[0115] The execution of a group of instructions may be interrupted for various reasons, such as a context switch triggered by an operating system, a program exception or bug causing a context switch, an I / O interrupt signal causing a context switch, or multithreading activity of a plurality of programs (in a multithreaded environment). A context switch action preferably stores state information about a currently executing program and then loads state information about another program that is called. State information may be stored, for example, in hardware registers or in memory. State information preferably includes a program counter value pointing to a next instruction to be executed, condition codes, memory translation information, and the contents of architected registers.A context-switching activity can be performed by hardware circuitry, application programs, operating system programs, or firmware code (microcode, picocode, or licensed internal code [LIC]), or by a combination thereof.

[0116] A processor accesses operands according to methods defined by an instruction. The instruction may provide an immediate operand using the value of a portion of the instruction, and it may provide one or more register fields that explicitly point to either general-purpose registers or special-purpose registers (for example, floating-point registers). The instruction may use implicitly specified registers, identified as operands by an operation code field. The instruction may use memory locations as operands.A memory location of an operand can be provided by a register, an immediate field, or a combination of registers and immediate fields, as illustrated by the z / Architecture's long-shift facility, where the instruction defines a base register, an index register, and an immediate field (displacement field) that are added together to provide, for example, the operand's address in memory. Unless otherwise specified, memory location here implicitly means a location in main memory.

[0117] With a view to Fig. 12C, a processor accesses memory using a load / store unit 5060. The load / store unit 5060 may perform a load operation by obtaining the address of the destination operand in memory 5053 and loading the operand into a register 5059 or another location in memory 5053, or it may perform a store operation by obtaining the address of the destination operand in memory 5053 and storing data obtained from a register 5059 or another location in memory 5053 into memory 5053. The load / store unit 5060 may be speculative and access memory in an order that does not correspond to the instruction order, but the load / store unit 5060 is intended to still give programs the impression that instructions are being executed according to their correct order.A load / store unit 5060 may communicate 5084 with general purpose registers 5059, the decode / allocation unit 5056, the cache / memory interface 5053, or other elements 5083, and includes various register circuits 5086, 5087, 5088, and 5089, ALUs 5085, and control logic 5090 to calculate memory addresses and provide scheduling for the instruction chain to maintain the order of operations. Some operations may be performed out of order, but the load / store unit provides functionality to make the out-of-order operations appear to the program as if they were performed in the correct order, as is known in the art.

[0118] Addresses that an application program "sees" are preferably often referred to as virtual addresses. Virtual addresses are sometimes referred to as "logical addresses" and "effective addresses." These virtual addresses are virtual in that they are redirected to a physical memory location by one of a variety of DAT technologies, which technologies include, but are not limited to, simply prepending an offset value to a virtual address or translating the virtual address using one or more translation tables. The translation tables preferably include at least a segment table and a page table, or a combination thereof, and the segment table preferably includes an entry pointing to the page table.The z / Architecture provides a translation hierarchy that includes a first range table, a second range table, a third range table, a segment table, and an optional page table. Address translation performance is often improved by using a TLB that has entries that map a virtual address to a corresponding physical memory location. The entries are created when the DAT translates a virtual address using the translation tables. When the virtual address is later used, the entry of the fast TLB can be used instead of slow sequential accesses to the translation table. The TLB contents can be managed using a variety of replacement algorithms, such as an LRU (Least Recently Used) algorithm.

[0119] If the processor is a multiprocessor system, each processor is responsible for maintaining shared resources, such as I / O units, caches, TLBs, and memory, that are mutually locked for coherence. To maintain cache coherence, "snoop" technologies are commonly used. In a snoop environment, each cache line can have a marking indicating that it is in any of the shared, exclusive, modified, invalid, and other states to enable sharing.

[0120] I / O units 5054 ( Fig. 11) provide the processor with a means of connecting to peripheral devices such as tape drives, disks, printers, displays, and networks. I / O devices are often provided to the computer program by software drivers. In mainframes such as IBM's System z ® Channel adapters and open system adapters are I / O units of the mainframe that provide data transfer between the operating system and peripheral devices.

[0121] Furthermore, other types of computing environments may benefit from one or more aspects. For example, an environment may include an emulator (e.g., software or other emulation mechanisms) in which a particular architecture (e.g., instruction execution, architected functions such as address translation, and architected registers) or a subset thereof is emulated (e.g., on a native computer system having a processor and memory). In such an environment, one or more emulation functions of the emulator may implement one or more embodiments, even though a computer executing the emulator may have a different architecture than the emulated capabilities. In one example, the emulated specific instruction or operation is decoded in emulation mode, and an appropriate emulation function is created to implement the individual instruction or operation.to carry out the individual operation.

[0122] For example, in an emulation environment, a host computer includes memory to store instructions and data; an instruction fetch unit to retrieve instructions from memory and optionally provide local buffer storage for the retrieved instruction; an instruction decode unit to receive the fetched instructions and determine the type of instructions that were fetched; and an instruction execution unit to execute the instructions. Execution may include loading data from memory into a register; storing data from a register back into memory; or performing some other type of arithmetic or logical operation as determined by the decode unit. In one example, each unit is implemented in software. For example, the operations performed by the units are implemented as one or more subroutines within emulator software.

[0123] Specifically, programmers, who today are usually C programmers, often use architecturally defined machine instructions on a mainframe using a compiler application. These instructions, stored in the storage medium, can be executed natively in an IBM ® z / Architecture servers or alternatively in machines running other architectures. They can be deployed in existing and future IBM ® Mainframe servers and other IBM machines ® (e.g. Power Systems servers and System x servers). They can be run in machines running Linux on a wide variety of machines using hardware developed by IBM ® , Intel ®, AMD, and others. In addition to running on this hardware under a z / Architecture, it can run Linux, as well as machines that use emulation by Hercules, UMX, or FSI (Fundamental Software, Inc.), which generally run in emulation mode. In emulation mode, emulation software is executed by a native processor to emulate the architecture of an emulated processor.

[0124] The native processor typically runs emulation software, which includes either firmware or a native operating system to perform emulation of the emulated processor. The emulation software is responsible for fetching and executing instructions of the emulated processor architecture. The emulation software maintains an emulated program counter to track instruction boundaries. The emulation software can fetch one or more emulated machine instructions at a time and translate the one or more emulated machine instructions into a corresponding set of native machine instructions for execution by the native processor. These translated instructions can be cached, allowing for faster translation.Nevertheless, the emulation software must adhere to the architectural rules of the emulated processor architecture to ensure that operating systems and applications written for the emulated processor operate correctly. The emulation software must also provide resources identified by the emulated processor architecture, including, but not limited to, control registers, general-purpose registers, floating-point registers, a DAT function such as segment tables and page tables, interrupt mechanisms, context-switching mechanisms, time-of-day (TOD) timers, and architecturally defined interfaces to I / O subsystems so that an operating system or application program designed to run on the emulated processor can be executed on the native processor using the emulation software.

[0125] A specific instruction being emulated is decoded, and a subroutine is called to perform the function of that instruction. A function of the emulation software that emulates a function of an emulated processor is implemented, for example, in a "C" subroutine or in a driver, or some other method of providing a driver for the specific hardware is implemented, as will be apparent to one of ordinary skill in the art after reviewing the description of the preferred embodiment. Various patents relating to software and hardware emulation include, but are not limited to, U.S. Pat. No. 5,551,013, entitled "Multiprocessor for Hardware Emulation," by Beausoleil et al.; and U.S. Pat. No. 6,009,261, entitled "Preprocessing of Stored Target Routines for Emulating Incompatible Instructions on a Target Processor," by Scalzi et al.; und US-Patentschrift 5 574 873 mit dem Titel „Decoding Guest Instruction to Directly Access Emulation Routines that Emulate the Guest Instructions“ von Davidian et al.; und US-Patentschrift Nr. 6 308 255 mit dem Titel „Symmetrical Multiprocessing Bus and Chipset Used for Coprocessor Support Allowing Non-Native Code to Run in a System“ von Gorishek et al.; und US-Patentschrift Nr. 6 463 582 mit dem Titel „Dynamic Optimizing Object Code Translator for Architecture Emulation and Dynamic Optimizing Object Code Translation Method“ von Lethin et al.; und US-Patentschrift Nr.No. 5,790,825 entitled "Method for Emulating Guest Instructions on a Host Computer Through Dynamic Recompilation of Host Instructions" by Eric Traut, each of which is incorporated herein by reference in its entirety, illustrate a variety of known ways available to those skilled in the art for implementing emulation for a target machine of an instruction format designed for another machine.

[0126] In Fig. 13, an example of an emulated host computer system 5092 is provided that emulates a host computer system 5000' of a host architecture. In the emulated host computer system 5092, the host processor (CPU) 5091 is an emulated host processor (or a virtual host processor) and includes an emulation processor 5093 that has a different native instruction set architecture than the processor 5091 of the host computer 5000'. The emulated host computer system 5092 includes a memory 5094 accessible by the emulation processor 5093. In the exemplary embodiment, the memory 5094 is partitioned into a portion containing host computer memory 5096 and a portion containing emulation routines 5097. The host computer memory 5096 is available to programs of the emulated host computer 5092 according to a host computer architecture.The emulation processor 5093 executes native instructions of an architecturally defined instruction set of a different architecture than that of the emulated processor 5091, i.e., the native instructions obtained from the emulation routine memory 5097, and can access a host instruction for execution from a program in the host computer memory 5096 using one or more instructions obtained in a sorting and access / decode routine that can decode the accessed host instruction(s) to determine a native instruction execution routine to emulate the function of the accessed host instruction. Other devices defined for the architecture of the host computer system 5000' can be emulated by architecturally defined device routines, including, for example,Facilities such as general-purpose registers and control registers, dynamic address translation, I / O subsystem support, and a processor cache. The emulation routines may also utilize features available in the emulation processor 5093 (e.g., general-purpose registers and dynamic virtual address translation) to enhance the performance of the emulation routines. Special-purpose hardware and swap units may also be provided to assist the processor 5093 in emulating the functionality of the host computer 5000.

[0127] In another embodiment, one or more aspects relate to cloud computing. While this disclosure includes a detailed description of cloud computing, it should be understood at the outset that the implementation of the teachings presented herein is not limited to a cloud computing environment. Rather, embodiments of the present invention may be implemented in connection with any other type of computing environment known or later in the art.

[0128] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal management overhead and interaction with a service provider. This cloud model may, for example, include at least five features, at least three service models, and at least four deployment models. Features are as follows:

[0129] On-demand self-service: A cloud consumer can unilaterally and automatically provision computing capabilities such as server time and network storage on an as-needed basis without the need for human interaction with the service provider.

[0130] Broad network access: Capabilities are made available over a network and assigned through standard mechanisms that enable use by a variety of thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

[0131] Resource pooling: The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with various physical and virtual resources dynamically allocated and reassigned as needed. Location independence is achieved in that the consumer generally neither controls nor knows the exact location of the provided resources, but may be able to specify a location at a higher level of abstraction (e.g., country, state, or data center).

[0132] Flexible adaptability: Capabilities can be provisioned quickly and elastically (in some cases automatically) to enable rapid scaling up, and quickly released for rapid scaling down. To the consumer, the capabilities available for deployment often appear unlimited and can be acquired at any time in any quantity.

[0133] Service metering: Cloud systems automatically control and optimize resource usage by leveraging a metering function (e.g., storage, processing, bandwidth, and active user accounts) at a specific abstraction layer appropriate to the nature of the service. Resource usage can be monitored, controlled, and logged, providing transparency for both the provider and consumer of the service used. Service models are as follows:

[0134] Software as a Service (SaaS): The ability provided to the consumer is to use the provider's applications running on a cloud infrastructure. The applications can be accessed via a thin client interface such as a web browser from various client devices (e.g., a web-based email message). Except for limited user-specific application configuration settings, the underlying cloud infrastructure, such as the network, servers, operating systems, storage, or even individual application functions, is neither managed nor controlled by the consumer.

[0135] Platform as a Service (PaaS): The ability provided to the consumer is to deploy user-generated or acquired applications, built using programming languages ​​and tools provided by the provider, on the cloud infrastructure. The underlying infrastructure, such as networks, servers, operating systems, or storage, is neither managed nor controlled by the consumer, but they do have control over the deployed applications and possibly over configurations of the application hosting environment.

[0136] Infrastructure as a Service (IaaS): The capability provided to the consumer is to provide processing, storage, networking, and other basic computing resources, allowing the consumer to deploy and run software of their choice, such as operating systems and applications. The underlying cloud infrastructure is neither managed nor controlled by the consumer, but they have control over systems and devices (e.g., operating systems, storage, deployed applications, etc.) and potentially limited control over selected network components (e.g., host firewalls).

[0137] Deployment models are as follows: Private Cloud: The cloud infrastructure is operated solely for one organization. It can be managed by the organization itself or by a third party and can be located on-premises or off-premises.

[0138] Community cloud: The cloud infrastructure is shared by multiple organizations and supports a specific community with common concerns (e.g., mission, security requirements, policy, and compliance with laws and regulations). It can be managed by the organizations themselves or by a third party and can be located on-premises or off-premises.

[0139] Public cloud: The cloud infrastructure is provided to the general public or a large industry group and is owned by an organization that sells cloud services.

[0140] Hybrid cloud: The cloud infrastructure is a composition of two or more (private, community or public) clouds that remain independent entities but are connected by a standardized or vendor-specific technology that enables portability of data and applications (e.g. cloud bursting for load balancing between clouds).

[0141] A cloud computing environment is service-oriented, with a focus on statelessness, low coupling, modularity, and semantic compatibility. At the core of cloud computing is an infrastructure comprising a network of interconnected nodes.

[0142] Fig. 14 is a schematic diagram of an example cloud computing node. Cloud computing node 6010 is merely one example of a suitable cloud computing node and is not intended to limit the scope of use or functionality of embodiments of the invention described herein. Regardless, cloud computing node 6010 may be implemented with and / or perform any functionality set forth herein.

[0143] Within the cloud computing node 6010, there is a computer system / server 6012 that may operate with numerous other general-purpose or special-purpose system environments or configurations. Examples of known computing systems, environments, and / or configurations that may be suitable for use with a computer system / server 6012 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, pocket or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, mini-computer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems or devices, and the like.

[0144] The computer system / server 6012 can be described in the general context of instructions executable by a computer system, such as program modules executed by a computer system. In general, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. The computer system / server 6012 may be deployed in distributed cloud computing environments where tasks are performed by remotely located processing units interconnected by a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media, such as memory units.

[0145] Fig. 14 illustrates the computer system / server 6012 within the cloud computing node 6010 as a general-purpose computing device. The components of the computer system / server 6012 may include, but are not limited to, one or more processors or processing units 6016, system memory 6028, and a bus 6018 that connects various system components, such as the system memory 6028 to the processor 6016.

[0146] The 6018 bus represents at least one of several types of bus structures, such as a memory bus or memory controller, a peripheral bus, an Accelerated Graphics Port (AGP), and a processor or local bus, and any of a variety of bus architectures may be used. By way of example and not limitation, such architectures include the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, the Enhanced ISA (EISA) bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0147] The computer system / server 6012 typically includes a variety of media readable by a computer system. Such media may be any available media accessible by the computer system / server 6012, including both volatile and non-volatile, removable and non-removable media.

[0148] The system memory 6028 may include a computer system-readable medium in the form of volatile memory, such as random access memory (RAM) 6030 and / or cache memory 6032. The computer system / server 6012 may further include other removable / non-removable, volatile / non-volatile computer system storage media. For example only, a storage system 6034 may be provided for reading from and writing to a non-removable, non-volatile magnetic medium (not shown, and commonly referred to as a hard disk drive). Although not shown here, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic disk (e.g., a floppy disk), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk, such asa CD-ROM, a DVD-ROM, or other optical medium. In these cases, each drive may be connected to bus 6018 via one or more data media interfaces. As shown and described in more detail below, memory 6028 may include at least one program product having a set of (e.g., at least one) program modules configured to perform the functions of embodiments of the invention.

[0149] For example, and without limitation, a program / utility 6040 having a set of (at least one) program modules 6042 may be stored in memory 6028, as may an operating system, one or more application programs, other program modules, and program data. The operating system, the one or more application programs, the other program modules, and the program data, or a combination thereof, may each include an implementation of a network environment. The program modules 6042 generally perform the functions and / or procedures of embodiments of the invention described herein.

[0150] The computer system / server 6012 may also communicate with one or more external devices 6014, such as a keyboard, a pointing device, a display 6024, etc.; with one or more devices that allow a user to interact with the computer system / server 6012; and / or with any devices (such as a network card, modem, etc.) that allow the computer system / server 6012 to communicate with one or more other data transmission devices. Such communication may occur via input / output (I / O) interfaces 6022. Furthermore, the computer system / server 6012 may communicate with one or more networks, such as a LAN, a WAN, and / or a public network (such as the Internet), via a network adapter 6020. As shown, the network adapter 6020 communicates with the other components of the computer system / server 6012 via the bus 6018.It should be understood that, although not depicted here, other hardware and / or software components could be used in conjunction with the 6012 computer system / server. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive stacks, RAID systems, tape drives, and data archiving storage systems, among others.

[0151] With a view to Fig. 15, an illustrative cloud computing environment 6050 is depicted. As shown, the cloud computing environment 6050 includes one or more cloud computing nodes 6010 with which local computing devices, such as a personal digital assistant (PDA) or mobile phone 6054A, a desktop computer 6054B, a laptop computer 6054C, and / or an automotive computer system 6054N, can communicate. The nodes 6010 can communicate with each other. They can be physically or virtually aggregated into one or more networks, such as private, community, public, or hybrid clouds as described hereinabove, or a combination thereof (not depicted).In this way, the cloud computing environment 6050 can offer infrastructure, platforms, and / or software as services that do not require a cloud consumer to maintain resources on a local computing device. It should be understood that the services described in . Fig. 15 are for illustrative purposes only, and that the computing nodes 6010 and the cloud computing environment 6050 may communicate with any type of computer-based device over any type of network and / or network-addressable connection (e.g., using a web browser).

[0152] With a view to Fig. 16 shows a set of functional abstraction layers used by the cloud computing environment 6050 Fig. 15). It should be clear in advance that the Fig.The components, layers, and functions shown in Figure 16 are for illustrative purposes only, and embodiments of the invention are not limited thereto. As shown, the following layers and associated functions are provided: A hardware and software layer 6060 contains hardware and software components. Examples of hardware components include mainframes such as IBM ® zSeries ® -Systems; servers based on the RISC (Reduced Instruction Set Computer) architecture such as IBM pSeries ® -Systems; IBM xSeries ® -Systems; IBM BladeCenter ® Systems; storage devices; networks and network components. Examples of software components include software for network application servers such as IBM WebSphere ® -Application server software; and database software such as IBM DB2 ®Database software. (IBM, zSeries, pSeries, xSeries, BladeCenter, WebSphere, and DB2 are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide.)

[0153] A virtualization layer 6062 provides an abstraction layer that can provide the following examples of virtual entities: virtual servers; virtual storage; virtual networks such as virtual private networks; virtual applications and operating systems; and virtual clients.

[0154] In one example, a management layer 6064 may provide the functions described below. Resource provisioning provides dynamic procurement of computing and other resources used to perform tasks within the cloud computing environment. Metering and pricing functions provide cost tracking for the use of resources within the cloud computing environment and billing for the consumption of those resources. In one example, these resources may include licenses for application software. A security function provides identity verification for cloud consumers and tasks, as well as protection for data and other resources. A user portal function provides consumers and system administrators with access to the cloud computing environment.A service level management function provides allocation and management of cloud computing resources so that required service levels are achieved. A service level agreement (SLA) planning and execution function provides pre-determination and procurement of cloud computing resources for which future demand is expected according to an SLA.

[0155] A workload layer 6066 provides examples of functionality for which the cloud computing environment can be used. Examples of workloads and functions that can be provided by this layer include: mapping and navigation; software development and lifecycle management; virtual training provision; data analytics processing; and transaction processing.

[0156] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the verbs "comprises" and / or "comprising" in this specification indicate the presence of the recited features, integers, steps, acts, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, acts, elements, components, and / or groups thereof.

[0157] The recited structures, materials, acts, and equivalents of all means or steps in addition to the functional elements (if any) in the following claims are intended to include any structures, materials, or acts capable of performing the function in conjunction with other claimed elements as expressly claimed herein. The description of one or more embodiments has been presented for purposes of illustration and explanation and is not intended to be exhaustive or limiting to the form disclosed. Those skilled in the art will recognize that numerous changes and modifications are possible.The embodiment was chosen and described in order to best explain the various aspects and practical application and to enable others skilled in the art to understand various embodiments with various modifications as suited to the particular use contemplated.

Claims

[1] A computer program product (700) for executing a “COMPARE AND DELAY” instruction in a multi-threaded computing environment (200), the computer program product comprising: a computer-readable storage medium (702) readable by a processing circuit and storing instructions (704) for execution by the processing circuit to perform a method comprising: Receiving (500; 600) a "COMPARE AND DELAY" instruction (400; 450) by a thread (210) of the multi-threaded computing environment for execution, the "COMPARE AND DELAY" instruction being defined for computer execution according to a computer architecture, the "COMPARE AND DELAY" instruction comprising: an operation code to specify a "compare and delay" operation (602); one or more first fields with which to obtain a first operand (604); and one or more second fields with which to obtain a second operand (606); and Executing (502; 620) the “COMPARE AND DELAY” instruction on the thread of the multi-threaded computing environment, wherein executing the “COMPARE AND DELAY” instruction comprises: Comparing (560) the first operand and the second operand obtained (558) using fields (404, 406, 408, 410, 412; 454, 456, 458, 460, 462) of the "COMPARE AND DELAY" to obtain a comparison result, wherein the second operand is accessible by the thread and another thread of the multi-threaded computing environment; Determining (562) whether a masking indicator corresponding to the comparison result is set to a defined value; and based on determining that the masking indicator corresponding to the comparison result is set to the defined value, delaying (566) completion of the "COMPARE AND DELAY" instruction being executed until a predefined event occurs, wherein delaying comprises repeating the comparing and determining whether the masking indicator corresponding to the comparison result is set to the defined value, and wherein delaying delays execution on the thread, allowing progress to be made on the further thread of the multi-threaded computing environment to provide synchronization between the thread and the further thread. [2] The computer program product of claim 1, wherein the "COMPARE AND DELAY" instruction is completed (564) based on determining that the masking indicator corresponding to the comparison result is not set to the defined value. [3] The computer program product of claim 1, wherein the one or more first fields with which the first operand is to be obtained comprise a register field, the register field (404; 454) comprising a designation of a register, the register comprising the first operand, and the one or more second fields with which the second operand is to be obtained comprise a base field (408; 458), a first displacement field (410; 460), and a second displacement field (412; 462), the content of a register specified in the base field being added to a concatenation of the second displacement field and the first displacement field to provide an address of the second operand in a working memory. [4] The computer program product of claim 1, wherein the "COMPARE AND DELAY" instruction further comprises a mask field (406; 456), the mask field comprising the mask indicator. [5] The computer program product of claim 4, wherein the comparison result comprises either that the operands are of equal size, that the first operand is smaller than the second operand, or that the first operand is greater than the second operand, and wherein the masking field comprises a first masking indicator for a result with equal operands, a second masking indicator when the first operand is smaller than the second operand, and a third masking indicator when the first operand is greater than the second operand, and wherein the masking indicator is the first masking indicator, the second masking indicator, or the third masking indicator depending on the comparison result. [6] The computer program product of claim 1, wherein the second operand is monitored during the delaying of completion of the "COMPARE AND DELAY" instruction, and wherein the predefined event comprises determining that the mask indicator corresponding to the comparison result resulting from a further comparison of the first operand and the second operand is not set to the defined value. [7] The computer program product of claim 1, wherein the predefined event comprises suspending an activated interrupt. [8] The computer program product of claim 1, wherein the predefined event comprises reaching a predefined limit or occurring a selected processor condition. [9] The computer program product of claim 1, wherein the method further comprises determining (550) whether the "COMPARE AND DELAY" instruction may be executed in a non-privileged state, and performing the comparing of the first operand and the second operand based on the determining indicating that the "COMPARE AND DELAY" instruction may be executed in the non-privileged state. [10] The computer program product of claim 1, wherein the method further comprises determining a condition code for the "COMPARE AND DELAY" instruction, wherein determining the condition code uses the comparison result, wherein for a comparison result with equal operands, the condition code is a first value; wherein for a comparison result in which the first operand is less than the second operand, the condition code is a second value; and wherein for a comparison result in which the first operand is greater than the second operand, the condition code is a third value. [11] A computer system (202) for executing a machine instruction in a multi-threaded computing environment (200), the computer system comprising: a RAM; and a processor for exchanging data with the memory, wherein the computer system is configured to perform a method, the method comprising: Receiving (500; 600) a "COMPARE AND DELAY" instruction by a thread (210) of the multi-threaded computing environment for execution, the "COMPARE AND DELAY" instruction being defined for computer execution according to a computer architecture, the "COMPARE AND DELAY" instruction comprising: an operation code to specify a "compare and delay" operation (602); one or more first fields with which to obtain a first operand (604); and one or more second fields with which to obtain a second operand (606); and Executing (502; 620) the “COMPARE AND DELAY” instruction on the thread of the multi-threaded computing environment, wherein executing the “COMPARE AND DELAY” instruction comprises: Comparing (560) the first operand and the second operand obtained (558) using fields (404, 406, 408, 410, 412; 454, 456, 458, 460, 462) of the "COMPARE AND DELAY" instruction to obtain a comparison result, wherein the second operand is accessible by the thread and another thread of the multi-threaded computing environment; Determining (562) whether a masking indicator corresponding to the comparison result is set to a defined value; and based on determining that the masking indicator corresponding to the comparison result is set to the defined value, delaying (566) completion of the "COMPARE AND DELAY" instruction being executed until a predefined event occurs, wherein the delaying comprises repeating the comparing and determining whether the masking indicator corresponding to the comparison result is set to the defined value, and wherein the delaying delays execution on the thread, allowing progress to be made on the further thread of the multi-threaded computing environment to provide synchronization between the thread and the further thread. [12] The computer system of claim 11, wherein the second operand is located at a memory location shared by the thread and the further thread, the second operand being stored by the further thread or an input / output subsystem of the multi-threaded computing environment. [13] The computer system of claim 11, wherein the "COMPARE AND DELAY" instruction further comprises a mask field, the mask field (406; 456) comprising the mask indicator. [14] The computer system of claim 13, wherein the comparison result comprises either that the operands are equal, that the first operand is smaller than the second operand, or that the first operand is greater than the second operand, and wherein the masking field comprises a first masking indicator for a result with equal operands, a second masking indicator when the first operand is smaller than the second operand, and a third masking indicator when the first operand is greater than the second operand, and wherein the masking indicator is the first masking indicator, the second masking indicator, or the third masking indicator depending on the comparison result. [15] The computer system of claim 11, wherein the predefined event comprises determining that the masking indicator corresponding to the comparison result resulting from a further comparison of the first operand and the second operand is not set to the defined value. [16] The computer system of claim 11, wherein the method further comprises determining whether the "COMPARE AND DELAY" instruction may be executed in a non-privileged state, and performing the comparing of the first operand and the second operand based on the determining indicating that the "COMPARE AND DELAY" instruction may be executed in the non-privileged state. [17] The computer system of claim 11, wherein the method further comprises determining a condition code for the "COMPARE AND DELAY" instruction, wherein determining the condition code uses the comparison result, wherein for a comparison result with equal operands, the condition code is a first value; wherein for a comparison result in which the first operand is less than the second operand, the condition code is a second value; and wherein for a comparison result in which the first operand is greater than the second operand, the condition code is a third value. [18] A method for executing a machine instruction in a multi-threaded computing environment (200), the method comprising: Receiving (500; 600) a “COMPARE AND DELAY” command by a thread (210) of the multi-threaded data processing environment for execution, wherein the “COMPARE AND DELAY” instruction is defined for computer execution according to a computer architecture, wherein the “COMPARE AND DELAY” instruction comprises: an operation code to specify a compare and delay operation (602); one or more first fields with which a first operand is to be obtained (604); and one or more second fields with which a second operand is to be obtained (606); and Executing (502; 620) the “COMPARE AND DELAY” instruction on the thread of the multi-threaded computing environment, wherein executing the “COMPARE AND DELAY” instruction comprises: Comparing (560) the first operand and the second operand obtained (558) using fields (404, 406, 408, 410, 412; 454, 456, 458, 460, 462) of the "COMPARE AND DELAY" instruction to obtain a comparison result, wherein the second operand is accessible by the thread and another thread of the multi-threaded computing environment; Determining (562) whether a masking indicator corresponding to the comparison result is set to a defined value; and based on determining that the masking indicator corresponding to the comparison result is set to the defined value, delaying (566) completion of the "COMPARE AND DELAY" instruction being executed until a predefined event occurs, wherein the delaying comprises repeating the comparing and determining whether the masking indicator corresponding to the comparison result is set to the defined value, and wherein the delaying delays execution on the thread, allowing progress to be made on the further thread to provide synchronization between the thread and the further thread. [19] The method of claim 18, wherein the "COMPARE AND DELAY" instruction further comprises a mask field (406; 456), the mask field comprising the mask indicator. [20] The method of claim 19, wherein the comparison result comprises either the operands being equal, the first operand being smaller than the second operand, or the first operand being greater than the second operand, and wherein the masking field comprises the first masking indicator for a result with equal operands, the second masking indicator when the first operand is smaller than the second operand, and the third masking indicator when the first operand is greater than the second operand.

Citation Information

Patent Citations

  • Multiprocessor for hardware emulation

    US5551013A

  • Decoding guest instruction to directly access emulation routines that emulate the guest instructions

    US5574873A

  • Method for emulating guest instructions on a host computer through dynamic recompilation of host instructions

    US5790825A

  • Preprocessing of stored target routines for emulating incompatible instructions on a target processor

    US6009261A

  • Symmetrical multiprocessing bus and chipset used for coprocessor support allowing non-native code to run in a system

    US6308255B1