input output in computer orgranization and architecture

40
Computer Organization and Architecture Presented By: Vikram Patel

Upload: vikram-patel

Post on 22-Jan-2018

637 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Input output in computer Orgranization and architecture

Computer Organization and Architecture

Presented By:

Vikram Patel

Page 2: Input output in computer Orgranization and architecture

Topics

Input Output (I/O) ports

Input Output Mapping

Memory map techniques

Interrupt driven I/O

DMA based Input Output

Input Output Processor

Page 3: Input output in computer Orgranization and architecture

Input-Output ports ( I/O Ports)

Input : Information or data to the computer

Output : Information or data from computer

Computers are based on the fundamental idea that every input results in an

output.

What is Input and Output ?

What are Input-Output Ports?

They are what connect input and output devices (Keyboard, Mouse,Printer, Scanner, Monitor etc.) to the computer.

Page 4: Input output in computer Orgranization and architecture

Types of Input-Output (I/O) ports

Serial Port

PS/2

Parallel Printer Port

LAN Port

Audio Port

Universal serial Bus (USB)

Page 5: Input output in computer Orgranization and architecture
Page 6: Input output in computer Orgranization and architecture

Input Output Mapping

Page 7: Input output in computer Orgranization and architecture

Input Output Mapping

Memory Mapped I/O

Isolated I/O

There are two types of Input Output Mapping

Page 8: Input output in computer Orgranization and architecture

Memory & I/O Share the entire address range of processor.

Any machine instruction that can access memory can be used to

transfer data to or from an I/O device.

Memory control signals, used to control read & write I/O operations.

Memory Mapped I/O

Page 9: Input output in computer Orgranization and architecture

Processor Provide separate Address Range for Memory & I/O.

Input Output control signals are used to control read and write

input output operations.

Isolated I/O

Page 10: Input output in computer Orgranization and architecture

Memory Map Techniques

Page 11: Input output in computer Orgranization and architecture

Memory Map Techniques

There are 3 types of Memory map Techniques

Direct Mapping

Fully Associative Mapping

Set –Associative Mapping

Page 12: Input output in computer Orgranization and architecture

Simplest way of mapping.

Main memory is divided in blocks.

Maps each block of main memory into only one possible cache line.

Direct Mapping

Page 13: Input output in computer Orgranization and architecture

Direct Mapping

Page 14: Input output in computer Orgranization and architecture

Fully Associative Mapping

In associative cache mapping, the data from any location in

RAM can be stored in any location in cache.

When the processor wants an address, all tag fields in the

cache as checked to determine if the data is already in the

cache.

Each tag line requires circuitry to compare the desired

address with the tag field.

All fields are checked in parallel.

Page 15: Input output in computer Orgranization and architecture

Fully Associative Mapping

Page 16: Input output in computer Orgranization and architecture

Set associative mapping is a mixture of direct and associative mapping.

The cache lines are grouped into sets.

The number of lines in a set can vary from 2 to 16.

A portion of the address is used to specify which set will hold an

address.

The data can be stored in any of the lines in the set.

Set-Associative Mapping

Page 17: Input output in computer Orgranization and architecture

Set Associative Mapping

V-Set Associative

Mapping

Page 18: Input output in computer Orgranization and architecture

Set Associative Mapping

K-Set Associative

Mapping

Page 19: Input output in computer Orgranization and architecture

Interrupt Driven I/O

Page 20: Input output in computer Orgranization and architecture

What is Interrupt?

Event that disrupts the normal execution of a program and causes the

execution of special instructions.

Page 21: Input output in computer Orgranization and architecture

Interrupt Driven I/O

In Interrupt Driven I/O approach, the processor issues an I/O command

to a module and then go on to do some other useful work.

The I/O module with then interrupt the processor to request service

when it is ready to exchange data with the processor. The processor

then executes resumes its former processing.

Page 22: Input output in computer Orgranization and architecture

Simple Interrupt Processing

Page 23: Input output in computer Orgranization and architecture

Advantages of Interrupt Driven I/O

I/O is important aspect for communicating.

Interrupt adapts to the processor speed and I/O device, automatically.

Page 24: Input output in computer Orgranization and architecture

Drawbacks of Interrupt Driven I/O

The I/O transfer rate is limited by the speed with which the processor

can test and service a device.

Needs continues intervention of processor, so it consumes time.

Page 25: Input output in computer Orgranization and architecture

DMA Based I/O

Page 26: Input output in computer Orgranization and architecture

What is DMA?

DMA – Direct Memory Access

In this method the input and output devices read/write information from

the main memory without interference of the CPU through the system

bus.

Page 27: Input output in computer Orgranization and architecture

Block Diagram of DMA

Page 28: Input output in computer Orgranization and architecture

DMA Operation

The processor issues a command to DMA module

Read or write

I/O device address using data lines

Starting memory address using data lines – stored in address

register

Number of words to be transferred using data lines – stored in

data register

Page 29: Input output in computer Orgranization and architecture

DMA Operation (Cont.)

The processor then continues with other work.

DMA module transfers the entire block of data – one word at a time –

directly to or from memory without going through the processor.

DMA module sends an interrupt to the processor when complete.

Page 30: Input output in computer Orgranization and architecture

Configuration of DMA

Single-bus, Detached DMA

Single-bus, Integrated DMA

I/O Bus

Page 31: Input output in computer Orgranization and architecture

Advantages of DMA

Fast transfer of data.

CPU and DMA run concurrently under cache mode.

DMA can trigger an interrupt, which frees the CPU so the speed

increases.

Page 32: Input output in computer Orgranization and architecture

Input Output Channels and

Processors

Page 33: Input output in computer Orgranization and architecture

Input Output Channels and Processors

I/O processor is an extension of the concept of DMA. The I/O

processor can execute specialized I/O program residing in the memory

without intervention of the CPU.

CPU only needs to specify a sequence of I/O activity to I/O processor

An advanced I/O processor can have its own memory, enabling a large

set of I/O devices to be controlled without much involvement from the

CPU.

Page 34: Input output in computer Orgranization and architecture

Types of I/O channels

Controls multiple high-speed devices

Dedicated to the transfer of data with one of the devices

Each device handled by a controller or I/O module

I/O channel controls these I/O controllers

1.) Selector Channel

Page 35: Input output in computer Orgranization and architecture

Types of I/O channels

2.) Multiplexor Channel

Can handle multiple devices at the same time

Byte multiplexor – used for low-speed devices

Block multiplexor – interleaves blocks of data from several devices.

Page 36: Input output in computer Orgranization and architecture

Advantages I/O channels

Makes transfers less visible to CPU, spreads the complexity

Can Improve speed

Can improve device organization flexibility

Page 37: Input output in computer Orgranization and architecture

Conclusion

Input output devices gets connected to computer through I/O Ports.

There are Direct mapping, Fully Associative and Set-Associative

method techniques for mapping the memory.

There are various method of transferring data from Input output

devices to the memory or memory to Input Output devices.

Like : Interrupt Driven I/O, DMA Based I/O, Input Output

Processors.

Page 38: Input output in computer Orgranization and architecture

Book : Computer Organization and Architecture by William Stallings

Images : Google Images

Reference

Page 39: Input output in computer Orgranization and architecture

Any Queries?

Page 40: Input output in computer Orgranization and architecture

Thank You