Presentation is loading. Please wait.

Presentation is loading. Please wait.

Events and Interrupts. Overview  What is an Event?  Examples of Events  Polling  Interrupts  Sample Timer Interrupt example.

Similar presentations


Presentation on theme: "Events and Interrupts. Overview  What is an Event?  Examples of Events  Polling  Interrupts  Sample Timer Interrupt example."— Presentation transcript:

1 Events and Interrupts

2 Overview  What is an Event?  Examples of Events  Polling  Interrupts  Sample Timer Interrupt example

3 What is an Event?  Wikipedia: In computing an event is an action that is usually initiated outside the scope of a program and that is handled by a piece of code inside the program.

4 Examples of Events  Timer Elapses  User input (Mouse/Keyboard)  Segmentation Fault

5 Polling  Wikipedia: Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity.

6 Interrupts  Wikipedia: In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.

7 Sample Timer Interrupt  We will need to use  We need to catch if an invalid interrupt happens  We need to handle the correct interrupts  We will make lights blink.

8 Things to remember  Use polling when you can.  Use interrupts when you need.


Download ppt "Events and Interrupts. Overview  What is an Event?  Examples of Events  Polling  Interrupts  Sample Timer Interrupt example."

Similar presentations


Ads by Google