Interrupts, Buses Chapter 6.2.5, 8.2-8.3. Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal.

Slides:



Advertisements
Similar presentations
Computer Architecture and Organization
Advertisements

Chapter 7: System Buses Dr Mohamed Menacer Taibah University
Digital Computer Fundamentals
Chapter 6 Computer Architecture
CSCI 4717/5717 Computer Architecture
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
TCSS 372A Computer Architecture. Getting Started Get acquainted (take pictures) Discuss purpose, scope, and expectations of the course Discuss personal.
TK 2123 COMPUTER ORGANISATION & ARCHITECTURE
Chapter 3 System Buses.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
TECH CH03 System Buses Computer Components Computer Function
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
Computer Organization and Assembly language
CSS Lecture 2 Chapter 3 – Connecting Computer Components with Buses Bus Structures Synchronous, Asynchronous Typical Bus Signals Two level, Tri-state,
CS-334: Computer Architecture
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
THE COMPUTER SYSTEM. Lecture Objectives Computer functions – Instruction fetch & execute – Interrupt Handling – I/O functions Interconnections Computer.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Top Level View of Computer Function and Interconnection.
System bus.
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
2 nd Year - 1 st Semester Asst. Lect. Mohammed Salim Computer Architecture I 1.
COMPUTER ORGANIZATIONS CSNB123. COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
EEE440 Computer Architecture
System Buses. Program Concept Hardwired systems are inflexible Hardwired systems are inflexible General purpose hardware can do different tasks, given.
Review Question (last week) 1.With the aid of diagrams, explain the significant difference between Von Neumann and Harvard Architecture. 1.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
By Fernan Naderzad.  Today we’ll go over: Von Neumann Architecture, Hardware and Software Approaches, Computer Functions, Interrupts, and Buses.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Group 1 chapter 3 Alex Francisco Mario Palomino Mohammed Ur-Rehman Maria Lopez.
Explanation Interrupts System Interconnections. Interrupts A computer system must provide a method for allowing mechanisms to interrupt the normal processing.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Computer Architecture. Top level of Computer A top level of computer consists of CPU, memory, an I/O components, with one or more modules of each type.
Chapter 2: Computer Function And Interconnection
CHAPTER 4 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Chapter 3 Top Level View of Computer Function and Interconnection
Computer Organization and Architecture William Stallings 8th Edition
Computer System Overview
William Stallings Computer Organization and Architecture 8th Edition
ECEG-3202 Computer Architecture and Organization
BIC 10503: COMPUTER ARCHITECTURE
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Chapter 3 System Buses.
William Stallings Computer Organization and Architecture 7th Edition
William Stallings Computer Organization and Architecture
Presentation transcript:

Interrupts, Buses Chapter 6.2.5,

Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal sequence of processing Four general classes of interrupts –Terms: Traps when initiated by system, Interrupt when initiated by programmer –Program - e.g. overflow, division by zero –Timer, internal timer, used in pre-emptive multi-tasking –I/O - from I/O controller –Hardware failure, e.g. memory parity error Particularly useful when one module is much slower than another, e.g. disk access (milliseconds) vs. CPU (microseconds or faster)

Interrupt Examples 4 = code for pre-write, 5 = code for post-write, * = interrupt

Interrupt Cycle Added to instruction cycle Processor checks for interrupt –Indicated by an interrupt signal If no interrupt, fetch next instruction If interrupt pending: –Suspend execution of current program –Save context (what does this mean?) –Set PC to start address of interrupt handler routine –Process interrupt, i.e. execute interrupt handler code –Restore context and continue interrupted program

Branch Table for Handlers How do we know where to go to execute the interrupt handler? Lookup in a branch table, also called the interrupt vector

Instruction Cycle (with Interrupts) - State Diagram

Multiple Interrupts Disable interrupts – Sequential Processing –Processor will ignore further interrupts whilst processing one interrupt –Interrupts remain pending and are checked after first interrupt has been processed –Interrupts handled in sequence as they occur Define priorities – Nested Processing –Low priority interrupts can be interrupted by higher priority interrupts –When higher priority interrupt has been processed, processor returns to previous interrupt

Multiple Interrupts - Sequential Disabled Interrupts – Nice and Simple

Multiple Interrupts - Nested How to handle state with an arbitrary number of interrupts?

Sample Time Sequence of Multiple Interrupts User ProgramPrinter ISR Comm ISR Disk ISR t=10 t=40 t=15 t=25 t=35 t=0 Priority 2 Priority 5 Priority 4 Disk can’t interrupt higher priority Comm Note: Often low numbers are higher priority

Buses There are a number of possible interconnection systems. The most common structure is the bus Single and multiple BUS structures are most common e.g. Control/Address/Data bus (PC)

What is a Bus? A communication pathway connecting two or more devices Usually broadcast –Everyone listens, must share the medium –Master – can read/write exclusively, only one master –Slave – everyone else. Can monitor data but not produce Often grouped –A number of channels in one bus –e.g. 32 bit data bus is 32 separate single bit channels Power lines may not be shown Three major buses: data, address, control

Bus Interconnection Scheme

Data Bus Carries data –Remember that there is no difference between “data” and “instruction” at this level Width is a key determinant of performance –8, 16, 32, 64, 128 bit –Generally we like the data bus width to match the register word size Famous non-examples include 8088, 386SX

Address bus Identify the source or destination of data –In general, the address specifies a specific memory address or a specific I/O port e.g. CPU needs to read an instruction (data) from a given location in memory Bus width determines maximum memory capacity of system –8086 has 20 bit address bus but 16 bit word size for 64k directly addressable address space –But it could address up to 1MB using a segmented memory model

Control Bus Control and timing information –Determines what modules can use the data and address lines –If a module wants to send data, it must (1) obtain permission to use the bus, and (2) transfer data – which might be a request for another module to send data We will skip how arbitration for control is performed Typical control lines –Memory read - Memory write –I/O read- I/O write –Interrupt request- Interrupt ACK –Bus Request- Bus Grant –Clock signals

Big and Yellow? What do buses look like? –Parallel lines on circuit boards –Ribbon cables –Strip connectors on mother boards e.g. PCI –Sets of wires Limited by physical proximity – time delays, fan out, attenuation are all factors for long buses

Single Bus Problems Lots of devices on one bus leads to: –Propagation delays Long data paths mean that co-ordination of bus use can adversely affect performance – bus skew, data arrives at slightly different times If aggregate data transfer approaches bus capacity. Could increase bus width, but expensive –Device speed Bus can’t transmit data faster than the slowest device Slowest device may determine bus speed! –Consider a high-speed network module and a slow serial port on the same bus; must run at slow serial port speed so it can process data directed for it –Power problems Most systems use multiple buses to overcome these problems

Traditional (ISA) with cache Buffers data transfers between system, expansion bus This approach breaks down as I/O devices need higher performance

High Performance Bus – Mezzanine Architecture Addresses higher speed I/O devices by moving up in the hierarchy

Direct Memory Access Tying together buses with interrupts!