Interrupts and Traps

Interrupts

Interrupt - Is a signal that indicates that hardware/software needs immediate attention

they are used so that the OS can run multiple programs at once

CYCLE

  1. I/O event occurs, current program is suspended
  1. Processor switches execution to another program
  1. When I/O is complete, an interrupt for the interrupt handling routine will occur
  1. If all the conditions are met the program will resume

TYPES

REASONS

INTERRUPT CONTROLLER

DETAILED STEPS

  1. Save registers not save by interrupt hardware
  1. Setup context for new interrupt service routine
  1. Setup stack for interrupt service routine
  1. Acknowledge interrupt controller
  1. Copy registers from where they are stored to the program tabel
  1. Run interrupt service procedure to get data from the device control registers
  1. Choose which program to run next
  1. Load new process' registers
  1. Start running new process

NOTES ON: INTERRUPT SERVICE ROUTINES (ISR)

LARGE ADDRESS SPACE ISSUE

Solution

Types of interrupts

68000 modes of operation

User Mode

Supervisor Mode

Software Interrupts - Traps

Exceptions

Exception is ether an Interrupt, fatal error or trap

Thus RTE (return from exception) rather than RTI

Occur For Errors

Exception Vector Table

Occur For Traps

Interrupt masking

This is were interrupts with a higher priority cannot be interrupted by a interrupt with a lower priority