SlideShare a Scribd company logo
Computer organization
I / O
interrupts   Interrupt is a signal ; on receiving this signal, the processor suspends the execution of the program that it currently executing and transfers  control to an interrupt handling program At least one of the bus control lines called the interrupt request line should be dedicated for carrying the signal The routine executed in response to an interrupt is called interrupt service routine
interrupts   On handling the request , the processor must inform the device that made the request. This is done by sending a interrupt acknowledge signal The time delay between the interrupt request and execution of interrupt service routine is called interrupt latency
interrupts   Basic execution of an interrupt The device raises an interrupt The processor interrupts the program it currently being executed Interrupts are disabled by changing the control bits in the processor status register The action requested by the interrupt is performed by the ISR Interrupts are enabled and execution of interrupted program is resumed
interrupts   Types of interrupts External interrupts Internal interrupts Software interrupts
interrupts   External interrupts come from I/O devices, from timing device, from circuit monitoring the power supply etc. Internal interrupts arise from illegal use of an instruction or data. Internal interrupts are also called as traps. The service program that processes the internal interrupt determines the corrective measure to be taken
interrupts   The internal interrupt is initiated by some exceptional condition caused by the program itself rather than by an external event. Internal interrupts are synchronous with the program, while external interrupts are asynchronous. ie  if the program is rerun, the internal interrupts will occur in the same place each time. External interrupts depend on external conditions that are independent of the program.
interrupts   External and internal interrupts are initiated from signals that occur in the hardware Software interrupt is initiated by executing an instruction. This instruction can be used by the programmer to initiate and interrupt procedure at any desired point in the program The most common s/w interrupt used is an supervisor call , which is used for switching from a user mode to supervisor mode
Modes of data transfer   Information received from an external device is stored in the memory later for later processing Information is transferred to and from the memory involves can happen in different modes In certain transfers , the CPU acts as an intermediate path ,and in other ones the transfer take place between the memory and external devices directly The different modes are Programmed I/O Interrupt initiated I/O Direct Memory access
Modes of data transfer   programmed I/O The i/o devices have no direct access to memory CPU registers act as an intermediate storage The operations are the result of i/o instruction written in the computer program Once a data transfer is required , the CPU is required to monitor the interface to see when a transfer can again be made The programmed instructions has to take care of everything that is taking place in the interface unit and the I/O device
IO mapped i/o Data valid Address bus i/o bus CPU Status    F register IO device interface Data register Data  accepted Data bus I/o read I/o write
Modes of data transfer   programmed I/O The device transfers data one at a time When data is available the device places it in i/o bus and enable data valid line Interface accepts the byte into data register and enables data accepted line Interface sets the flag and disable data valid line CPU checks stats flag and if it is sets, CPU reads data and flag is cleared either by CPU or interface Data accepted line is set invalid
Modes of data transfer   I/O addressing In systems using programmed i/o the CPU ,M and IO devices usually communicate through system bus The address lines of the system bus that are used to select memory locations can be used to select I/O devices. An i/o device is connected to the bus through an i/o port, which from the CPU’s perspective , is an addressable data register like a memory location
Modes of data transfer   If a part of the main memory address space is assigned to IO ports, then the technique is called memory-mapped IO An instruction that causes data to be fetched from or stored at address X becomes an IO instruction if X is made the address of an I/O port
Modes of data transfer   If the memory and IO address spaces are separate , then the arrangement is called  IO-mapped IO A memory referencing instruction activates the read or write M control line which does not affect the I/O devices The CPU must execute separate instructions for Read or write IO When the processor repeatedly checks the status of the I/O in operation for to achieve required synchronization between the processor and i/o device, we say the processor polls the device
Memory mapped i/o data Address read write Main  memory CPU IO port 1 IO port 2 IO port 3 IO device A IO device  B
IO mapped i/o data Address Read M write Main  memory CPU IO port 1 IO port 2 IO port 3 IO device A IO device  B Write M Read IO Write IO
Modes of data transfer   Interrupt driven I/O In programmed IO method , the CPU stays in a program loop until the IO indicates that it is ready for data transfer This is a time consuming process it can be avoided by using an interrupt facility and special command to inform the interface to issue an interrupt request signal when the data is available from the device
Modes of data transfer   In the meantime, processor can proceed to execute another program The interface will keep monitoring the device and generate the signal when the device is ready The CPU will suspend the current task and process the IO transfer
Modes of data transfer   When the flag is set, the CPU is interrupted and is ready to handle I/O After transfer is completed CPU will return to the previous process The CPU responds to the interrupt signal by storing the return address  to a memory stack and control branches to  a service routine that process the I/O transfer
Modes of data transfer   There are two methods called vectored and non vectored interrupts for collecting the branch address In non vectored interrupt , the branch address is assigned to a fixed location in the memory In vectored interrupt, the source that interrupt supplies the branch address This information is called interrupt vector
Modes of data transfer   Handling multiple I/O request Priority interrupt system – this system checks which request should be served first if two or more request comes at the same time Higher priority levels are assigned to requests which if delayed or interrupted could have serious consequences
Modes of data transfer   Handling multiple I/O request The polling procedure can be used to identify the highest-priority  In Polling the status registers , the priority is determined by the way in which the devices are polled The highest priority source is tested first , if interrupt signal is on ,control branches to its ISR. When vectored interrupts are used, we must ensure that only one device is selected to send its interrupt vector code
Modes of data transfer   DMA In Direct Memory Address (DMA) , the interface transfers data into and out of the memory unit through the memory bus without continuous intervention by processor This is done to transfer large block of data at high speed DMA transfers are performed by a control circuit that is a part of I/O interface, called as DMA controller For each word transferred ,it provides memory address and signals that control data transfer
Modes of data transfer   The operation of DMA controller is under the supervision of a program executed by the processor To initiate a transfer , processor sends the starting address and number of blocks and direction of transfer When the entire block is transferred, the controller informs the processor by raising an interrupt Two registers are used for storing the starting address and word count. Third register contains the control flags
Modes of data transfer  -DMA Processor Main  memory Disk/DMA controller DMA  controller Printer Keyboard Network  interface disk disk System bus
Modes of data transfer   To start DMA , the program writes the address and word count into registers and also provides information to identify data for future retrieval Controller performs required operation and on completion, it set the bits of status line The status register can keep information about errors etc. Request by DMA devices are given priority than processor requests for using the bus
Modes of data transfer   The processor generates memory access cycles, and DMA controller can be said to steal memory cycles from the processor. This process is called cycle stealing DMA controller is given exclusive access to the main memory to transfer a block of data without interruption. This is known as block or burst mode
Modes of data transfer   If two DMA controllers try to access bus at same time, an arbitration procedure is necessary and is called as bus arbitration The device that is allowed to initiate data transfers on the bus at any given time is known as bus master  When current master relinquishes control, another device can become bus master Bus arbitration is the process by which the next device to become bus master is selected and control is transferred to it.

