1 load [2], [9] Transfer contents of memory location 9 to memory location 2. Illegal instruction.

Slides:



Advertisements
Similar presentations
Homework Reading Machine Projects Labs
Advertisements

Computer Architecture
System Integration and Performance
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Input and Output CS 215 Lecture #20.
Direct Memory Access Introduction to 8237
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Input-output and Communication Prof. Sin-Min Lee Department of Computer Science.
Interrupts (contd..) Multiple I/O devices may be connected to the processor and the memory via a bus. Some or all of these devices may be capable of generating.
DIRECT MEMORY ACCESS CS 147 Thursday July 5,2001 SEEMA RAI.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
© Copyright 2004 Dr. Phillip A. Laplante 1 Memory  Memory access  Memory technologies  Memory organization.
Chapter 7 Interupts DMA Channels Context Switching.
External Devices I/O Modules Programmed I/O Interrupt Driven I/O Direct Memory Access I/O Channels and Processors.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
INPUT/OUTPUT ARCHITECTURE By Truc Truong. Input Devices Keyboard Keyboard Mouse Mouse Scanner Scanner CD-Rom CD-Rom Game Controller Game Controller.
Computer Architecture Lecture 08 Fasih ur Rehman.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Advanced Higher Computing  Computer Architecture  Chapter 2.
Cis303a_chapt06_exam.ppt CIS303A: System Architecture Exam - Chapter 6 Name: __________________ Date: _______________ 1. What connects the CPU with other.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Input and Output Computer Organization and Assembly Language: Module 9.
NETW 3005 I/O Systems. Reading For this lecture, you should have read Chapter 13 (Sections 1-4, 7). NETW3005 (Operating Systems) Lecture 10 - I/O Systems2.
MICROPROCESSOR INPUT/OUTPUT
THE COMPUTER SYSTEM. Lecture Objectives Computer functions – Instruction fetch & execute – Interrupt Handling – I/O functions Interconnections Computer.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
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.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Computer Architecture System Interface Units Iolanthe II approaches Coromandel Harbour.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
Lecture 1: Review of Computer Organization
Computer Architecture System Interface Units Iolanthe II in the Bay of Islands.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
Different Microprocessors Tamanna Haque Nipa Lecturer Dept. of Computer Science Stamford University Bangladesh.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Multiple Interrupts Each interrupt line has a priority Higher priority lines can interrupt lower priority lines If bus mastering only current master can.
Lecture Overview Shift Register Buffering Direct Memory Access.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
Amdahl’s Law & I/O Control Method 1. Amdahl’s Law The overall performance of a system is a result of the interaction of all of its components. System.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Computer Architecture Chapter (7): Input / Output
Computer Organization and Architecture + Networks Lecture 6 Input/Output.
Networked Embedded Systems Pengyu Zhang & Sachin Katti EE107 Spring 2016 Lecture 11 Direct Memory Access.
The deadline establish a priority among interrupt requests.
EE 107 Fall 2017 Lecture 7 Serial Buses – I2C Direct Memory Access
Operating Systems Chapter 5: Input/Output Management
If a DRAM has 512 rows and its refresh time is 9ms, what should be the frequency of row refresh operation on the average?
Suppose that a certain program takes 200 seconds of elapsed time to execute. Out of these 200 seconds, 180 seconds is the CPU time and the rest is I/O.
Wireless Embedded Systems
Chapter 13: I/O Systems.
Presentation transcript:

1 load [2], [9] Transfer contents of memory location 9 to memory location 2. Illegal instruction

2 Review

3 CS501 Advanced Computer Architecture Lecture 31 Dr.Noor Muhammad Sheikh

4 load r1, [9] store r1, [2]

5 out [6], datap illegal instruction

6 load r1, [6] out r1, datap

7 I/O interface architecture for a DMA device Memory address Count Control DMA sequencer Bus control I/O address decode Packing, unpacking and buffering address Read, write Complete Bus request Bus grant Data Device control Device data

8 DMA Protocol 1. The CPU sets up DMA by providing device addresses, type of operation (R/W), memory addresses and the number of bytes to be transferred.

9 DMA Protocol 2. The DMA starts operation by getting control of the bus, transfers the data when available and generates next addresses until the transfer is complete.

