Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

IBM System/360 architecture

From Wikipedia, the free encyclopedia
Model independent architecture for the S/360 line of mainframe computers
System/360
DesignerIBM
Bits32-bit
IntroducedApril 7, 1964; 61 years ago (1964-04-07)
DesignCISC
TypeRegister-Register
Register-Memory
Memory-Memory
EncodingVariable(2, 4 or 6 bytes long)
BranchingCondition code, indexing, counting
EndiannessBig
Page sizeN/A, except for360/67
OpenYes
Registers
General-purpose16× 32-bit
Floating-point4× 64-bit
History ofIBM mainframes, 1952–present
Market name
Architecture
Main article:IBM System/360

TheIBM System/360 architecture is the model independentarchitecture for the entireS/360 line ofmainframe computers, including but not limited to theinstruction set architecture. The elements of the architecture are documented in theIBM System/360 Principles of Operation[1][2] and theIBM System/360 I/O Interface Channel to Control Unit Original Equipment Manufacturers' Information manuals.[3]

Features

[edit]
IBM S/360 registers
General Registers 0-15

Two's complement value
031
Floating Point Registers 0, 2, 4 and 6

SBiased exponentMantissa
017831

Mantissa (continued)
3263
S/360 PSW[4]

Chan.
Mask
I
O
E
X
KeyAMWPInterruption Code
0124567811121314151631

ILCCCProgram
Mask
Instruction Address
3233343536394063
S/360 PSW abbreviations
BitsFieldMeaning
0-5Channel Masks for channels 0-5
6IOI/O Mask for channels > 5
7EXExternal Mask
8-11KeyPSW key
12AASCII mode for decimal arithmetic
13MMachine-check mask
14WWait state
15PProblem state
16-31ICInterruption Code[5]
32-33ILCInstruction-Length Code[6]
34-35CCCondition Code
36-39PM
Program Mask
BitMeaning
36Fixed-point overflow
37Decimal overflow
38Exponent underflow
39Significance
40-63IAInstruction Address
  • IBM documentation numbers the bits from high order to low order; the most significant (leftmost) bit is designated as bit number 0.

The System/360 architecture provides the following features:

  • 1632-bit general-purpose registers
  • 4 64-bitfloating-point registers
  • 64-bit processor status register (PSW), which includes a 24-bitinstruction address
  • 24-bit (16 MB) byte-addressable memory space
  • Big-endian byte/word order
  • Astandard instruction set, including fixed-point binary arithmetic and logical instructions, present on all System/360 models (except theModel 20, see below).
    • Acommercial instruction set, adding decimal arithmetic instructions, is optional on some models, as is ascientific instruction set, which adds floating-point instructions. Theuniversal instruction set includes all of the above plus the storage protection instructions and is standard for some models.
    • TheModel 44 provides a few unique instructions for data acquisition and real-time processing and is missing the storage-to-storage instructions. However, IBM offered a 'Commercial Instruction Set" feature that ran in bump storage and simulated the missing instructions.
    • TheModel 20 offers a stripped-down version of the standard instruction set, limited to eight general registers with halfword (16-bit) instructions only, plus the commercial instruction set, and unique instructions for input/output.
    • TheModel 67 includes some instructions to handle 32-bit addresses and "dynamic address translation", with additional privileged instructions to provide virtual memory.[7]

Memory

[edit]

Memory (storage) in System/360 is addressed in terms of8-bit bytes. Various instructions operate on larger units calledhalfword (2 bytes),fullword (4 bytes),doubleword (8 bytes),quad word (16 bytes) and 2048 byte storage block, specifying the leftmost (lowest address) of the unit. Within a halfword, fullword, doubleword or quadword, low numbered bytes are more significant than high numbered bytes; this is sometimes referred to asbig-endian. Many uses for these units require aligning them on the corresponding boundaries. Within this article the unqualified termword refers to afullword.

The original architecture of System/360 provided for up to 224 = 16,777,216 bytes of memory. The laterModel 67 extended the architecture to allow up to 232 = 4,294,967,296[a] bytes of virtual memory.

Addressing

[edit]

System/360 uses truncated addressing similar to that of theUNIVAC III.[8] That means that instructions do not contain complete addresses, but rather specify a base register and a positive offset from the addresses in the base registers. In the case of System/360 the base address is contained in one of 15[b] general registers. In some instructions, for example shifts, the same computations are performed for 32-bit quantities that are not addresses.

Data formats

[edit]

The S/360 architecture defines formats for characters, integers, decimal integers and hexadecimal floating point numbers. Character and integer instructions are mandatory, but decimal and floating point instructions are part of the Decimal arithmetic andFloating-point arithmetic features.

  • Characters are stored as 8-bit bytes.
  • Integers are stored as two's complement binary halfword or fullword values.
  • Packed decimal numbers are stored as 1 to 16 8-bit bytes containing an odd number of decimal digits followed by a 4-bit sign. Sign values of hexadecimal A, C, E, and F are positive and sign values of hexadecimal B and D are negative. Digit values of hexadecimal A-F and sign values of 0-9 are invalid, but the PACK and UNPK instructions do not test for validity.
  • Zoned decimal numbers are stored as 1 to 16 8-bit bytes, each containing a zone in bits 0-3 and a digit in bits 4-7. The zone of the rightmost byte is interpreted as a sign.
  • Floating point numbers are only stored as fullword or doubleword values on older models. On the 360/85[9] and 360/195[10] there are also extended precision floating point numbers stored as quadwords. For all three formats, bit 0 is a sign and bits 0-7 are a characteristic (exponent, biased by 64). Bits 8-31 (8-63) are a hexadecimal fraction. For extended precision, the low order doubleword has its own sign and characteristic, which are ignored on input and generated on output.

