IO Interrupts - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

IO Interrupts

Description:

3. Handle the ending of the I/O device operation ... When the I/O routine ends, another branch is made back to the job routine. ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 17
Provided by: csW6
Category:

less

Transcript and Presenter's Notes

Title: IO Interrupts


1
I/O Interrupts
  • Thomas Roth

2
What is I/O inpterrupt
  • I/O interrupts are the way the computer is forced
    branched to the required subroutine
  • Subroutines are require to
  • 1.Transfer a data word between an I/O device and
    main storage (read/write operations)
  • 2. Checks conditions related to the I/O device
  • 3. Handle the ending of the I/O device operation

3
How I/O interrupts are used in routine
instructions
  • The diagram above is an example of a job program
    routine
  • The branch from job routine to I/O routine occurs
    at point A

4
I/O interrupts in routine instruction (continue)
  • Branching occurs because the program is at a
    point that the I/O operation is required.
  • E.G. the reading of a card in the card reader
  • When the I/O routine ends, another branch is made
    back to the job routine .
  • I/O routine and job routine dont overlap due to
    the CPU executing only one instruction at a time.
  • Also , when the I/O device operation is started,
    it continues as the program-instruction
    execution takes place in the CPU.

5
Interrupted Action
  • When the I/O device operation starts, and then
    moved far enough to be read, then it give a
    signal to the CPU ( which is a interrupt
    request).
  • But also the interrupt doesnt occur until after
    the current instruction has been completed.
  • Thus a forced branch occurs to an
    interrupt-handling subroutine (more on interrupt
    subroutine in later slide/s).

6
A example of a interrupted action
7
Interrupted action (continue)
  • In order to return back to the program routine in
    progress (before the interrupt happened), an
    program-controlled branch is created.
  • This type of branch is NOT forced by the CPU.

8
Program-controlled branch
  • In a program-controlled branch to an I/O routine,
    a program has address information for the
    branch-to location and (if needed) the return
    address.
  • A CPU-forced branch must properly branch to the
    proper subroutine and return, through another
    branch, to the interrupted program at the end of
    the subroutine.
  • At the time of the actual interrupt, the next
    instructions address is in the
    instruction-address register.

9
Interrupt Subroutine
  • The first word of the interrupt-subroutine
    location stores the next instruction at the time
    of the interrupt that a CPU-enforced branch is
    executed.
  • This branch is also a branch-and-store-IAR
    instruction

10
format of a branch-and-store-IAR instruction
11
Interrupt Subroutine (continue)
  • The contents of the instruction are kept in the
    first word location of the interrupt subroutine
    until necessary to branch back to the interrupted
    program, which is when the interrupt is handled.
  • Also, when the program is originally loaded into
    the system, the subroutine addresses are stored
    into the interrupt vectors.

12
Saving Data used by The Interrupted Program
  • Before machine registers and certain index are
    used for data manipulation within the subroutine,
    the interrupt subroutine must save their
    contents, but only the ones being used by the
    interrupt subroutine.
  • This must be maintained because the interrupted
    program may use the same registers.
  • At the end, the affected registers contents are
    loaded back into the core storages registers.

13
Causes of interrupts
  • To determine what I/O device is causing a
    interrupt, examine the interrupt-level staus
    word, if necessary.
  • After the device that is causing the interrupt is
    found, the device-status word is examined the
    condition in the device that cause the interrupt
    to happened.

14
Causes of interrupts ( continue)
  • The program must determine which operation
    occurs.
  • When the subroutine determines whether the
    interrupt is for a read or punch (by addressing a
    sense-device I/O control command) either one of
    two actions happen
  • 1. For read response, a execute I/O instruction
    addresses a read I/O control command that moves
    the data word from the 1442 to core storage.
  • 2. For punch response, a execute I/O instruction
    addresses a write I/O control command that moves
    the data word from the core storage to the 1442
    punch.

15
Causes of interrupts part 3
  • After the end of the level-0 interrupt
    subroutine, saved contents of registers are
    loaded from core storage back into registers, and
    a branch is made back to the interrupted program.
  • The interrupted-level stats words defined for
    interrupt levels 1, 2, 3, 4, and 5.
  • After the words are loaded into the accumulator,
    the device causing the interrupt can be determine
    by the contents of the word.
  • After the device causing the interrupt is
    determined, to determine the condition within the
    device that caused the interrupt, a
    sense-device-status command can be executed.

16
Sources
  • Diagrams and facts are used from the following
    places
  • http//www.ibm1130.net/functional/IOInterrupts.htm
    l
Write a Comment
User Comments (0)
About PowerShow.com