SlideShare a Scribd company logo
CSC 203 1.5
Computer System Architecture
Budditha Hettige
Department of Statistics and Computer Science
University of Sri Jayewardenepura
IO Fundamentals
Budditha Hettige 2
I/O Fundamentals
• Computer System has three major functions
– CPU
– Memory
– I/O
Budditha Hettige 3
PC with PCI and ISA bus
Budditha Hettige 4
Types and Characteristics of I/O Devices
• Behavior: how does an I/O device behave?
– Input – Read only
– Output - write only, cannot read
– Storage - can be reread and usually rewritten
• Partner:
– Either a human or a machine is at the other end of the
I/O device
– Either feeding data on input or reading data on output
• Data rate:
– The peak rate at which data can be transferred
• between the I/O device and the main memory
• Or between the I/O device and the CPU
Budditha Hettige 5
Data Rate
Budditha Hettige 6
Buses
• A bus is a shared communication link
• Multiple sources and multiple destinations
• It uses one set of wires to connect multiple
subsystems
• Different uses:
– Data
– Address
– Control
Budditha Hettige 7
Motherboard
Budditha Hettige 8
Advantages
• Versatility:
– New devices can be added easily
– Peripherals can be moved between computer
– systems that use the same bus standard
• Low Cost:
– A single set of wires is shared in multiple ways
Budditha Hettige 9
Disadvantages
• It creates a communication bottleneck
– The bandwidth of that bus can limit the maximum
I/O throughput
• The maximum bus speed is largely limited by:
– The length of the bus
– The number of devices on the bus
– The need to support a range of devices with:
• Widely varying latencies
• Widely varying data transfer rates
Budditha Hettige 10
The General Organization of a Bus
• Control lines:
– Signal requests and acknowledgments
– Indicate what type of information is on the data lines
• Data lines carry information between the source
and the destination:
– Data and Addresses
– Complex commands
• A bus transaction includes two parts:
– Sending the address
– Receiving or sending the data
Budditha Hettige 11
Master Vs Slave
• A bus transaction includes two parts:
– Sending the address
– Receiving or sending the data
• Master is the one who starts the bus transaction by:
– Sending the address
• Salve is the one who responds to the address by:
– Sending data to the master if the master ask for data
– Receiving data from the master if the master wants to
send data
Budditha Hettige 12
Output Operation
Budditha Hettige 13
Input Operation
• Input is defined as the Processor receiving data
from the I/O device
Budditha Hettige 14
Type of Buses
• Processor-Memory Bus (design specific or proprietary)
– Short and high speed
– Only need to match the memory system
– Maximize memory-to-processor bandwidth
– Connects directly to the processor
• I/O Bus (industry standard)
– Usually is lengthy and slower
– Need to match a wide range of I/O devices
– Connects to the processor-memory bus or backplane bus
• Backplane Bus (industry standard)
– Backplane: an interconnection structure within the chassis
– Allow processors, memory, and I/O devices to coexist
• Cost advantage: one single bus for all components
Budditha Hettige 15
Increasing the Bus Bandwidth
• Separate versus multiplexed address and data lines:
– Address and data can be transmitted in one bus cycle if separate
address and data lines are available
– Cost: (a) more bus lines, (b) increased complexity
• Data bus width:
– By increasing the width of the data bus, transfers of multiple words
require fewer bus cycles
– Example: SPARCstation 20’s memory bus is 128 bit wide
– cost: more bus lines
• Block transfers:
– Allow the bus to transfer multiple words in back-to-back bus cycles
– Only one address needs to be sent at the beginning
– The bus is not released until the last word is transferred
– Cost: (a) increased complexity (b) decreased response time for
request
Budditha Hettige 16
Operating System Requirements
• Provide protection to shared I/O resources
– Guarantees that a user’s program can only access the
portions of an I/O device to which the user has rights
• Provides abstraction for accessing devices:
– Supply routines that handle low-level device operation
• Handles the interrupts generated by I/O devices
• Provide equitable access to the shared I/O resources
– All user programs must have equal access to the I/O
resources
• Schedule accesses in order to enhance system
throughput
Budditha Hettige 17
OS and I/O Systems Communication
Requirements
• The Operating System must be able to prevent:
– The user program from communicating with the I/O device
directly
• If user programs could perform I/O directly:
– Protection to the shared I/O resources could not be provided
• Three types of communication are required:
– The OS must be able to give commands to the I/O devices
– The I/O device must be able to notify the OS when the I/O
device has completed an operation or has encountered an
error
• Data must be transferred between memory and an I/O
device
Budditha Hettige 18
Commands to I/O Devices
• Two methods are used to address the device:
– Special I/O instructions
– Memory-mapped I/O
• Special I/O instructions specify:
– Both the device number and the command word
– Device number: the processor communicates this via a set of wires
normally included as part of the I/O bus
– Command word: this is usually send on the bus’s data lines
• Memory-mapped I/O:
– Portions of the address space are assigned to I/O device
– Read and writes to those addresses are interpreted as commands to the I/O
devices
– User programs are prevented from issuing I/O operations directly:
• The I/O address space is protected by the address translation
Budditha Hettige 19
I/O Device Notifying the OS
• The OS needs to know when:
– The I/O device has completed an operation
– The I/O operation has encountered an error
• This can be accomplished in two different
ways:
– Polling:
• The I/O device put information in a status register
• The OS periodically check the status register
– I/O Interrupt:
• Whenever an I/O device needs attention from the
processor, it interrupts the processor from what it is
currently doing.
Budditha Hettige 20
Polling
• Advantage:
– Simple: the processor is totally
in control and does all the work
• Disadvantage:
– Polling overhead can consume a
lot of CPU time
Budditha Hettige 21
Interrupts
• interrupt is an asynchronous signal indicating the
need for attention or a synchronous event in
software indicating the need for a change in
execution
• Advantage:
– User program progress is only halted during actual transfer
• Disadvantage, special hardware is needed to:
– Cause an interrupt (I/O device)
– Detect an interrupt (processor)
– Save the proper states to resume after the interrupt
(processor)
Budditha Hettige 22
Interrupt Driven Data Transfer
• An I/O interrupt is just like the
exceptions except:
– An I/O interrupt is asynchronous
– Further information needs to be
conveyed
• An I/O interrupt is asynchronous
with respect to instruction
execution:
– I/O interrupt is not associated with
any instruction
– I/O interrupt does not prevent any
instruction from completion
– You can pick your own convenient
point to take an interrupt
Budditha Hettige 23
I/O Interrupt
• I/O interrupt is more complicated than
exception:
– Needs to convey the identity of the device
generating the interrupt
– Interrupt requests can have different urgencies:
– Interrupt request needs to be prioritized
• Interrupt Logic
– Detect and synchronize interrupt requests
• Ignore interrupts that are disabled (masked off)
• Rank the pending interrupt requests
• Create interrupt microsequence address
• Provide select signals for interrupt microsequence
Budditha Hettige 24

