Wednesday, July 23, 2014

When should one use Polling and when should one use Interrupts?

Both the mechanisms have their own pluses and minuses.

We should use interrupts when we know that our event of interest is-

1. Asynchronous
2. Important(urgent).
3. Less frequent


We should use polling when we know that our event of interest is-

1. Synchronous
2. Not so important
3. Frequent(our polling routine should encounter events more than not)


For any clarifications or if you have any suggestion please post comments below.

No comments:

Post a Comment