2.1.5
Interrupts
Interrupts
Interrupts
Interrupts are an essential part of modern computer systems that tell the CPU when something needs attention.
Interrupts
Interrupts
- An interrupt is a signal from a piece of software or hardware that tells the CPU that it needs some attention.
- Interrupts are an efficient way of telling a computer when a job needs to be completed.
Hardware interrupts
Hardware interrupts
- Hardware interrupts can occur when an input or output operation completes.
- Hardware interrupts can also involve errors, like when a printer runs out of paper.
Software interrupts
Software interrupts
- Software interrupts come from pieces of software that need to terminate or request services from the OS to complete a task.
- For example, opening a document.
Alternatives to interrupts
Alternatives to interrupts
- One alternative to using interrupts is polling.
- Polling is when the CPU polls (asks) every piece of software and hardware if it needs anything doing.
- This would be a very inefficient process.
Interrupt Service Routine (ISR)
Interrupt Service Routine (ISR)
An interrupt service routine is a set of instructions that need to be done as part of an interrupt.
ISR
ISR
- An interrupt service routine is a set of instructions that need to be done as part of an interrupt.
- When an interrupt service routine has been completed, the CPU will go back to the set of instructions it was doing before.
Process
Process
- As an interrupt arrives at the CPU it comes with a flag to indicate the priority of the interrupt.
- This interrupt could be higher importance than the set of instructions it is currently working.
- The interrupt pushes the current instruction and all the contents of the registers in the CPU to a stack.
Process cont.
Process cont.
- The CPU will then complete the interrupt service routine and then load the registers back in from the stack and continue where it left off.
- At the end of each fetch, decode, execute cycle, the CPU checks for interrupts and their priorities before continuing on.
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered