SlideShare a Scribd company logo
Course Website: http://faculty.iitr.ac.in/~sudiproy.fcs/csn221_2015.html
Piazza Site: https://piazza.com/iitr.ac.in/fall2015/csn221
Dr. Sudip Roy
CSN‐221: COMPUTER ARCHITECTURE
AND MICROPROCESSORS
Input/Output (I/O) Devices
(Lecture – 35)
Dr. Sudip Roy 2
Introduction to I/O:
Dr. Sudip Roy 3
I/O Peripherals:
Dr. Sudip Roy 4
External Device Block Diagram:
External Devices:
 Human readable
 Screen, printer, keyboard
 Machine readable
 Monitoring and control
 Communication
 Modem
 Network Interface Card (NIC)
Dr. Sudip Roy 5
I/O Problems:
 Wide variety of peripherals
 Delivering different amounts of data
 At different speeds
 In different formats
 All slower than CPU and RAM
 Need I/O modules
I/O Module:
 Interface to CPU and Memory
 Interface to one or more peripherals
Dr. Sudip Roy 6
I/O Module Diagram:
Generic Model of I/O
Module
Dr. Sudip Roy 7
I/O Module Function:
 Control & Timing
 CPU Communication
 Device Communication
 Data Buffering
 Error Detection
 CPU checks I/O module device status
 I/O module returns status
 If ready, CPU requests data transfer
 I/O module gets data from device
 I/O module transfers data to CPU
 Variations for output, DMA, etc.
I/O Steps:
Dr. Sudip Roy 8
I/O Module Decisions:
 Hide or reveal device properties to CPU
 Support multiple or single device
 Control device functions or leave for CPU
 Also O/S decisions
 e.g. Unix treats everything it can as a file
Input Output Techniques:
 Programmed I/O
 Interrupt driven I/O
 Direct Memory Access (DMA)
Dr. Sudip Roy 9
Three Techniques for Input of a Block of Data:
Dr. Sudip Roy 10
Programmed I/O:
 CPU has direct control over I/O
 Sensing status
 Read/write commands
 Transferring data
 CPU waits for I/O module to complete operation
 Wastes CPU time
 CPU requests I/O operation
 I/O module performs operation
 I/O module sets status bits
 CPU checks status bits periodically
 I/O module does not inform CPU
directly
 I/O module does not interrupt CPU
 CPU may wait or come back later
Programmed I/O ‐ Details: Addressing I/O Devices:
 Under programmed I/O data
transfer is very much like memory
access (CPU viewpoint)
 Each device given unique identifier
 CPU commands contain identifier
(address)
Dr. Sudip Roy 11
I/O Mapping:
 Isolated I/O
 Separate address spaces
 Need I/O or memory select lines
 Special commands for I/O
 Limited set
 Memory mapped I/O
 Devices and memory share an address space
 I/O looks just like memory read/write
 No special commands for I/O
 Large selection of memory access commands available
Dr. Sudip Roy 12
Type of Peripheral I/O:
Isolated I/O
Dr. Sudip Roy 13
Changes in Memory and Registers for an Interrupt:
Dr. Sudip Roy 14
Interrupt Driven I/O:
 Overcomes CPU waiting
 No repeated CPU checking of device
 I/O module interrupts when ready
Basic Operations:
CPU issues read command
 I/O module gets data from peripheral whilst CPU does other
work
 I/O module interrupts CPU
 CPU requests data
 I/O module transfers data
Dr. Sudip Roy 15
Simple Interrupt
Processing:
Dr. Sudip Roy 16
Interrupt Processing: CPU Viewpoint
 Issue read command
 Do other work
 Check for interrupt at end of each instruction cycle
 If interrupted:‐
 Save context (registers)
 Process interrupt
Fetch data & store
 Will have more discussion in Operating Systems classes
Dr. Sudip Roy 17
Interrupt‐driven I/O Design Issues:
Identifying Interrupting Module:
 Software poll
 CPU asks each module in turn to determine which module caused the
interrupt
 Slow
 Daisy Chain or Hardware poll
 All I/O modules share a common interrupt request line
 Interrupt acknowledge line is daisy chained through the modules
 When the processor senses an interrupt it sends out an interrupt
acknowledge
 Module responsible places vector on bus
 CPU uses vector to identify handler routine
Dr. Sudip Roy 18
Steps to Implement Interrupt:
Dr. Sudip Roy 19
Interrupts & Priority:
Dr. Sudip Roy 20
Interrupts & Priority:
Multiple Interrupts:
 Each interrupt line has a priority
 Higher priority lines can interrupt lower priority lines
 In bus mastering, only current master can interrupt
Example ‐ PC Bus:
 80x86 has one interrupt line
 8086 based systems use one 8259A interrupt controller
 8259A has 8 interrupt lines
Dr. Sudip Roy 21
Intel 82C55A: Programmable Peripheral Interface
Dr. Sudip Roy 22
Intel 82C55A: Programmable
Peripheral Interface
Ad

More Related Content

Similar to CSN221_Lec_35 Computer Architecture and Microprocessor (20)

Computre structures and architecture.pptx
Computre structures and architecture.pptxComputre structures and architecture.pptx
Computre structures and architecture.pptx
22951a04p3
 
COA chapter 5 finalcomputer organization and architecture course for engineer...
COA chapter 5 finalcomputer organization and architecture course for engineer...COA chapter 5 finalcomputer organization and architecture course for engineer...
COA chapter 5 finalcomputer organization and architecture course for engineer...
fathibanki
 
MODULE 5-1.computer organization and archit
MODULE 5-1.computer organization and architMODULE 5-1.computer organization and archit
MODULE 5-1.computer organization and archit
Sindhu Mani
 
UNIT 5 INPUT OUTPUT.pptx computer
UNIT 5 INPUT OUTPUT.pptx              computerUNIT 5 INPUT OUTPUT.pptx              computer
UNIT 5 INPUT OUTPUT.pptx computer
pawansirohi608
 
Input/Output System
Input/Output System Input/Output System
Input/Output System
Ajeng Savitri
 
input output ports
input output portsinput output ports
input output ports
aslamslides
 
Input/Output System (Part 2)
Input/Output System (Part 2) Input/Output System (Part 2)
Input/Output System (Part 2)
Ajeng Savitri
 
6.1_IO-Principles.ppt
6.1_IO-Principles.ppt6.1_IO-Principles.ppt
6.1_IO-Principles.ppt
dedanndege
 
Chapter 6 input output
Chapter 6 input outputChapter 6 input output
Chapter 6 input output
risal07
 
Input output module
Input output moduleInput output module
Input output module
Muhammad Ishaq
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
Qiyo Jung
 
lecture1.pdf
lecture1.pdflecture1.pdf
lecture1.pdf
ssuser5dbeb0
 
Input Output - Computer Architecture
Input Output - Computer ArchitectureInput Output - Computer Architecture
Input Output - Computer Architecture
Maruf Abdullah (Rion)
 
Input-Output Modules
Input-Output ModulesInput-Output Modules
Input-Output Modules
Mukesh Tekwani
 
Lecture 10 - Ch No. 7 Input and Output.pptx
Lecture 10 - Ch No. 7 Input and Output.pptxLecture 10 - Ch No. 7 Input and Output.pptx
Lecture 10 - Ch No. 7 Input and Output.pptx
AdeelAsghar36
 
Operating System Case Study and I/O System
Operating System Case Study and I/O SystemOperating System Case Study and I/O System
Operating System Case Study and I/O System
prakash ganesan
 
Unit 6
Unit 6Unit 6
Unit 6
pm_ghate
 
IO (2).ppt
IO (2).pptIO (2).ppt
IO (2).ppt
AshokRachapalli1
 
IO (1).ppt
IO (1).pptIO (1).ppt
IO (1).ppt
AshokRachapalli1
 
IO.ppt
IO.pptIO.ppt
IO.ppt
AshokRachapalli1
 
Computre structures and architecture.pptx
Computre structures and architecture.pptxComputre structures and architecture.pptx
Computre structures and architecture.pptx
22951a04p3
 
COA chapter 5 finalcomputer organization and architecture course for engineer...
COA chapter 5 finalcomputer organization and architecture course for engineer...COA chapter 5 finalcomputer organization and architecture course for engineer...
COA chapter 5 finalcomputer organization and architecture course for engineer...
fathibanki
 
MODULE 5-1.computer organization and archit
MODULE 5-1.computer organization and architMODULE 5-1.computer organization and archit
MODULE 5-1.computer organization and archit
Sindhu Mani
 
UNIT 5 INPUT OUTPUT.pptx computer
UNIT 5 INPUT OUTPUT.pptx              computerUNIT 5 INPUT OUTPUT.pptx              computer
UNIT 5 INPUT OUTPUT.pptx computer
pawansirohi608
 
Input/Output System
Input/Output System Input/Output System
Input/Output System
Ajeng Savitri
 
input output ports
input output portsinput output ports
input output ports
aslamslides
 
Input/Output System (Part 2)
Input/Output System (Part 2) Input/Output System (Part 2)
Input/Output System (Part 2)
Ajeng Savitri
 
6.1_IO-Principles.ppt
6.1_IO-Principles.ppt6.1_IO-Principles.ppt
6.1_IO-Principles.ppt
dedanndege
 
Chapter 6 input output
Chapter 6 input outputChapter 6 input output
Chapter 6 input output
risal07
 