More Related Content

What's hot

Processors selection
Processors selectionProcessors selection
Processors selection
Pradeep Shankhwar
 
Lecture1 - Computer Architecture
Lecture1 - Computer ArchitectureLecture1 - Computer Architecture
Lecture1 - Computer Architecture
Volodymyr Ushenko
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
Subhasis Dash
 
Processors
ProcessorsProcessors
Processors
HIMANSHU JAIN
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
Dilum Bandara
 
Basics of Computer! BATRA COMPUTER CENTRE IN AMBALA
Basics of Computer! BATRA COMPUTER CENTRE IN AMBALABasics of Computer! BATRA COMPUTER CENTRE IN AMBALA
Basics of Computer! BATRA COMPUTER CENTRE IN AMBALA
jatin batra
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
Hatem Abd El-Salam
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
AJAL A J
 
Cpu
CpuCpu
introduction to embedded systems part 2
introduction to embedded systems part 2introduction to embedded systems part 2
introduction to embedded systems part 2
Hatem Abd El-Salam
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
Sanjivani Sontakke
 
Control unit
Control  unitControl  unit
Control unit
Sameer Patil
 
Lecture 39
Lecture 39Lecture 39
Lecture 39
RahulRathi94
 
Unit 2 processor&memory-organisation
Unit 2 processor&memory-organisationUnit 2 processor&memory-organisation
Unit 2 processor&memory-organisation
Pavithra S
 