More Related Content

PDF
COMPUTER ORGANIZATION NOTES Unit 3 4
PDF
Unit 5
PPTX
Hardware I/O organization
PPTX
Computer organization
PDF
COMPUTER ORGNAIZATION NOTES
PPTX
Basic Computer Organization and Design
PPTX
I/O Channel IBM 370
PDF
COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 3 4
Unit 5
Hardware I/O organization
Computer organization
COMPUTER ORGNAIZATION NOTES
Basic Computer Organization and Design
I/O Channel IBM 370
COMPUTER ORGANIZATION NOTES Unit 5

What's hot (20)

PPT
Unit 5 I/O organization
PPTX
Input output accessing
PPTX
Input Output Organization
PPTX
I/O Organization
PPTX
PPTX
Input - output organzation
PPTX
Input Output - Computer Architecture
PPTX
PPT
Input Output Operations
PPT
Computer organisation
PPTX
Input output in computer Orgranization and architecture
PPT
Unit2 p1 io organization-97-2003
PDF
Unit 4-input-output organization
DOCX
Bc0040
PPTX
Computer organization & architecture chapter-1
PPTX
Io processing
PPTX
PPTX
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT II Embeded Hardware
PPT
Basic computer organization
PPT
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Unit 5 I/O organization
Input output accessing
Input Output Organization
I/O Organization
Input - output organzation
Input Output - Computer Architecture
Input Output Operations
Computer organisation
Input output in computer Orgranization and architecture
Unit2 p1 io organization-97-2003
Unit 4-input-output organization
Bc0040
Computer organization & architecture chapter-1
Io processing
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT II Embeded Hardware
Basic computer organization
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Ad

Viewers also liked (9)