Input Output - Computer Architecture
Input Output - Computer ArchitectureInput Output - Computer Architecture
Input Output - Computer Architecture
Maruf Abdullah (Rion)
 
Lecture 10 - Ch No. 7 Input and Output.pptx
Lecture 10 - Ch No. 7 Input and Output.pptxLecture 10 - Ch No. 7 Input and Output.pptx
Lecture 10 - Ch No. 7 Input and Output.pptx
AdeelAsghar36
 
Operating System Case Study and I/O System
Operating System Case Study and I/O SystemOperating System Case Study and I/O System
Operating System Case Study and I/O System
prakash ganesan
 

More from ssuser034ce1 (20)

CSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and MicroprocessorCSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and MicroprocessorCSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and MicroprocessorCSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and MicroprocessorCSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and MicroprocessorCSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and MicroprocessorCSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath DesignCSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath Design
ssuser034ce1
 
CSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath designCSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath design
ssuser034ce1
 
CSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath designCSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath design
ssuser034ce1
 
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdfComputer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
ssuser034ce1
 
CSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions
CSN221_Lec_5.pdf Computer Organization, CPU Structure and FunctionsCSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions
CSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions
ssuser034ce1
 
CSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & ArchitectureCSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & Architecture
ssuser034ce1
 
CS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdfCS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdf
ssuser034ce1
 
CS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdfCS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdf
ssuser034ce1
 
CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
ssuser034ce1
 
CS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdfCS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdf
ssuser034ce1
 
CS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdfCS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdf
ssuser034ce1
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
ssuser034ce1
 
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdfCS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
ssuser034ce1
 
CS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdfCS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdf
ssuser034ce1
 
CSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and MicroprocessorCSN221_Lec_27 Computer Architecture and Microprocessor
CSN221_Lec_27 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and MicroprocessorCSN221_Lec_26 Computer Architecture and Microprocessor
CSN221_Lec_26 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and MicroprocessorCSN221_Lec_25 Computer Architecture and Microprocessor
CSN221_Lec_25 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and MicroprocessorCSN221_Lec_36 Computer Architecture and Microprocessor
CSN221_Lec_36 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and MicroprocessorCSN221_Lec_34 Computer Architecture and Microprocessor
CSN221_Lec_34 Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and MicroprocessorCSN221_Lec_22.pdf Computer Architecture and Microprocessor
CSN221_Lec_22.pdf Computer Architecture and Microprocessor
ssuser034ce1
 
CSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath DesignCSN221_Lec_17.pdf Multi Cycle Datapath Design
CSN221_Lec_17.pdf Multi Cycle Datapath Design
ssuser034ce1
 
CSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath designCSN221_Lec_16.pdf MIPS ISA and Datapath design
CSN221_Lec_16.pdf MIPS ISA and Datapath design
ssuser034ce1
 
CSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath designCSN221_Lec_15.pdf MIPS ISA and Datapath design
CSN221_Lec_15.pdf MIPS ISA and Datapath design
ssuser034ce1
 
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdfComputer Architecture CSN221_Lec_37_SpecialTopics.pdf
Computer Architecture CSN221_Lec_37_SpecialTopics.pdf
ssuser034ce1
 
CSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions
CSN221_Lec_5.pdf Computer Organization, CPU Structure and FunctionsCSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions
CSN221_Lec_5.pdf Computer Organization, CPU Structure and Functions
ssuser034ce1
 
CSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & ArchitectureCSN221_Lec_4.pdf Computer Organization & Architecture
CSN221_Lec_4.pdf Computer Organization & Architecture
ssuser034ce1
 
CS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdfCS-102 Data Structures huffman coding.pdf
CS-102 Data Structures huffman coding.pdf
ssuser034ce1
 
CS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdfCS-102 Data Structures HashFunction CS102.pdf
CS-102 Data Structures HashFunction CS102.pdf
ssuser034ce1
 
CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
ssuser034ce1
 
CS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdfCS-102 DS-class04a Lectures DS Class.pdf
CS-102 DS-class04a Lectures DS Class.pdf
ssuser034ce1
 
CS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdfCS-102 DS-class03 Class DS Lectures .pdf
CS-102 DS-class03 Class DS Lectures .pdf
ssuser034ce1
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
ssuser034ce1
 
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdfCS-102 BT_24_3_14 Binary Tree Lectures.pdf
CS-102 BT_24_3_14 Binary Tree Lectures.pdf
ssuser034ce1
 
CS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdfCS-102 Course_ Binary Tree Lectures .pdf
CS-102 Course_ Binary Tree Lectures .pdf
ssuser034ce1
 
Ad

Recently uploaded (20)

DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Ad

