Exceptions are instructions that interrupt the logical control flow. Processes use them to request services from the kernel. Operating systems use them to communicate with hardware and processes. Hardware uses them to indicate the status of a device.
There are two types of exceptions whose distinction is useful for using computers without distraction.
enable a device to signal when it needs attention.
repeatedly checks a device's status.
If a button is pressed on a keyboard, it will interrupt the currently executing instructions so that the input can be recorded. If the keyboard was unable to interrupt, the computer would have to poll, constantly check the keyboard for input. This would require a lot of extra instructions because the check for input has to be repeated. The system would run slower.
This is similar to how people use their phones. Users waste a lot of time if they have to check their phone to find out if there is a new message. Instead, they turn on notification sounds or vibrations to interrupt them when they receive a new message so that they can give their attention to their other tasks.
Many believe that getting notifications from your computers is a time-wasting distraction. This is likely because they receive notifications that weren't worth interrupting their other flows. In fact, creating notifications is more efficient than checking for new information because the attention is only shifted when there is something worth checking.
To make your work as efficient as an interrupt exception, turn off notifications that you don't need, experiment with new notifications that automatically show you information that you spend a lot of time looking for. Like a processor that just performs its given instructions, you can focus on your work without having to split your attention.
The explanation of technical subjects is based on Jim Skrenty's lectures at The University of Wisconsin.