PPTX
The infinitive and the punctuation
DOC
Buses
PPTX
Precision tools
PPT
Unit2 control unit
PPTX
PPTX
Epoxy resin presented by biswajit maity
PPT
Assembly language programming(unit 4)
PPTX
Casting and its types
PPT
Technical Analysis Rudramurthy
The infinitive and the punctuation
Buses
Precision tools
Unit2 control unit
Epoxy resin presented by biswajit maity
Assembly language programming(unit 4)
Casting and its types
Technical Analysis Rudramurthy
Ad

Similar to Unit3 input (20)

PPTX
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
PPTX
Modes of data transfer
PPTX
Computer architecture presentation
PPTX
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptx
PDF
Unit 4-input-output organization
PPTX
Io pro
PPT
PPT
Input / Output organization of computer architecture
PDF
Unit 6
PPTX
inputoutputorganization-140722085906-phpapp01.pptx
PPTX
Modes of data transfer.computer architecture.
PPTX
Data transfer techniques 8085
PPTX
Lecture 9.pptx
PPT
Chapter 6 input output
PPTX
COA-Unit5-ppt2.pptx
PPTX
Computer architecture input output organization
PDF
A transfer from I/O device to memory requires the execution of several instru...
PPTX
Computer organization I/O organization details
PPTX
Computer organization
PDF
computer system structure
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of data transfer
Computer architecture presentation
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptx
Unit 4-input-output organization
Io pro
Input / Output organization of computer architecture
Unit 6
inputoutputorganization-140722085906-phpapp01.pptx
Modes of data transfer.computer architecture.
Data transfer techniques 8085
Lecture 9.pptx
Chapter 6 input output
COA-Unit5-ppt2.pptx
Computer architecture input output organization
A transfer from I/O device to memory requires the execution of several instru...
Computer organization I/O organization details
Computer organization
computer system structure

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation theory and applications.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation theory and applications.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Digital-Transformation-Roadmap-for-Companies.pptx
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...