Computer organization
Computer organizationComputer organization
Computer organization
ishapadhy
 
Basic structure of computers by aniket bhute
Basic structure of computers by aniket bhuteBasic structure of computers by aniket bhute
Basic structure of computers by aniket bhute
Aniket Bhute
 
Lecture 46
Lecture 46Lecture 46
Lecture 46
RahulRathi94
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Damien Magoni
 
03 top level view of computer function and interconnection
03 top level view of computer function and interconnection03 top level view of computer function and interconnection
03 top level view of computer function and interconnection
Sher Shah Merkhel
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
Kumar
 

What's hot (20)

Processors selection
Processors selectionProcessors selection
Processors selection
 
Lecture1 - Computer Architecture
Lecture1 - Computer ArchitectureLecture1 - Computer Architecture
Lecture1 - Computer Architecture
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
Processors
ProcessorsProcessors
Processors
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
 
Basics of Computer! BATRA COMPUTER CENTRE IN AMBALA
Basics of Computer! BATRA COMPUTER CENTRE IN AMBALABasics of Computer! BATRA COMPUTER CENTRE IN AMBALA
Basics of Computer! BATRA COMPUTER CENTRE IN AMBALA
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
 
Cpu
CpuCpu
Cpu
 
introduction to embedded systems part 2
introduction to embedded systems part 2introduction to embedded systems part 2
introduction to embedded systems part 2
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Control unit
Control  unitControl  unit
Control unit
 
Lecture 39
Lecture 39Lecture 39
Lecture 39
 
Unit 2 processor&memory-organisation
Unit 2 processor&memory-organisationUnit 2 processor&memory-organisation
Unit 2 processor&memory-organisation
 
Computer organization
Computer organizationComputer organization
Computer organization
 
Basic structure of computers by aniket bhute
Basic structure of computers by aniket bhuteBasic structure of computers by aniket bhute
Basic structure of computers by aniket bhute
 
Lecture 46
Lecture 46Lecture 46
Lecture 46
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
03 top level view of computer function and interconnection
03 top level view of computer function and interconnection03 top level view of computer function and interconnection
03 top level view of computer function and interconnection
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
 

Similar to Computer System Architecture Lecture Note 9 IO fundamentals

I/o management and disk scheduling .pptx
I/o management and disk scheduling .pptxI/o management and disk scheduling .pptx
I/o management and disk scheduling .pptx
webip34973
 
Unit4_IO_13623_AnilRawat.ppt
Unit4_IO_13623_AnilRawat.pptUnit4_IO_13623_AnilRawat.ppt
Unit4_IO_13623_AnilRawat.ppt
prateeksingh235912
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its types
Nehal Naik
 
Interfacingiodevice
InterfacingiodeviceInterfacingiodevice
Interfacingiodevice
Praneeth Kannegolla
 
comporgppt.pptx
comporgppt.pptxcomporgppt.pptx
comporgppt.pptx
FaisalAijaz1
 
Unit 5
Unit 5Unit 5
Unit 5
sowndaryaM5
 
Interfacing
InterfacingInterfacing
Interfacing
Sambasiva62
 
03_top-level-view-of-computer-function-and-interconnection.ppt
03_top-level-view-of-computer-function-and-interconnection.ppt03_top-level-view-of-computer-function-and-interconnection.ppt
03_top-level-view-of-computer-function-and-interconnection.ppt
AmirZaman21
 
Ca 2 note mano
Ca 2 note manoCa 2 note mano
Ca 2 note mano
Manoharan Ragavan
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
Subhasis Dash
 
1.instrumentation ii
1.instrumentation ii1.instrumentation ii
1.instrumentation ii
Bikash Gyawali
 
