Guys, Want More Confidence?

Building your Self-Confidence is the most powerful thing you can do to boost your Engineering Career.

A step-by-step Program for Building Self-Confidence

Click Confident Man and Start Building Your Confidence Today

Event Driven vs Polling

PDF Print E-mail
Written by Graham Stoney   

You probably don't need me to tell you that event driven systems are more efficient than polling. In any non-trivial embedded or real-time system, chances are that the operating system model is interrupt- and event-driven; and your custom drivers and application software should be too.

Polling sometimes gets used because it's simpler to implement and easier to get right. It's not just access to hardware devices where polling can creep into embedded systems, it also sometimes gets used in higher level software. Any time you have a loop that waits for something other than a blocking event, you're using polling; and that's sacrificing your system efficiency.

Any event-driven system can be modelled as a state machine. Complex systems usually require multiple interacting state machines, or perhaps a whole heirarchy of them, to be modelled optimally. If you can't find an event trigger for every action in your system, it's a symptom that polling may have crept into your design.



Social Bookmark this page:Reddit! Del.icio.us! Google! Live! Facebook! StumbleUpon! Spurl! Yahoo! Ask!
 

Add your comment

Your name:
Your email:
Subject:
Comment:

Sponsored Links