Unit3 input

  • 3. interrupts Interrupt is a signal ; on receiving this signal, the processor suspends the execution of the program that it currently executing and transfers control to an interrupt handling program At least one of the bus control lines called the interrupt request line should be dedicated for carrying the signal The routine executed in response to an interrupt is called interrupt service routine
  • 4. interrupts On handling the request , the processor must inform the device that made the request. This is done by sending a interrupt acknowledge signal The time delay between the interrupt request and execution of interrupt service routine is called interrupt latency
  • 5. interrupts Basic execution of an interrupt The device raises an interrupt The processor interrupts the program it currently being executed Interrupts are disabled by changing the control bits in the processor status register The action requested by the interrupt is performed by the ISR Interrupts are enabled and execution of interrupted program is resumed
  • 6. interrupts Types of interrupts External interrupts Internal interrupts Software interrupts
  • 7. interrupts External interrupts come from I/O devices, from timing device, from circuit monitoring the power supply etc. Internal interrupts arise from illegal use of an instruction or data. Internal interrupts are also called as traps. The service program that processes the internal interrupt determines the corrective measure to be taken
  • 8. interrupts The internal interrupt is initiated by some exceptional condition caused by the program itself rather than by an external event. Internal interrupts are synchronous with the program, while external interrupts are asynchronous. ie if the program is rerun, the internal interrupts will occur in the same place each time. External interrupts depend on external conditions that are independent of the program.
  • 9. interrupts External and internal interrupts are initiated from signals that occur in the hardware Software interrupt is initiated by executing an instruction. This instruction can be used by the programmer to initiate and interrupt procedure at any desired point in the program The most common s/w interrupt used is an supervisor call , which is used for switching from a user mode to supervisor mode
  • 10. Modes of data transfer Information received from an external device is stored in the memory later for later processing Information is transferred to and from the memory involves can happen in different modes In certain transfers , the CPU acts as an intermediate path ,and in other ones the transfer take place between the memory and external devices directly The different modes are Programmed I/O Interrupt initiated I/O Direct Memory access
  • 11. Modes of data transfer programmed I/O The i/o devices have no direct access to memory CPU registers act as an intermediate storage The operations are the result of i/o instruction written in the computer program Once a data transfer is required , the CPU is required to monitor the interface to see when a transfer can again be made The programmed instructions has to take care of everything that is taking place in the interface unit and the I/O device
  • 12. IO mapped i/o Data valid Address bus i/o bus CPU Status F register IO device interface Data register Data accepted Data bus I/o read I/o write
  • 13. Modes of data transfer programmed I/O The device transfers data one at a time When data is available the device places it in i/o bus and enable data valid line Interface accepts the byte into data register and enables data accepted line Interface sets the flag and disable data valid line CPU checks stats flag and if it is sets, CPU reads data and flag is cleared either by CPU or interface Data accepted line is set invalid
  • 14. Modes of data transfer I/O addressing In systems using programmed i/o the CPU ,M and IO devices usually communicate through system bus The address lines of the system bus that are used to select memory locations can be used to select I/O devices. An i/o device is connected to the bus through an i/o port, which from the CPU’s perspective , is an addressable data register like a memory location
  • 15. Modes of data transfer If a part of the main memory address space is assigned to IO ports, then the technique is called memory-mapped IO An instruction that causes data to be fetched from or stored at address X becomes an IO instruction if X is made the address of an I/O port
  • 16. Modes of data transfer If the memory and IO address spaces are separate , then the arrangement is called IO-mapped IO A memory referencing instruction activates the read or write M control line which does not affect the I/O devices The CPU must execute separate instructions for Read or write IO When the processor repeatedly checks the status of the I/O in operation for to achieve required synchronization between the processor and i/o device, we say the processor polls the device
  • 17. Memory mapped i/o data Address read write Main memory CPU IO port 1 IO port 2 IO port 3 IO device A IO device B
  • 18. IO mapped i/o data Address Read M write Main memory CPU IO port 1 IO port 2 IO port 3 IO device A IO device B Write M Read IO Write IO
  • 19. Modes of data transfer Interrupt driven I/O In programmed IO method , the CPU stays in a program loop until the IO indicates that it is ready for data transfer This is a time consuming process it can be avoided by using an interrupt facility and special command to inform the interface to issue an interrupt request signal when the data is available from the device
  • 20. Modes of data transfer In the meantime, processor can proceed to execute another program The interface will keep monitoring the device and generate the signal when the device is ready The CPU will suspend the current task and process the IO transfer
  • 21. Modes of data transfer When the flag is set, the CPU is interrupted and is ready to handle I/O After transfer is completed CPU will return to the previous process The CPU responds to the interrupt signal by storing the return address to a memory stack and control branches to a service routine that process the I/O transfer
  • 22. Modes of data transfer There are two methods called vectored and non vectored interrupts for collecting the branch address In non vectored interrupt , the branch address is assigned to a fixed location in the memory In vectored interrupt, the source that interrupt supplies the branch address This information is called interrupt vector
  • 23. Modes of data transfer Handling multiple I/O request Priority interrupt system – this system checks which request should be served first if two or more request comes at the same time Higher priority levels are assigned to requests which if delayed or interrupted could have serious consequences
  • 24. Modes of data transfer Handling multiple I/O request The polling procedure can be used to identify the highest-priority In Polling the status registers , the priority is determined by the way in which the devices are polled The highest priority source is tested first , if interrupt signal is on ,control branches to its ISR. When vectored interrupts are used, we must ensure that only one device is selected to send its interrupt vector code
  • 25. Modes of data transfer DMA In Direct Memory Address (DMA) , the interface transfers data into and out of the memory unit through the memory bus without continuous intervention by processor This is done to transfer large block of data at high speed DMA transfers are performed by a control circuit that is a part of I/O interface, called as DMA controller For each word transferred ,it provides memory address and signals that control data transfer
  • 26. Modes of data transfer The operation of DMA controller is under the supervision of a program executed by the processor To initiate a transfer , processor sends the starting address and number of blocks and direction of transfer When the entire block is transferred, the controller informs the processor by raising an interrupt Two registers are used for storing the starting address and word count. Third register contains the control flags
  • 27. Modes of data transfer -DMA Processor Main memory Disk/DMA controller DMA controller Printer Keyboard Network interface disk disk System bus
  • 28. Modes of data transfer To start DMA , the program writes the address and word count into registers and also provides information to identify data for future retrieval Controller performs required operation and on completion, it set the bits of status line The status register can keep information about errors etc. Request by DMA devices are given priority than processor requests for using the bus
  • 29. Modes of data transfer The processor generates memory access cycles, and DMA controller can be said to steal memory cycles from the processor. This process is called cycle stealing DMA controller is given exclusive access to the main memory to transfer a block of data without interruption. This is known as block or burst mode
  • 30. Modes of data transfer If two DMA controllers try to access bus at same time, an arbitration procedure is necessary and is called as bus arbitration The device that is allowed to initiate data transfers on the bus at any given time is known as bus master When current master relinquishes control, another device can become bus master Bus arbitration is the process by which the next device to become bus master is selected and control is transferred to it.