CSN221_Lec_35 Computer Architecture and Microprocessor

  • 1. Course Website: http://faculty.iitr.ac.in/~sudiproy.fcs/csn221_2015.html Piazza Site: https://piazza.com/iitr.ac.in/fall2015/csn221 Dr. Sudip Roy CSN‐221: COMPUTER ARCHITECTURE AND MICROPROCESSORS Input/Output (I/O) Devices (Lecture – 35)
  • 2. Dr. Sudip Roy 2 Introduction to I/O:
  • 3. Dr. Sudip Roy 3 I/O Peripherals:
  • 4. Dr. Sudip Roy 4 External Device Block Diagram: External Devices:  Human readable  Screen, printer, keyboard  Machine readable  Monitoring and control  Communication  Modem  Network Interface Card (NIC)
  • 5. Dr. Sudip Roy 5 I/O Problems:  Wide variety of peripherals  Delivering different amounts of data  At different speeds  In different formats  All slower than CPU and RAM  Need I/O modules I/O Module:  Interface to CPU and Memory  Interface to one or more peripherals
  • 6. Dr. Sudip Roy 6 I/O Module Diagram: Generic Model of I/O Module
  • 7. Dr. Sudip Roy 7 I/O Module Function:  Control & Timing  CPU Communication  Device Communication  Data Buffering  Error Detection  CPU checks I/O module device status  I/O module returns status  If ready, CPU requests data transfer  I/O module gets data from device  I/O module transfers data to CPU  Variations for output, DMA, etc. I/O Steps:
  • 8. Dr. Sudip Roy 8 I/O Module Decisions:  Hide or reveal device properties to CPU  Support multiple or single device  Control device functions or leave for CPU  Also O/S decisions  e.g. Unix treats everything it can as a file Input Output Techniques:  Programmed I/O  Interrupt driven I/O  Direct Memory Access (DMA)
  • 9. Dr. Sudip Roy 9 Three Techniques for Input of a Block of Data:
  • 10. Dr. Sudip Roy 10 Programmed I/O:  CPU has direct control over I/O  Sensing status  Read/write commands  Transferring data  CPU waits for I/O module to complete operation  Wastes CPU time  CPU requests I/O operation  I/O module performs operation  I/O module sets status bits  CPU checks status bits periodically  I/O module does not inform CPU directly  I/O module does not interrupt CPU  CPU may wait or come back later Programmed I/O ‐ Details: Addressing I/O Devices:  Under programmed I/O data transfer is very much like memory access (CPU viewpoint)  Each device given unique identifier  CPU commands contain identifier (address)
  • 11. Dr. Sudip Roy 11 I/O Mapping:  Isolated I/O  Separate address spaces  Need I/O or memory select lines  Special commands for I/O  Limited set  Memory mapped I/O  Devices and memory share an address space  I/O looks just like memory read/write  No special commands for I/O  Large selection of memory access commands available
  • 12. Dr. Sudip Roy 12 Type of Peripheral I/O: Isolated I/O
  • 13. Dr. Sudip Roy 13 Changes in Memory and Registers for an Interrupt:
  • 14. Dr. Sudip Roy 14 Interrupt Driven I/O:  Overcomes CPU waiting  No repeated CPU checking of device  I/O module interrupts when ready Basic Operations: CPU issues read command  I/O module gets data from peripheral whilst CPU does other work  I/O module interrupts CPU  CPU requests data  I/O module transfers data
  • 15. Dr. Sudip Roy 15 Simple Interrupt Processing:
  • 16. Dr. Sudip Roy 16 Interrupt Processing: CPU Viewpoint  Issue read command  Do other work  Check for interrupt at end of each instruction cycle  If interrupted:‐  Save context (registers)  Process interrupt Fetch data & store  Will have more discussion in Operating Systems classes
  • 17. Dr. Sudip Roy 17 Interrupt‐driven I/O Design Issues: Identifying Interrupting Module:  Software poll  CPU asks each module in turn to determine which module caused the interrupt  Slow  Daisy Chain or Hardware poll  All I/O modules share a common interrupt request line  Interrupt acknowledge line is daisy chained through the modules  When the processor senses an interrupt it sends out an interrupt acknowledge  Module responsible places vector on bus  CPU uses vector to identify handler routine
  • 18. Dr. Sudip Roy 18 Steps to Implement Interrupt:
  • 19. Dr. Sudip Roy 19 Interrupts & Priority:
  • 20. Dr. Sudip Roy 20 Interrupts & Priority: Multiple Interrupts:  Each interrupt line has a priority  Higher priority lines can interrupt lower priority lines  In bus mastering, only current master can interrupt Example ‐ PC Bus:  80x86 has one interrupt line  8086 based systems use one 8259A interrupt controller  8259A has 8 interrupt lines
  • 21. Dr. Sudip Roy 21 Intel 82C55A: Programmable Peripheral Interface
  • 22. Dr. Sudip Roy 22 Intel 82C55A: Programmable Peripheral Interface