Instruction formats

[edit]

Instructions in the S/360 are two, four or six bytes in length, with the opcode in byte 0. Instructions have one of the following formats:

  • RR (two bytes). Generally byte 1 specifies two 4-bit register numbers, but in some cases, e.g., SVC, byte 1 is a single 8-bit immediate field.
  • RS (four bytes). Byte 1 specifies two register numbers; bytes 2-3 specify a base and displacement.
  • RX (four bytes). Bits 0-3 of byte 1 specify either a register number or a modifier; bits 4-7 of byte 1 specify the number of the general register to be used as an index; bytes 2-3 specify a base and displacement.
  • SI (four bytes). Byte 1 specifies an immediate field; bytes 2-3 specify a base and displacement.
  • SS (six bytes). Byte 1 specifies two 4-bit length fields or one 8-bit length field; bytes 2-3 and 4-5 each specify a base and displacement. The encoding of the length fields is length-1.

Instructions must be on a two-byte boundary in memory; hence the low-order bit of the instruction address is always 0.

Program Status Word (PSW)

[edit]
Main article:Program Status Word

TheProgram Status Word (PSW)[2]: 71–72  contains a variety of controls for the currently operating program. The 64-bit PSW describes (among other things) the address of the current instruction being executed, condition code and interrupt masks.