10 DMA Protocol A number of controllers may be connected to one bus.

11 Buffer in DMA may provide flexibility to deal with delays in transfer or waiting

12 3. Once DMA transfer is complete, controller interrupts the processor which then determines if the entire operation is completed successfully and becomes the bus master DMA Protocol

13 Single-bus detached DMA CPU DMA module I/O Memory …

14 Single-bus, Integrated DMA-I/O CPU DMA module DMA module Memory I/O

15 I/O bus CPU DMA module Memory I/O … I/O bus System bus

16 DMA An I/O device transfers data at a rate of 10MB/s over a 100MB/s bus. The data is transferred in 4KB blocks. If the processor operates at 500MHz, and it takes a total of 5000 cycles to handle each DMA request, find the fraction of CPU time handling the data transfer with and without DMA

17 Solution Without DMA The processor here copies the data into memory as it is sent over the bus. Since the I/O device sends data at a rate of 10MB/s over the 100MB/s bus, 10 % of each second is spent transferring data.Thus 10% of the CPU time is spent copying data to memory

18 Solution With DMA time required in handling each DMA request is 5000 cycles. Since 2500 DMA requests are issued (10MB/4KB) the total time taken is 12,500,000 cycles. As the CPU clock is 500MHZ, the fraction of CPU time spent is 12,500,000/(500x10 6) or 2.5%.

19 Example A hard drive with a maximum transfer rate of 1MB/s is connected to a 32-bit, 10 MIPS CPU operating at a clock frequency of 100 MHz.Assume that the I/O interface is DMA based and it takes 500 clock cycles for the CPU to set- up the DMA controller. Also assume that the interrupt handling process at the end of the DMA transfer takes an additional 300 CPU clock cycles. If the data transfer is done using 2 KB blocks, calculate the percentage of the CPU time consumed in handling the hard drive.

20 Solution Since the hard drive transfers at the rate of 1MB/s, and each block size is 2KB, there are 1000/2=500 blocks transferred/ second Every DMA transfer uses =800 CPU cycles. This gives us 800x500=400,000=400x10 3 cycles/s For the 100 MHz CPU, this corresponds to (400x10 3 )/(100x10 6 )=4x10 -3 =0.4%

21 Cycle Stealing The DMA module takes control of the bus to transfer data to and from memory. it can either use the bus while the CPU is not using it. or it can force the CPU to temporarily suspend its operation. The latter approach is called cycle stealing

22 DMA and Interrupt breakpoints during an instruction cycle Instruction cycle Fetch Instruction Decode Instruction Fetch Operand Execute Instruction Store Result Process Interrupt Processor Cycle Processor Cycle Processor Cycle Processor Cycle Processor Cycle Processor Cycle DMA Breakpoints Interrupt Breakpoint

23 1. Microprocessor controlled device 2. Programmed I/O 3. Interrupt driven I/O 4. DMA

24 I/O Channel Architecture (a) Selector Selector Channel I/O Controller I/O Controller Control Signal Path to CPU Data and address Channel To main memory

25 Multiplexor Channel I/O Controller To CPU To memory (b) Mutiplexor

26 Selector channel A selector channel controls multiple high speed device. However, it is dedicated to a single device at a time. Every device is handled by a controller, or I/O module.

27 Multiplexor channel It can handle I/O with multiple devices at the same time. Byte multiplexor accepts or transmits characters to multilple devices. Block multiplexor interleaves blocks of data from several devices

28 DMA and memory systems DMA unit need to translate virtual address to physical address A transfer cannot easily cross a page boundary The DMA unit contains mappings from virtual to physical address The Operating system provides a mapping Mechanism initiated by the I/O Using this mapping the DMA unit need not worry about the location of virtual pages involved in the transfer

29 DMA and memory systems Break up the DMA transfer into a series of transfers All transfers stay within a single physical page I/O processor handles the ‘chained together’ transfers The operating system individually request each transfer

30 Coherency Solution 1. Route the I/O activity through the cache Ensures cache consistency Expensive Negative performance impact

31 Coherency Solution 2. Cache Flushing Selective invalidation Forced write back No hardware drawback More efficient in software

32 Coherency Solution 3.Hardware flushing Selective flushing through hardware