IBM System/360 architecture
| Industry | Computer architecture |
|---|---|
| Founded | 1964 |
| Products | Mainframe computer systems architecture |
The IBM System/360 architecture represents the architecture independent of any specific model, encompassing the entire S/360 series of mainframe computer systems. Its specifications are detailed in the IBM System/360 Principles of Operation and associated documentation. Certain variations within this architecture acted as forerunners to features later incorporated into the S/370 design or held particular significance in scientific computing; these instances are highlighted separately.
Features
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MemoryThe System/360 architecture addresses memory at the granularity of 8-bit bytes, with larger data units defined as halfword (2 bytes), fullword (4 bytes), doubleword (8 bytes), and quadword (16 bytes). The architecture accommodates up to 16 MB of physical memory, while the Model 67 extends this capacity to enable virtual memory addressing up to 4 GB. AddressingInstructions utilize truncated addressing mode, which combines a base register—selected from fifteen general-purpose registers—with a positive displacement. This method allows versatile addressing within the defined memory range. Data formatsThis architecture specifies data representations for characters, integers, decimal numbers, and hexadecimal floating-point values as follows:
Instruction formatsInstructions vary in length, being either two, four, or six bytes, with the opcode located in the first byte. The formats include:
All instructions must be aligned on boundaries of two bytes. Program Status Word (PSW)The Program Status Word (PSW) is a 64-bit register that governs program execution. It encompasses system masks for I/O channels, the CPU protection key, an ASCII mode indicator, machine check enable flag, wait state status, problem state flag, interruption code, instruction length code, condition code, program mask bits for overflow and underflow exceptions, as well as the address of the next instruction. The Load Program Status Word (LPSW) instruction is privileged and is used to load the PSW to continue execution following interruptions or mode transitions. Additional privileged instructions can modify portions of the PSW without triggering interruptions. Interruption systemThe system architecture defines five distinct classes of interruptions, each assigned a priority level to determine handling order when multiple interruptions occur simultaneously:
For each class, there is a designated old PSW storage location where the current processor state is saved alongside an inserted interruption code. Subsequently, the new PSW is loaded to manage the interruption. Interruptions may nest according to their priority levels. Input/Output interruptionThis type of interruption occurs upon completion of channel programs or due to asynchronous device events. The device address serves as the interruption code, while the Channel Status Word records the channel status. Program interruptionTriggered by any among up to fifteen exception types such as operation exception (invalid instruction), privileged operation exception, execute exception (nested EXECUTE), protection exception (storage key violation), addressing exception (illegal address), specification exception (invalid instruction fields or misalignment), data exception (incorrect decimal operands), overflow exceptions, division exceptions, exponent exceptions, significance exception, and floating-point division exception. Certain models support imprecise exceptions. Supervisor Call interruptionInitiated by Supervisor Call instructions; bits from the SVC instruction are saved as the interruption code. External interruptionOccurs due to asynchronous events including timer expirations and external signals; specific bits within the code indicate the exact cause. Machine Check interruptionReports hardware faults such as parity errors not covered by other interruption types; both the code and associated data vary depending on the model. Input/OutputI/O processes are handled by dedicated processors known as channels, which operate independently from the CPU by running their own instruction sets. In smaller systems, channel microcode is integrated within the CPU, whereas larger systems employ distinct channel hardware. Each channel may comprise several subchannels, each representing individual devices or groups of devices that share resources. There are three categories of channels:
Peripheral hardware connects via control units linked to the channels. Devices are identified by a 16-bit code called "cuu," where the upper bits specify the channel and the lower bits indicate the particular device. Control units feature address capture ranges and priority levels that influence the order in which commands are selected. To perform I/O, the Channel Address Word (CAW) must be initialized with a storage key and the address of the first CCW. The Start I/O (SIO) instruction is then issued with the device's cuu. Following this, the system waits for an I/O interruption before processing any conditions reported by the Channel Status Word (CSW). Channel programs are sequences of linked Channel Control Words (CCWs). Completion criteria differ based on command flags and unit status. Throughout operation, channels may generate Program-Controlled Interruptions without halting command execution. Channel statusThe CSW reflects various conditions detected by either the channel or the associated device/control unit during I/O:
Unit statusStatus codes provided by control units or devices include:
Channel Address WordThis contains both a storage protection key and the initial address for channel program execution. Channel Command WordA doubleword detailing command code, memory address, flags, and byte count for I/O operations. Command codes cover Sense, Transfer In Channel (TIC), Read/Write operations, and control commands that modify device states. CCW flagsFlags that influence command behavior include:
Channel Status WordThe Channel Status Word (CSW) delivers comprehensive information following I/O interruptions, including details such as the protection keys in use, the address of the last fetched CCW, status bits that reveal conditions detected in the unit or channel during processing, and the residual count indicating the number of bytes not transferred. I/O InstructionsThere are four privileged instructions dedicated to I/O management:
Operator ControlsWhile the System/360 architecture defines standard operator functions, their physical implementation can differ across various models: Core functions comprise:
Additional controls include an interrupt key that triggers external interrupts; indicator lights that reflect processor conditions such as wait or manual stop; load unit controls for selecting IPL devices; switches for choosing between continuous processing and single-step execution modes; storage-select switches determining access types; address/data switches for specifying operands during store or display operations; store/display keys for manual data manipulation; set IC key for adjusting the instruction counter; address-compare switches enabling halts on matching addresses; and an alternate-prefix light indicating when prefix triggering is active. Byte-Aligned OperandsCertain models, such as the S/360-85, loosen alignment restrictions for some problem-state instructions without offering a way to disable this behavior. Decimal ArithmeticPacked decimal instructions operate on numbers composed of digits followed by a sign nibble. Invalid digits or signs cause data exceptions except within PACK and UNPACK instructions. Direct ControlProvides six external signal lines along with an eight-bit data path linking external devices directly to storage. Floating-Point ArithmeticFeatures four floating-point registers supporting hexadecimal floating-point formats at single and double precision. Extended precision is available on specific models like the 360/85 and 360/195. Interval TimerWhen installed, this timer decrements a word at fixed intervals and generates external interrupts upon reaching zero. Timer frequency varies by model, ranging from AC power supply frequency to high-resolution timers in larger systems. Multi-System OperationEnables multi-processor configurations through capabilities such as Direct Control and direct address relocation, known as "prefixing." Storage safeguardsThe system employs four-bit storage keys assigned to each 2048-byte segment, which are verified during store operations initiated by either the CPU or I/O channels. A key value of zero disables this protection mechanism, whereas any nonzero key enforces access restrictions that prevent malfunctioning programs from overwriting essential operating system components or other applications' memory areas. Certain models offer an additional fetch protection feature that prohibits instruction fetches from memory blocks marked as protected. Variations and enhancementsThe IBM System/360 Model 20 deviates considerably from the standard S/360 architecture. The IBM System/360 Model44 excludes some instructions but compensates by simulating them through concealed memory, allowing it to maintain compatibility with conventional software. Various models incorporate enhancements such as emulation instructions or paging capabilities. Multiprocessing implementations differ notably between the S/360-65 multisystem mode and the incompatible modifications found in the S/360 Model67-2. Some of these variations acted as forerunners to functionalities later standardized in the IBM System/370 architecture. See alsoReferences
Further reading
External links
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||