510 likes | 723 Views
17. Traditional IBM Mainframe Operating Principles. Fig. 17.1: The memory hierarchy. Addressing Memory. Absolute addresses counting bytes hardware Relative addresses base plus displacement software At load time, base address stored in base register.
E N D
17 Traditional IBM Mainframe Operating Principles
Addressing Memory • Absolute addresses • counting bytes • hardware • Relative addresses • base plus displacement • software • At load time, base address stored in base register
Executing Instructions • Find instruction address in PSW • Fetch instruction stored at that address • Increment instruction address • Translate instruction’s operands • Execute instruction
Other PSW Fields • Condition code • key to decision logic • set by comparison and arithmetic instructions • Memory protection • 4-bit protection key • associated with each block of memory • access to wrong key causes interrupt
Fig. 17.7: The channel’s processor looks to the CAW to find the first CCW.
Fig. 17.9a: The program calls the access method. Note: Certain instructions are privileged, so a program must call the operating system to start I/O.
Fig. 17.9b: The operating system stores the address of the channel program in the CAW and starts I/O.
Fig. 17.9e: The operating system returns control to the application program.
Fig. 17.11a: The current PSW points to the application program.
Fig. 17.11b: When an interrupt occurs, the current PSW is stored in the old PSW field.
Fig. 17.11c: The new PSW is loaded into the current PSW register.
Fig. 17.11d: The first instruction in the interrupt handler routine is fetched.
Fig. 17.11e: The old PSW is loaded into the current PSW and the application program resumes processing.
Interrupt Types • External • Supervisor call • Program • Machine check • I/O • Restart
Fig. 17.18a: Following an interrupt, the link back to the program is stored in the old PSW. Two or more interrupts occurring in a brief time span can destroy the trail back to the original program.
Fig. 17.18b: The second interrupt overlays the link, thus destroying it.
Fig. 17.20: I/O interrupts are masked while an I/O interrupt is processed. External interrupts and I/O interrupts are masked when either type is being processed. Machine check interrupts are masked during the processing of a machine check interrupt.
Program States • The computer • problem state (application program) • supervisory state (operating system) • A given program • ready state • wait state
Fig. 17.22d: The interrupt handler starts the physical I/O operation.
Fig. 17.22e: The SVC interrupt handler checks the channel status word.
Fig. 17.22f: The program and the system (because there is only one program) are in a wait state.
Fig. 17.22g: Following an I/O interrupt, the I/O interrupt handler gets control.