io orgnz.ppt
io orgnz.pptio orgnz.ppt
io orgnz.ppt
VetriM4
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
JavedIqbal549896
 
03 buses
03 buses03 buses
03 buses
dilip kumar
 
03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc
Anwal Mirza
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
Sajid Marwat
 
Input - output organzation
Input - output organzationInput - output organzation
Input - output organzation
daxesh chauhan
 
Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)
SwapnitaSrivastava1
 
Arbitration in computer organization
 Arbitration in computer organization   Arbitration in computer organization
Arbitration in computer organization
Amit kashyap
 
Ch6 030702
Ch6 030702Ch6 030702
Ch6 030702
jyothi205
 

Similar to Computer System Architecture Lecture Note 9 IO fundamentals (20)

I/o management and disk scheduling .pptx
I/o management and disk scheduling .pptxI/o management and disk scheduling .pptx
I/o management and disk scheduling .pptx
 
Unit4_IO_13623_AnilRawat.ppt
Unit4_IO_13623_AnilRawat.pptUnit4_IO_13623_AnilRawat.ppt
Unit4_IO_13623_AnilRawat.ppt
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its types
 
Interfacingiodevice
InterfacingiodeviceInterfacingiodevice
Interfacingiodevice
 
comporgppt.pptx
comporgppt.pptxcomporgppt.pptx
comporgppt.pptx
 
Unit 5
Unit 5Unit 5
Unit 5
 
Interfacing
InterfacingInterfacing
Interfacing
 
03_top-level-view-of-computer-function-and-interconnection.ppt
03_top-level-view-of-computer-function-and-interconnection.ppt03_top-level-view-of-computer-function-and-interconnection.ppt
03_top-level-view-of-computer-function-and-interconnection.ppt
 
Ca 2 note mano
Ca 2 note manoCa 2 note mano
Ca 2 note mano
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
1.instrumentation ii
1.instrumentation ii1.instrumentation ii
1.instrumentation ii
 
io orgnz.ppt
io orgnz.pptio orgnz.ppt
io orgnz.ppt
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
 
03 buses
03 buses03 buses
03 buses
 
03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
 
Input - output organzation
Input - output organzationInput - output organzation
Input - output organzation
 
Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)
 
Arbitration in computer organization
 Arbitration in computer organization   Arbitration in computer organization
Arbitration in computer organization
 
Ch6 030702
Ch6 030702Ch6 030702
Ch6 030702
 

More from Budditha Hettige

Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
Budditha Hettige
 
Sorting
SortingSorting
Link List
Link ListLink List
Link List
Budditha Hettige
 
Queue
QueueQueue
02 Stack
02 Stack02 Stack
Data Structures 01
Data Structures 01Data Structures 01
Data Structures 01
Budditha Hettige
 
Drawing Fonts
Drawing FontsDrawing Fonts
Drawing Fonts
Budditha Hettige
 
Texture Mapping
Texture Mapping Texture Mapping
Texture Mapping
Budditha Hettige
 
Lighting
LightingLighting
Viewing
ViewingViewing
OpenGL 3D Drawing
OpenGL 3D DrawingOpenGL 3D Drawing
OpenGL 3D Drawing
Budditha Hettige
 
2D Drawing
2D Drawing2D Drawing
2D Drawing
Budditha Hettige
 
Graphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::BlocksGraphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::Blocks
Budditha Hettige
 
Introduction to Computer Graphics
Introduction to Computer GraphicsIntroduction to Computer Graphics
Introduction to Computer Graphics
Budditha Hettige
 
Computer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache MemoryComputer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache Memory
Budditha Hettige
 
Computer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architectureComputer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architecture
Budditha Hettige
 
Computer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: HistoryComputer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: History
Budditha Hettige
 
Computer System Architecture Lecture Note 4: intel microprocessors
Computer System Architecture Lecture Note 4: intel microprocessorsComputer System Architecture Lecture Note 4: intel microprocessors
Computer System Architecture Lecture Note 4: intel microprocessors
Budditha Hettige
 

