Computer Systems - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Computer Systems

Description:

The OS is running in the supervisor mode; User's program is running ... 2) save the contents of the PC on the stack. 3) save the state of the CPU on the stack. ... – PowerPoint PPT presentation

Number of Views:6
Avg rating:3.0/5.0
Slides: 12
Provided by: roch
Category:

less

Transcript and Presenter's Notes

Title: Computer Systems


1
Computer Systems
  • Exceptions and Interrupts

2
Exceptions
  • The CPU operates in one of two states user or
    supervisor.
  • The OS is running in the supervisor mode Users
    program is running in the user mode.
  • Each state has different stack pointer SSP and
    USP.

3
State Transition Diagram
  • Exceptions are calls to the operating system.

4
Exception Table
  • There are different types of exception.
  • Each type of exception has its exception
    handler.
  • Exception handler is a program, the program is
    part of operating system.
  • An exception vector table contains the address
    of all exception handlers.
  • When there is an exception from the user
    program, the CPU is forced to operate in its
    supervisor mode.
  • Based on the type of exception, the OS finds out
    the address of exception handler from the table.

5
Interrupts and Exception
  • Interrupt is a specific instance of the
    exception.
  • When an interrupt occurs, the CPU decides
    whether to service it. The time between the CPU
    receiving an interrupt and time at which it
    responds is the interrupt latency.

6
Instruction Cycle with Interrupts
7
Simple InterruptProcessing
8
Interrupts and Exception
  • Nonmaskable interrupts This interrupt can not
    be deferred and must be served. (e.g. power off)
  • Prioritized interrupts Each interrupt has a
    predefined priority, a new interrupt with lower
    priority can not interrupt the current interrupt
    handling.
  • Vectored Interrupts After the I/O receives IACK
    from the CPU, it can identify itself by providing
    CPU with location of interrupt handling routine.

9
Multiple Interrupts - Sequential
10
Multiple Interrupts - Nested
11
68000 Familys Exceptions
  • Hardware (External)
  • Interrupts
  • Bus error
  • Reset
  • Software (Internal)
  • Trace 
  • Errors
  • illegal instructions
  • address error 
  • privilege violation 
  • divide by zero 
  • Programmer initiated
Write a Comment
User Comments (0)
About PowerShow.com