PSW format
BitsContentsExplanation
0-7System Maskbits 0-5: enable channels 0-5, bit 6: enable all remaining channels,[c] bit 7: enable External interruptions (timer, interrupt key, and external signal[13]
8-11Protection keyCPU protection key to compare against storage protection keys
12ASCII modeenable ASCII mode for packed decimal instructions, never used by IBM software[d]
13Machine checksenable Machine check interruptions
14Wait Stateprocessor is halted, an interruption, if enabled, will cause the processor to resume executing instructions
15Problem stateenable to prevent the use of instructions reserved for supervisor state
16-31Interruption Codecode to indicate the type of interruption, inserted when the PSW is stored, during IPLoad, this is the address of the device from which the program was loaded[14]
32-33Instruction Length Codelength in halfwords or 0 if unavailable
34-35Condition Codesee individual instructions for encoding
36-39Program Maskbit 36: enable fixed-point overflow, bit 37: decimal overflow, bit 38: exponent underflow, bit 39: significance[13]
40-63Instruction Addressaddress of next instruction, except for a program interruptions with ILC 0

Load Program Status Word (LPSW) is a privilegedinstruction that loads the Program Status Word (PSW), including the program mode, protection key, and the address of the next instruction to be executed. LPSW is most often used to "return" from an interruption by loading the "old" PSW which is associated with the interruption class. Other privileged instructions (e.g., SSM, STNSM, STOSM, SPKA, etcetera) are available for manipulating subsets of the PSW without causing an interruption or loading a PSW; and one non-privileged instruction (SPM) is available for manipulating the program mask.

Interruption system

[edit]

The architecture[2]: 77–83  defines 5 classes ofinterruption. An interruption is a mechanism for automatically changing the program state; it is used for both synchronous[e] andasynchronous events.

Interruption classOld PSWNew PSWPriority
hexdechexdec
Input/Output[15]3856781204
Program[16]2840681042
Supervisor Call[17]203260962
External[18]182458883
Machine Check[19]3048701121

There are two storage fields assigned to each class of interruption on the S/360; an old PSW double-word and a new PSW double-word. The processor stores the PSW, with an interruption code inserted, into the old PSW location and then loads the PSW from the new PSW location. This generally replaces the instruction address, thereby effecting a branch, and (optionally) sets and/or resets other fields within the PSW, thereby effecting a mode change.

The S/360 architecture defines a priority to each interruption class, but it is only relevant when two interruptions occur simultaneously; an interruption routine can be interrupted by any other enabled interruption, including another occurrence of the initial interruption. For this reason, it is normal practice to specify all of the mask bits, with the exception of machine-check mask bit, as 0 for the "first-level" interruption handlers. "Second-level" interruption handlers are generally designed for stacked interruptions (multiple occurrences of interruptions of the same interruption class).

Input/Output interruption

[edit]

An I/O interruption[15] occurs at the completion of a channel program, after fetching a CCW with the PCI bit set and also forasynchronous events detected by the device, control unit or channel, e.g., completion of a mechanical movement. The system stores the device address into the interruption code and stores channel status into theCSW at location 64 ('40'X).

Program interruption

[edit]

A Program interruption[2]: 16, 79–80.1  occurs when an instruction encounters one[f] of 15[g] exceptions; however, if theProgram Mask bit corresponding to an exception is 0 then there is no interruption for that exception. On 360/65,[21]: 12  360/67[11]: 46  and 360/85[9]: 12  the Protection Exception and Addressing Exception interruptions can be imprecise, in which case they store an Instruction Length Code of 0.The Interruption code may be any of

Interruption codes for Program interruptions
old PSW bits 26-31
hex
bits 26-31
DecException
00

Imprecise interruption[f] on 360/91,[20]: 15  360/95 or 360/195[10]: 14 

Old PSW bits for multiple imprecise interruption codes
bitException
16Protection
17Addressing
18Specification[h]
19Data
20Fixed-Point Overflow
21Fixed-Point Divide
22Exponent Overflow
23Exponent Underflow
24Significance
25Floating-Point Divide
26Decimal Overflow[i]
27Decimal Divide[i]
11Operation[22]
22Privileged operation[22]
33Execute[22]
44Protection[22]
55Addressing[23]
66Specification[24]
77Data[24]
88Fixed-point overflow[24]
99Fixed-point divide[24]
A10Decimal overflow[24]
B11Decimal divide[24]
C12Exponent overflow[24]
D13Exponent underflow[24]
E14Significance[24]
F15Floating-point divide[25]
1016

Segment Translation[11]: 17 [g]

1117

Page Translation[11]: 17 [g]

1218

SSM Exception[21][g]

  • Anoperation exception[22] is recognized when a program attempts to execute an instruction with an opcode that the computer does not implement. In particular, an operation exception is recognized when a program is written for an optional feature, e.g., floating point, that is not installed.
  • Aprivileged operation exception[22] is recognized when a program attempts to execute a privileged instruction when the problem state bit in the PSW is 1.
  • Anexecute exception[22] is recognized when the operand of anEXECUTE instruction (EX) is another EXECUTE instruction.
  • Aprotection exception[22] is recognized when a program attempts to store into a location whose storage protect key does not match[j] the PSW key, or to fetch from a fetch protected location whose storage protect key does not match the PSW key.
  • Anaddressing exception[23] is recognized when a program attempts to access a storage location that is not currently available. This normally occurs with an address beyond the capacity of the machine, but it may also occur on machines that allow blocks of storage to be taken offline.
  • Aspecification exception[24] is recognized when an instruction has a length or register field with values not permitted by the operation, or when it has an operand address that does not satisfy the alignment requirements of the opcode, e.g., a LH instruction with an odd operand address on a machine without the byte alignment feature.
  • Adata exception[24] is recognized when a decimal instruction specifies invalid operands, e.g., invalid data, invalid overlap.
  • Afixed-point overflow exception[24] is recognized when significant bits are lost in a fixed point arithmetic or shift instruction, other than divide.
  • Afixed-point divide exception[24] is recognized when significant bits are lost in a fixed point divide or Convert to Binary instruction.
  • Adecimal overflow exception[24] is recognized when significant digits are lost in a decimal arithmetic instruction, other than divide.
  • Adecimal divide exception[24] is recognized when significant bits are lost in a decimal divide instruction. The destination is not altered.
  • Anexponent overflow exception[24] is recognized when the characteristic in a floating-point arithmetic operation exceeds 127 and the fraction is not zero.
  • Anexponent underflow exception[24] is recognized when the characteristic in a floating-point arithmetic operation is negative and the fraction is not zero.
  • Asignificance exception[24] is recognized when the fraction in a floating-point add or subtract operation is zero.
  • Afloating-point divide exception[25] is recognized when the fraction in the divisor of a floating-point divide operation is zero.

Supervisor Call interruption

[edit]

A Supervisor Call interruption[17] occurs as the result of aSupervisor Call instruction; the system stores bits 8-15 of the SVC instruction as the Interruption Code.

External interruption

[edit]

An External[26][k] interruption occurs as the result of certain asynchronous events. Bits 16-24 of the External Old PSW are set to 0 and one or more of bits 24-31 is set to 1

Interruption codes for External interruptions
PSW bitType of external interruption

24

Timer

25

Interrupt key

26

External signal 2
Malfunction alert on 360/65[21] in Multisystem mode

27

External signal 3
System Call on 360/65[21] in Multisystem mode

28

External signal 4

29

External signal 5

30

External signal 6

31

External signal 7

Machine Check interruption

[edit]

A Machine Check interruption[19] occurs to report unusual conditions associated with the channel or CPU that cannot be reported by another class of interruption. The most important class of conditions causing a Machine Check is a hardware error such as a parity error found in registers or storage, but some models may use it to report less serious conditions. Both the interruption code and the data stored in the scanout area at '80'x (128 decimal) are model dependent.

Input/Output

[edit]
Further information on physical interface:Bus and Tag

This article describes I/O from the CPU perspective. It does not discuss the channel cable or connectors, which have aseparate article; there is a summaryelsewhere and details can be found in the IBM literature[3] and in FIPS PUB 60-2.[27]

I/O is carried out by a conceptually separate processor called a channel. Channels have their own instruction set, and access memory independently of the program running on the CPU. On the smaller models (through360/50) a single microcode engine runs both the CPU program and the channel program. On the larger models the channels are in separate cabinets and have their own interfaces to memory. A channel may contain multiplesubchannels, each containing the status of an individual channel program. A subchannel associated with multiple devices that cannot concurrently have channel programs is referred to asshared; a subchannel representing a single device is referred to asunshared.

There are three types of channels on the S/360:

  • Abyte multiplexer channel is capable of executing multipleCCWs concurrently; it is normally used to attach slow devices such as card readers and telecommunications lines. A byte multiplexer channel could have a number of selector subchannels, each with only a single subchannel, which behave like low-speed selector channels.
  • Aselector channel has only a single subchannel, and hence is only capable of executing one channel command at a time. It is normally used to attach fast devices that are not capable of exploiting a block multiplexer channel to suspend the connection, such as magnetic tape drives.
  • Ablock multiplexer channel is capable of concurrently running multiple channel programs, but only one at a time can be active. The control unit can request suspension at the end of a channel command and can later request resumption. This is intended for devices in which there is a mechanical delay after completion of data transfer, e.g., for seeks on moving-head DASD. The block multiplexer channel was a late addition to the System/360 architecture; early machines had only byte multiplexer channels and selector channels. The block multiplexer channel is an optional feature only on the models 85 and 195. The block multiplexor channel is also available on the laterSystem/370 computers.

Conceptually peripheral equipment is attached to a S/360 throughcontrol units, which in turn are attached through channels. However, the architecture does not require that control units be physically distinct, and in practice they are sometimes integrated with the devices that they control. Similarly, the architecture does not require the channels to be physically distinct from the processor, and the smaller S/360 models (through 360/50) have integrated channels thatsteal cycles from the processor.

Peripheral devices are addressed with 16-bit[l] addresses.,[2]: 89  referred to ascua orcuu; this article will use the termcuu. The high 8 bits identify a channel, numbered from 0 to 6,[c] while the low 8 bits identify a device on that channel. A device may have multiplecuu addresses.

Control units are assigned an address "capture" range. For example, a CU might be assigned range 20-2F or 40-7F. The purpose of this is to assist with the connection and prioritization of multiple control units to a channel. For example, a channel might have three disk control units at 20-2F, 50-5F, and 80-8F. Not all of the captured addresses need to have an assigned physical device. Each control unit is also marked as High or Low priority on the channel.

Device selection progresses from the channel to each control unit in the order they are physically attached to their channel. At the end of the chain the selection process continues in reverse back towards the channel. If the selection returns to the channel then no control unit accepted the command and SIO returns Condition Code 3. Control units marked as High Priority check the outbound CUU to be within their range. If so, then the I/O is processed. If not, then the selection is passed to the next outbound CU. Control units marked as Low Priority check for inbound (returning) CUU to be within their range. If so, then the I/O is processed. If not, then the selection is passed to the next inbound CU (or the channel). The connection of three controls unit to a channel might be physically -A-B-C and, if all are marked as High then the priority would be ABC. If all are marked low then the priority would be CBA. If B was marked High and AC low then the order would be BCA. Extending this line of reasoning then the first of N controllers would be priority 1 (High) or 2N-1 (Low), the second priority 2 or 2N-2, the third priority 3 or 2N-3, etc. The last physically attached would always be priority N.

There are three storage fields reserved for I/O; a double word I/O old PSW, a doubleword I/O new PSW and a fullwordChannel Address Word (CAW). Performing an I/O normally requires the following:

  • initializing theCAW with the storage key and the address of the first CCW
  • issuing aStart I/O (SIO) instruction that specifies thecuu for the operation
  • waiting[m] for an I/O interruption
  • handling any unusual conditions indicated in theChannel Status Word (CSW)

A channel program consists of a sequence ofChannel Control Words (CCWs) chained together (see below.) Normally the channel fetchesCCWs from consecutive doublewords, but a control unit can direct the channel to skip a CCW and aTransfer In Channel (TIC)CCW can direct the channel to start fetchingCCWs from a new location.

There are several defined ways for a channel command to complete. Some of these allow the channel to continue fetching CCWs, while others terminate the channel program. In general, if the CCW does not have the chain-command bit set and is not a TIC, then the channel will terminate the I/O operation and cause an I/O interruption when the command completes. Certain status bits from the control unit suppress chaining.

The most common ways for a command to complete are for the count to be exhausted when chain-data is not set and for the control unit to signal that no more data transfers should be made. If Suppress-Length-Indication (SLI) is not set and one of those occurs without the other, chaining is not allowed. The most common situations that suppress chaining are unit-exception and unit-check. However, the combination of unit-check and status-modifier does not suppress chaining; rather, it causes the channel to do a command retry, reprocessing the same CCW.

In addition to the interruption signal sent to the CPU when an I/O operation is complete, a channel can also send a Program-Controlled interruption (PCI) to the CPU while the channel program is running, without terminating the operation, and a delayed device-end interruption after the I/O completion interruption.

Channel status

[edit]

These conditions are detected by the channel and indicated in theCSW.[28]

  • Program-controlled interruption[29] indicates that the channel has fetched a CCW with the PCI bit set. The channel continues processing; this interruption simply informs the CPU of the channel's progress. An example of the use of Program-controlled interruption is in the "Program Fetch" function of Contents Supervision, whereby the control program is notified that a Control/Relocation Record has been read. To ensure that this record has been completely read into main storage, a "disabled bit spin", one of the few which remains in the control program, is initiated. Satisfaction of the spin indicates that the Control/Relocation Record is completely in main storage and the immediately preceding Text Record may be relocated. After relocation, a NOP CCW is changed to a TIC and the channel program continues. In this way, an entire load module may be read and relocated while utilizing only oneEXCP, and possibly only one revolution of the disk drive. PCI also has applications in teleprocessing access method buffer management.
  • Incorrect length[30] indicates that the data transfer for a command completed before the Count was exhausted. This indication is suppressed if theSuppress-Length-Indication bit in the CCW is set.
  • Program check[30] indicates one of the following errors
    • Nonzero bits where zeros are required
    • An invalid data or CCW address
    • The CAW or a TIC refers to a TIC
  • Protection check[31] indicates that the protection key in the CAW is non-zero and does not match the storage protection key.
  • Channel data check[32] indicates a parity error during a data transfer.
  • Channel control check[32] indicates a channel malfunction other thanChannel data check orInterface control check.
  • Interface control check[32] indicates an invalid signal in the channel to control unit interface.
  • Chaining check[32] indicates lost data during data chaining.

Unit status

[edit]

These conditions are presented to the channel by the control unit or device.[33] In some cases they are handled by the channel and in other cases they are indicated in theCSW. There is no distinction between conditions detected by the control unit and conditions detected by the device.

  • Attention[34] indicates an unusual condition not associated with an ongoing channel program. It often indicates some sort of operator action like requesting input, in which case the CPU would respond by issuing a read-type command, most often a sense command (04h) from which additional information could be deduced. Attention is a special condition, and requires specific operating system support, and for which the operating system has a special attention table[n] with a necessarily limited number of entries.
  • Status modifier[35] (SM) indicates one of three unusual conditions
    • A Test I/O instruction was issued to a device that does not support it.
    • ABusy status refers to the control unit rather than to the device.
    • A device has detected a condition that requires skipping a CCW. A CCW with a command for which Status Modifier is possible will normally specify command chaining, in which case the SM is processed by the channel and does not cause an interruption.
A typical channel program where SM occurs is
    ...    Search Id Equal    TIC           *-8    Read Data
where the TIC causes the channel to refetch the search until the device indicates a successful search by raising SM.
  • Control unit end[36] indicates that a previous control unit busy status has been cleared.
  • Busy[37] indicates that a device (SM=0) or a control unit (SM=1) is busy.
  • Channel end[38] indicates that the device has completed the data transfer for a channel command. There may also be anIncorrect length indication if the Count field of the CCW is exhausted, depending on the value of theSuppress-Length-Indication bit.
  • Device end[38] indicates that the device has completed an operation and is ready to accept another. DE may be signalled concurrently withCE or may be delayed.
  • Unit check[39] indicates that the device or control unit has detected an unusual condition and that details may be obtained by issuing a Sense command.
  • Unit exception[40] indicates that the device has detected an unusual condition, e.g., end of file.

Channel Address Word

[edit]

The fullwordChannel Address Word[2]: 99  (CAW) contains a 4-bit storage protection key and a 24-bit address of the channel program to be started.

Channel Command Word

[edit]

AChannel Command Word is a doubleword containing the following:

CCW Command codes

[edit]

The low order 2 or 4 bits determine the six types of operations that the channel performs;.[2]: 100, 105  The encoding is

CCW Command codes
bitsCommand
**** 0000Invalid in a CCW, simulated by the processor's Test I/O (TIO) instruction
MMMM 0100Sense[44]
**** 1000Transfer in Channel (TIC)[45]
MMMM 1100Read Backward[46]
MMMM MM01Write[47]
MMMM MM10Read[47]
MMMM MM11Control[44]

The meaning of the high order six or four bits, the modifier bits,M in the table above, depends upon the type of I/O device attached, see e.g.,DASDCKD CCWs. All eight bits are sent to and interpreted in the associated control unit (or its functional equivalent).

Control is used to cause a state change in a device or control unit, often associated with mechanical motion, e.g., rewind, seek.

Sense is used to read data describing the status of the device. The most important case is that when a command terminates with unit check, the specific cause can only be determined by doing a Sense and examining the data returned. A Sense command with the modifier bits all zero is always valid.

A noteworthy deviation from the architecture is that DASD use Sense command codes for Reserve and Release, instead of using Control.

CCW flags

[edit]

The flags in a CCW affect how it executes and terminates.

CCW flags
bitflageffect
32CDChain-DataContinue operation using the storage area defined by the next CCW.[48]
33CCChain-CommandContinue with the Command in the next CCW.[49]
34SLI[o]Suppress-Length-IndicationContinue channel program after count mis-match.[50]
35SKIPSkipDo not read from or write into storage.[51]
36PCIProgram-Controlled-InterruptionRequest interruption when fetching CCW.[52]

Channel Status Word

[edit]

TheChannel Status Word (CSW)[2]: 113–121  provides data associated with an I/O interruption.

CSW format
bitsfield
0-3Key[53]
4-70000
8-31Command Address[53]
32-47Status[54]
32-39
Unit Status Conditions[33]
Detected by the device or control unit
32
Attention[34]
33
Status modifier[35]
34
Control unit end[36]
35
Busy[37]
36
Channel end[38]
37
Device end[38]
38
Unit check[39]
39
Unit exception[40]
40-47
Channel Status Conditions[28]
Detected by the channel.
40
Program-controlled interruption[29]
41
Incorrect length[30]
42
Program check[30]
43
Protection check[31]
44
Channel data check[32]
45
Channel control check[32]
46
Interface control check[32]
47
Chaining check[32]
48-63Count[55]
  • TheProtection Key field contains the protect key from the CAW at the time that the I/O operation was initiated for I/O complete or PCI interruptions.[53]
  • TheCommand Address field contains the address+8 of the last CCW fetched for an I/O complete or PCI interruption. However, there are 9 exceptions[53]
  • TheStatus field contains one byte ofChannel status bits, indicating conditions detected by the channel[28] and one byte ofUnit status bits, indicating conditions detected by the I/O unit[33] There is no distinction between conditions detected by the control unit and conditions detected by the device.
  • TheResidual Count is a half word that gives the number of bytes in the area described by the CCW that have not been transferred to or from the channel[55] The difference between the count in the CCW and the residual count gives the number of bytes transferred.

I/O instructions

[edit]

The S/360 has four[56] I/O instructions: Start I/O (SIO), Test I/O (TIO), Halt I/O (HIO) and Test Channel (TCH). All four are privileged and thus will cause a privileged operation program interruption if used in problem state. The B1 (base) and D1 (displacement) fields are used to calculate the cuu (channel and device number); bits 8-15 of the instructions are unused and should be zero for compatibility with the S/370.

Start I/O (SIO)

[edit]

SIO[57] attempts to start the channel program pointed to by theCAW, using the storage protection key in the CAW.

Test I/O (TIO)

[edit]

TIO[58] tests the status of a channel and device. It may also store aCSW, in which case it completes with condition code 1.

Halt I/O (HIO)

[edit]

HIO[59] attempt to terminate an active channel program. It may also store aCSW, in which case it completes with condition code 1.

Test Channel (TCH)

[edit]

TCH[60] tests the status of a channel. It does not affect the status of an active channel program and does not store aCSW,

Operator controls

[edit]
operator controls

The architecture of System/360 specified the existence of several common functions, but did not specify their means of implementation. This allowed IBM to use different physical means, e.g., dial, keyboard, pushbutton, roller, image or text on a CRT, for selecting the functions and values on different processors. Any reference tokey orswitch should be read as applying to, e.g., a light-pen selection, an equivalent keyboard sequence.

  • System Reset sends a reset signal on every I/O channel and clears the processor state; all pending interruptions are cancelled. System Reset is not guaranteed to correct parity errors in general registers, floating point registers or storage. System Reset does not reset the state of shared I/O devices.
  • Initial Program Load (IPL)[61] is a process for loading a program when there isn't a loader available in storage, usually because the machine was just powered on or to load an alternative operating system.[2]: 123  This process is sometimes known asBooting.
As part of the IPL facility the operator has a means of specifying a 12-bit[c] device address, typically with three dials as shown in the operator controls drawing. When the operator[p] selects theLoad function, the system performs aSystem Reset, sends a Read IPL[q] channel command to the selected device in order to read 24 bytes into locations 0-23 and causes the channel to begin fetchingCCWs at location 8; the effect is as if the channel had fetched a CCW from location 0 with a length of 24, an address of 0 and the flags containing Command Chaining + Suppress Length Indication. At the completion of the operation, the system stores the I/O address in the halfword at location 2 and loads the PSW from location 0.
Initial program loading is typically done from a tape, a card reader, or a disk drive. Generally, the operating system was loaded from a disk drive; IPL from tape or cards was used only for diagnostics or for installing an operating system on a new computer.
  • Emergency pull switch[62] (Emergency power off, EPO) sends an EPO signal to every I/O channel, then turns off power to the processor complex. Because EPO bypasses the normal sequencing of power down, damage can result, and the EPO control has a mechanical latch to ensure that a customer engineer inspects the equipment before attempting to power it back on.
  • Power on[62] powers up all components of the processor complex and performs a system reset.
  • Power off[62] initiates an orderly power-off sequence. Although the contents of storage are preserved, the associated storage keys may be lost.
  • TheInterrupt key[62] causes anexternal interruption with bit 25 set in the External Old PSW.
  • TheWait light[62] indicates that thePSW has bit 14 (wait) set; the processor is temporarily halted but resumes operation when an interruption condition occurs.
  • TheManual light[62] indicates that the CPU is in a stopped state.
  • TheSystem light[62] indicates that a meter is running, either due to CPU activity or due to I/O channel activity.
  • TheTest light[62] indicates that certain operator controls are active, when certain facilities, e.g., INSTRUCTION STEP, have been used by a Diagnose instruction or when abnormal thermal conditions exist. The details are model dependent.
  • TheLoad light[62] is turned on by IPL and external start. It is turned off by loading the PSW from location 0 at the completion of the load process.
  • TheLoad unit[63] controls provide the rightmost 11[r] bits of the device from which to perform an IPL.
  • TheLoad Key[64] starts theIPL sequence.
  • ThePrefix Select Key Switch[64] selects whetherIPL will use the primary prefix or the alternative prefix.
  • TheSystem-Reset Key[64] initiates aSystem Reset.
  • TheStop Key[64] puts the CPU in a stopped state; channel programs continue running and interruption conditions remain pending.
  • TheRate Switch[64] determines the mode in which the processor fetches instructions. Two modes are defined by the architecture:
    • PROCESS
    • INSTRUCTION STEP
  • TheStart Key[64] initiates instruction fetching in accordance with the setting of theRate Switch.
  • TheStorage-Select Switch[65] determines the type of resource accessed by theStore Key andDisplay Key. Three selections are defined by the architecture:
    • Main storage
    • General registers
    • Floating-point registers
  • TheAddress Switches[65] specify the address or register number for theStore Key,Display Key and, on some models, theSet IC Key..
  • TheData Switches[65] specify the data for theStore Key and, on some models, theSet IC Key.
  • TheStore Key[65] stores the value in theData Switches as specified by theStorage-Select Switch and theAddress Switches.
  • TheDisplay Key[65] displays the value specified by theStorage-Select Switch and theAddress Switches.
  • TheSet IC=[65] sets the instruction address portion of the PSW from theData Switches or theAddress Switches, depending on the model.
  • TheAddress-Compare Switches[65] select the mode of comparison and what is compared. Stop on instruction address compare is present on all models, but stop on data address compare is only present on some models.
  • TheAlternate-Prefix Light[65] is on when the prefix trigger is in the alternate state.

Optional features

[edit]

Byte-aligned operands

[edit]

On some models, e.g., theS/360-85,[9] the alignment requirements for some problem-state instructions were relaxed. There is no mechanism to turn off this feature, and programs depending on receiving a program check type 6 (alignment) on those instructions must be modified.

Decimal arithmetic

[edit]

The decimal arithmetic feature provides instructions that operate on packed decimal data. A packed decimal number has 1-31 decimal digits followed by a 4-bit sign. All of the decimal arithmetic instructions except PACK and UNPACK generate a Data exception if a digit is not in the range 0-9 or a sign is not in the range A-F.

Direct Control

[edit]

TheDirect Control[66] feature provides six external signal lines and an 8-bit data path to/from storage.[67]

Floating-point arithmetic

[edit]

The floating-point arithmetic feature provides 4 64-bit floating point registers and instructions to operate on 32 and 64 bit hexadecimal floating point numbers. The 360/85 and 360/195 also support 128 bit extended precision floating point numbers.

Interval timer

[edit]

If the interval timer feature[2]: 17.1  is installed, the processor decrements the word at location 80 ('50'X) at regular intervals; the architecture does not specify the interval but does require that value subtracted make it appear as though 1 were subtracted from bit 23 300 times per second. The smaller models decremented at the same frequency (50 Hz or 60 Hz) as the AC power supply, but larger models had a high resolution timer feature. The processor causes an External interruption when the timer goes to zero.

Multi-system operation

[edit]

Multi-system operation[68] is a set of features to support multi-processor systems, e.g.,Direct Control, direct address relocation (prefixing).

Storage protection

[edit]

If the storage protection feature[2]: 17-17.1  is installed, then there is a 4-bit storage key associated with every 2,048-byte block of storage and that key is checked when storing into any address in that block by either a CPU or an I/O channel. A CPU or channel key of 0 disables the check; a nonzero CPU or channel key allows data to be stored only in a block with the matching key.

Storage Protection was used to prevent a defective application from writing over storage belonging to the operating system or another application. This permitted testing to be performed along with production. Because the key was only four bits in length, the maximum number of different applications that could be run simultaneously was 15.

An additional option available on some models was fetch protection. It allowed the operating system to specify that blocks were protected from fetching as well as from storing.

Deviations and extensions

[edit]

TheSystem/360 Model 20 is radically different and should not be considered to be a S/360.

TheSystem/360 Model 44 is missing certain instructions, but a feature allowed the missing instructions to be simulated in hidden memory thus allowing the use of standard S/360 operating systems and applications.

Some models have features that extended the architecture, e.g., emulation instructions, paging, and some models make minor deviations from the architecture. Examples include:

  • The multisystem feature on the S/360-65 which modifies the behavior of the direct control feature and of the Set System Mask (SSM) instruction.[21]
  • TheSystem/360 Model 67-2 had similar, but incompatible, changes.[11]

Some deviations served as prototypes for features of theS/370 architecture.

See also

[edit]

Notes

[edit]
  1. ^Twice the size of the later System/370
  2. ^A specification of general register 0 yield a base address of zero rather than the register content.
  3. ^abcOn a processor that complies with the S/360 architecture, the highest channel number is 6. Eleven bits are sufficient to identify the cuu, and seven bits are sufficient to provide masking of I/O interruptions. However, on a 360/67-2 with two 2846 channel controllers, channels are numbered 0-6 and 8-14;[11]: 15  similarly, the 360/195 had an extended channel feature[10]: 21  but numbered the channels 0 through 13.[10]: 25  I/O interruptions for Channel Controller 1 on the 360/67-2 were masked using control registers, and the 360/195 used bit 7 (Channel 6) of the System Mask as a summary mask bit for channels 6 and up.Interruptions from More than Seven Channels[12] describes the summary masking for additional channels, but other text in Principles of Operation still refers to a limit of 7 channels. Standard software supported channels 0-F.
  4. ^Because the design of the S/360 occurred simultaneously with the development of ASCII, IBM's ASCII support did not match the standard that was ultimately adopted.
  5. ^The S/360 literature does not use the terms fault ortrap
  6. ^abOn the 360/91,[20]: 15  360/95 and 360/195[10]: 14  a Program interruption may occur for multiple imprecise exceptions. The ILC in the Program Old PSW is 0, bits 26-31 are 0 and bits 16-27 are a mask indicating which exceptions occurred; there is no provision for reporting multiple occurrences of the same exception. Reporting of multiple imprecise exceptions is not part of the S/360 architecture.
  7. ^abcdThere are 17 possible exceptions on the 360/67,[11]: 17  but page exception and segment exception are not part of the S/360 architecture; similarly, interruption code 18 ('0012'X) on a 360/65 multiprocessor is not part of the S/360 architecture.
  8. ^The Specification bit is not used for imprecise interruptions on the 360/195
  9. ^abNot Used on 360/91
  10. ^A PSW key of 0 matches any storage key.
  11. ^Even though a timer expiration is an internal event, it causes an External interruption and for this reason, this interruption is usually referred to as a timer/external interruption.
  12. ^Because of the limits on the channel number, S/360 and early S/370 software only used 12 bits to store device addresses.
  13. ^But continuing with unrelated work.
  14. ^The OS uses the attention index in aUnit Control Block (UCB) as an index into the attention table.
  15. ^Also known as Suppress Incorrect Length Indication (SILI)
  16. ^Or an equivalent automated facility.
  17. ^Read with all modifier bits zero
  18. ^There is an inconsistency, in thatInterruptions from More than Seven Channels[12] allows for more channels.

References

[edit]
S360
IBM System/360 Principles of Operation. Systems Reference Library (Eighth ed.). IBM. September 1968. A22-6821-7.
  1. ^IBM (1964),IBM System/360 Principles of Operation(PDF), First Edition, A22-6821-0
  2. ^abcdefghijkIBM (September 1968),IBM System/360 Principles of Operation(PDF), Eighth Edition, A22-6821-7 Revised byIBM (May 12, 1970),ibid., GN22-0354 andIBM (June 8, 1970),ibid., GN22-0361
  3. ^abIBM,IBM System/360 I/O Interface Channel to Control Unit Original Equipment Manufacturers' Information(PDF), Fifth Edition, A22-6843-3
  4. ^S360, p. 15,Program Status Word.
  5. ^S360, pp. 15 –&#32, 16,Interruption.
  6. ^S360, p. 77,Interruptions.
  7. ^IBM Corporation (1974).IBM System/360 System Summary(PDF). p. 3-3. RetrievedJuly 16, 2017.
  8. ^Reference Manual UNIVAC III Data Processing System(PDF), Sperry Rand Corporation, 1962, UT-2488
  9. ^abcIBM (June 1968),IBM System/360 Model 85 Functional Characteristics(PDF), SECOND EDITION, A22-6916-1
  10. ^abcdeIBM (August 1970),IBM System/360 Model 195 Functional Characteristics(PDF), Second Edition, GA22-6943-1
  11. ^abcdefIBM (February 1972),IBM System/360 Model 67 Functional Characteristics(PDF), Third Edition, GA27-2719-2
  12. ^abPoOps, p. 121.4.
  13. ^abPoOps, p. 71.
  14. ^PoOps, p. 77.
  15. ^abPoOps, pp. 78–79.
  16. ^PoOps, pp. 79–80.1.
  17. ^abPoOps, pp. 80.1–81.
  18. ^PoOps, pp. 81–82.
  19. ^abPoOps, pp. 82–83.
  20. ^abIBM (1968-03-18),IBM System/360 Model 91 Functional Characteristics(PDF), Third Edition, A22-6907-2
  21. ^abcdeIBM (September 1968), "Appendix A. Multiprocessing System",IBM System/360 Model 65 Functional Characteristics(PDF), Fourth Edition, pp. 30–34, A22-6884-3
  22. ^abcdefghPoOps, p. 79.
  23. ^abPoOps, pp. 79–80.
  24. ^abcdefghijklmnopqrPoOps, p. 80.
  25. ^abPoOps, p. 80.1.
  26. ^PoOps, p. 81.
  27. ^I/O Channel Interface(PDF) (Report).National Technical Information Service. July 29, 1983. FIPS PUB 60-2. RetrievedMay 18, 2023.
  28. ^abcPoOps, pp. 116–118.
  29. ^abPoOps, pp. 116–117.
  30. ^abcdPoOps, p. 117.
  31. ^abPoOps, pp. 117–118.
  32. ^abcdefghPoOps, p. 118.
  33. ^abcPoOps, pp. 113–116.
  34. ^abPoOps, p. 113.
  35. ^abPoOps, pp. 113–114.
  36. ^abPoOps, p. 114.
  37. ^abPoOps, pp. 114–115.
  38. ^abcdPoOps, p. 115.
  39. ^abPoOps, pp. 115–116.
  40. ^abPoOps, p. 116.
  41. ^PoOps, p. 100.
  42. ^abPoOps, pp. 100–101.
  43. ^PoOps, pp. 99–100, 101–105.
  44. ^abPoOps, pp. 106–107.
  45. ^PoOps, pp. 107–108.
  46. ^PoOps, pp. 105–106.
  47. ^abPoOps, p. 105.
  48. ^PoOps, pp. 101–103.
  49. ^PoOps, pp. 101, 103.
  50. ^PoOps, pp. 99–100.
  51. ^PoOps, pp. 103–104.
  52. ^PoOps, pp. 104–105.
  53. ^abcdPoOps, p. 119.
  54. ^PoOps, pp. 113–118.
  55. ^abPoOps, p. 120.
  56. ^S360, pp. 93–98,Control of Input/Output Devices.
  57. ^S360, pp. 94–95,Start I/O.
  58. ^S360, pp. 95–96,Test I/O.
  59. ^S360, pp. 96–98,Halt I/O.
  60. ^S360, p. 98,Test Channel.
  61. ^PoOps, p. 123.
  62. ^abcdefghiPoOps, p. 124.
  63. ^PoOps, pp. 124–125.
  64. ^abcdefPoOps, p. 125.
  65. ^abcdefghPoOps, p. 126.
  66. ^PoOps, p. 17.1.
  67. ^IBM,IBM System/360 Direct Control and External Interrupt Features Original Equipment Manufacturers' Information(PDF), Third Edition, A22-6845-2
  68. ^PoOps, pp. 17.1–18.

Further reading

[edit]

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=IBM_System/360_architecture&oldid=1302778431"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp