CS501 Advanced Computer Architecture

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
Basic Input/Output Operations
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
System Calls 1.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
Chapter 2: Computer-System Structures
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
6-1 Infineon 167 Interrupts The C167CS provides 56 separate interrupt sources that may be assigned to 16 priority levels. The C167CS uses a vectored interrupt.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer System Structures Interrupts
Signal Name Direction w.r.t. Printer Function Summary Pin# (25-DB) CPU
An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Interrupts and signals
Microprocessor and Assembly Language
Microprocessor Systems Design I
Protection of System Resources
The deadline establish a priority among interrupt requests.
Computer Architecture
Interrupts In 8085 and 8086.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer Architecture
The slides must be understood in Lecture 5
Computer System Overview
Interrupts Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process.
Lecture 18 Interrupt 동국대학교 홍유표.
Computer-System Architecture
Module 2: Computer-System Structures
Direct Memory Access Disk and Network transfers: awkward timing:
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Computer Organization
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Interrupts and Exception Handling
Operating Systems Lecture 3.
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
Module 2: Computer-System Structures
CNET 315 Microprocessor & Assembly Language
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Computer System Overview
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
COMP3221: Microprocessors and Embedded Systems
Module 2: Computer-System Structures
Chapter 13: I/O Systems.
Interrupts and Exception Handling
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

CS501 Advanced Computer Architecture Lecture 27 Dr.Noor Muhammad Sheikh

Review

Programmed I/O Driver for 32 character Input Devices

Assumptions Device driver can handle input from 32 different character input devices, at once. Each input device has its own data and control registers. The control register has a Ready status bit in position 31 The data register can only be read and returns the character in bits 7..0.

Continued The data and control register’s address begins at address FFFFF300H. Thus the 32 devices occupy word address from FFFF300H to FFFFF3FCH. The device driver will input and store a line of characters from each device. Each line determinated by a carriage return. The driver is capable of handling input from all 32 devices by polling.

Continued “Polling is a process by which the device driver tests each device in some predetermine order of priority, to see if it has a character ready.”

Continued Input from each device is controlled by 2 words The first contain a pointer into a buffer. The second is Done flag. If Done flag is 0 then the device is actively receiving characters. If Done flag is -1, the device will be inactive.

Fig. 8.10 (jordan)

Interrupt Driven I/O

Program Flow Program Flow Key Board Interrupt Serial Port Interrupt

Types of Interrupts

Interrupt Service routine

Continued Software interrupts are usually associated with the software. A simple output operation in a multitasking system requires software interrupts to be generated. Output is usually handled by interrupts so that it appears interactive and asynchronous. Notification of other events, such as expiry of a software timer is also handled by software interrupts.

Software interrupts are also used with system calls. When the operating system switches from user mod e to supervisor mode it does so through software interrupts. Consider an example where a user program must delete a file. The user program will be executing in the user mode When it makes the specific system call to delete the file, a software interrupt will be generated.

This will cause the processor to halt its current activity and switch to supervisor mode. Once in supervisor mode, the operating system will delete the file and then control will return to the user program. In supervisor mode the operating system would decide if it could delete the specified file with out harmful. It is important that the system switch to super visor mode at each system call.

It is a routine which is executed when an interrupt occurs. Also known as Interrupt Service Routine (ISR) Deals with low-level events in the hardware of a computer system like a tick of a real-time clock.

An interrupt once generated must be serviced through an interrupt service routine. These routines are stored in the system memory ready for execution. Once the interrupt is generated, the processor must branch to the location of the appropriate service routine to execute it.

Vectored and Non Vectored Interrupts

The branch address of the interrupt service routine is fixed. The code for the ISR is loaded at fixed memory location. Very easy to implement and not flexible at all.

The number of peripheral devices is fixed and may not be increased. Once the interrupt is generated the processor queries each device. The processor does this to find out which device generated the interrup.

Vectored Interrupt

Vector Interrupt Used to specify the address of the interrupt service routine. The ode for ISR can be loaded anywhere in the memory. This approach is much more flexible. Using vectored interrupts, multiple devices may share the same interrupt input line. A process called daisy chaining is then used to locate the interrupting device.

Interrupt vector is a fixed size structure that stores the address of the first instruction of the ISR.

All of the interrupt vectors are stored in the memory in this table. Interrupt Vector Table is loaded at the memory location 0 for the 8086/8088.

Interrupts in 8086/8088 are vector interrupts. Interrupt vector is of 4 bytes to store IP and CS. Interrupt vector table is loaded at address 0 of main memory. There is provision of 256 interrupts.

The number of interrupt is the number of interrupt vector in the interrupt vector table. Since size of each vector is 4 bytes. Interrupt vector starts from address 0. The address of interrupt vector can be calculated by simply multiplying the number by 4.

Interrupt Handling

Interrupt Latency

Summary

User Level I\O Software Device-Independent Operating System Software Device Drivers Interrupts Handlers hardware

(Most Significant Byte) In 8086/8080 machines the size of interrupt vector is 4bytes that holds IP and CS of ISR. Code Segment (Most Significant Byte) (Least Significant Byte) Instruction Pointer (Most significant Byte) a +3 a +2 a +1 a