More from Budditha Hettige (18)

Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
 
Sorting
SortingSorting
Sorting
 
Link List
Link ListLink List
Link List
 
Queue
QueueQueue
Queue
 
02 Stack
02 Stack02 Stack
02 Stack
 
Data Structures 01
Data Structures 01Data Structures 01
Data Structures 01
 
Drawing Fonts
Drawing FontsDrawing Fonts
Drawing Fonts
 
Texture Mapping
Texture Mapping Texture Mapping
Texture Mapping
 
Lighting
LightingLighting
Lighting
 
Viewing
ViewingViewing
Viewing
 
OpenGL 3D Drawing
OpenGL 3D DrawingOpenGL 3D Drawing
OpenGL 3D Drawing
 
2D Drawing
2D Drawing2D Drawing
2D Drawing
 
Graphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::BlocksGraphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::Blocks
 
Introduction to Computer Graphics
Introduction to Computer GraphicsIntroduction to Computer Graphics
Introduction to Computer Graphics
 
Computer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache MemoryComputer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache Memory
 
Computer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architectureComputer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architecture
 
Computer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: HistoryComputer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: History
 
Computer System Architecture Lecture Note 4: intel microprocessors
Computer System Architecture Lecture Note 4: intel microprocessorsComputer System Architecture Lecture Note 4: intel microprocessors
Computer System Architecture Lecture Note 4: intel microprocessors
 

Recently uploaded

BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 

Recently uploaded (20)

BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 

Computer System Architecture Lecture Note 9 IO fundamentals

  • 1. CSC 203 1.5 Computer System Architecture Budditha Hettige Department of Statistics and Computer Science University of Sri Jayewardenepura
  • 3. I/O Fundamentals • Computer System has three major functions – CPU – Memory – I/O Budditha Hettige 3
  • 4. PC with PCI and ISA bus Budditha Hettige 4
  • 5. Types and Characteristics of I/O Devices • Behavior: how does an I/O device behave? – Input – Read only – Output - write only, cannot read – Storage - can be reread and usually rewritten • Partner: – Either a human or a machine is at the other end of the I/O device – Either feeding data on input or reading data on output • Data rate: – The peak rate at which data can be transferred • between the I/O device and the main memory • Or between the I/O device and the CPU Budditha Hettige 5
  • 7. Buses • A bus is a shared communication link • Multiple sources and multiple destinations • It uses one set of wires to connect multiple subsystems • Different uses: – Data – Address – Control Budditha Hettige 7
  • 9. Advantages • Versatility: – New devices can be added easily – Peripherals can be moved between computer – systems that use the same bus standard • Low Cost: – A single set of wires is shared in multiple ways Budditha Hettige 9
  • 10. Disadvantages • It creates a communication bottleneck – The bandwidth of that bus can limit the maximum I/O throughput • The maximum bus speed is largely limited by: – The length of the bus – The number of devices on the bus – The need to support a range of devices with: • Widely varying latencies • Widely varying data transfer rates Budditha Hettige 10
  • 11. The General Organization of a Bus • Control lines: – Signal requests and acknowledgments – Indicate what type of information is on the data lines • Data lines carry information between the source and the destination: – Data and Addresses – Complex commands • A bus transaction includes two parts: – Sending the address – Receiving or sending the data Budditha Hettige 11
  • 12. Master Vs Slave • A bus transaction includes two parts: – Sending the address – Receiving or sending the data • Master is the one who starts the bus transaction by: – Sending the address • Salve is the one who responds to the address by: – Sending data to the master if the master ask for data – Receiving data from the master if the master wants to send data Budditha Hettige 12
  • 14. Input Operation • Input is defined as the Processor receiving data from the I/O device Budditha Hettige 14
  • 15. Type of Buses • Processor-Memory Bus (design specific or proprietary) – Short and high speed – Only need to match the memory system – Maximize memory-to-processor bandwidth – Connects directly to the processor • I/O Bus (industry standard) – Usually is lengthy and slower – Need to match a wide range of I/O devices – Connects to the processor-memory bus or backplane bus • Backplane Bus (industry standard) – Backplane: an interconnection structure within the chassis – Allow processors, memory, and I/O devices to coexist • Cost advantage: one single bus for all components Budditha Hettige 15
  • 16. Increasing the Bus Bandwidth • Separate versus multiplexed address and data lines: – Address and data can be transmitted in one bus cycle if separate address and data lines are available – Cost: (a) more bus lines, (b) increased complexity • Data bus width: – By increasing the width of the data bus, transfers of multiple words require fewer bus cycles – Example: SPARCstation 20’s memory bus is 128 bit wide – cost: more bus lines • Block transfers: – Allow the bus to transfer multiple words in back-to-back bus cycles – Only one address needs to be sent at the beginning – The bus is not released until the last word is transferred – Cost: (a) increased complexity (b) decreased response time for request Budditha Hettige 16
  • 17. Operating System Requirements • Provide protection to shared I/O resources – Guarantees that a user’s program can only access the portions of an I/O device to which the user has rights • Provides abstraction for accessing devices: – Supply routines that handle low-level device operation • Handles the interrupts generated by I/O devices • Provide equitable access to the shared I/O resources – All user programs must have equal access to the I/O resources • Schedule accesses in order to enhance system throughput Budditha Hettige 17
  • 18. OS and I/O Systems Communication Requirements • The Operating System must be able to prevent: – The user program from communicating with the I/O device directly • If user programs could perform I/O directly: – Protection to the shared I/O resources could not be provided • Three types of communication are required: – The OS must be able to give commands to the I/O devices – The I/O device must be able to notify the OS when the I/O device has completed an operation or has encountered an error • Data must be transferred between memory and an I/O device Budditha Hettige 18
  • 19. Commands to I/O Devices • Two methods are used to address the device: – Special I/O instructions – Memory-mapped I/O • Special I/O instructions specify: – Both the device number and the command word – Device number: the processor communicates this via a set of wires normally included as part of the I/O bus – Command word: this is usually send on the bus’s data lines • Memory-mapped I/O: – Portions of the address space are assigned to I/O device – Read and writes to those addresses are interpreted as commands to the I/O devices – User programs are prevented from issuing I/O operations directly: • The I/O address space is protected by the address translation Budditha Hettige 19
  • 20. I/O Device Notifying the OS • The OS needs to know when: – The I/O device has completed an operation – The I/O operation has encountered an error • This can be accomplished in two different ways: – Polling: • The I/O device put information in a status register • The OS periodically check the status register – I/O Interrupt: • Whenever an I/O device needs attention from the processor, it interrupts the processor from what it is currently doing. Budditha Hettige 20
  • 21. Polling • Advantage: – Simple: the processor is totally in control and does all the work • Disadvantage: – Polling overhead can consume a lot of CPU time Budditha Hettige 21
  • 22. Interrupts • interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution • Advantage: – User program progress is only halted during actual transfer • Disadvantage, special hardware is needed to: – Cause an interrupt (I/O device) – Detect an interrupt (processor) – Save the proper states to resume after the interrupt (processor) Budditha Hettige 22
  • 23. Interrupt Driven Data Transfer • An I/O interrupt is just like the exceptions except: – An I/O interrupt is asynchronous – Further information needs to be conveyed • An I/O interrupt is asynchronous with respect to instruction execution: – I/O interrupt is not associated with any instruction – I/O interrupt does not prevent any instruction from completion – You can pick your own convenient point to take an interrupt Budditha Hettige 23
  • 24. I/O Interrupt • I/O interrupt is more complicated than exception: – Needs to convey the identity of the device generating the interrupt – Interrupt requests can have different urgencies: – Interrupt request needs to be prioritized • Interrupt Logic – Detect and synchronize interrupt requests • Ignore interrupts that are disabled (masked off) • Rank the pending interrupt requests • Create interrupt microsequence address • Provide select signals for interrupt microsequence Budditha Hettige 24