board chip circuit circuit board

Context Switching

Being focused and productive is a great feeling. When you switch tasks to something else, there is a delay before you reach maximum focus on the new thing. That delay is the cost of context switching.

Recognizing when you are context switching, and managing it, is an important productivity and happiness skill.

Where The Term Comes From

“Context switching” is a term from computer science. A CPU (central processing unit) is what does a computer’s thinking. It can only focus on one program at a time.

A CPU can appear to run two programs at a time. But it is actually switching back and forth between the two programs. Each time it switches, it spends time unloading the details (context) of one task and loading the new context.

The fastest way for a CPU to run two programs is to finish one completely, then finish the next. If it tries to run both at once, it will take longer. This is because of the time spent switching context back and forth.

More can be said if we want to get into the technical details — like the effect of multiple cores or I/O bottlenecks — but the point remains that, when a computer tries to do too much at once, everything takes longer.

The Cost of Context Switching

Most job tasks require some focus. Maybe you have to keep in mind what client you are dealing with. Maybe you have to keep track of where you are in a list of steps. “Context” is the set of things you keep in mind while you work.

When you switch context to another task, you will need extra time to focus on the new task. That is true whether you are taking a moment to read a notification, or completely switching to some new priority.

Context switching can be quick when you are well rested and familiar with the task. It takes longer when you are tired or unfamiliar with the task. It can take a long time to switch context if you really care about the previous task. You might still be thinking about the previous task for many minutes.

Here’s a thought experiment: say it only takes you two minutes to go from 100% distracted to 100% focused. Every 10 minutes, a notification distracts you (email, instant message, etc.) In an 8 hour day, you will lose close to an hour and a half to context switching.

In reality, it typically takes more than two minutes to reach maximum focus. But you do make progress even when distracted, so the math is more complicated than that.

Ways To Stay Focused

Depending on your situation, there may be unavoidable distractions. Perhaps you have to answer phone calls, or have distracting people in your work place. So you may not be able to avoid distraction completely.

The key is to control what you can control. For example:

  • Notifications – do you get a lot of emails or other messages throughout the day? If you glance at that notification, you are taking your focus off your primary task. Consider turning off message notifications for an hour so you can focus. If you can, deal with messages once per day, then turn them off for the rest of the day.
  • Time boxing – do you have a lot to worry about? Make the conscious decision to focus on one thing for a certain amount of time. Give yourself permission not to think about the other tasks during that time. If your mind is constantly flitting between what you’re doing and what you’re worrying about, you aren’t really focusing on anything.

The general idea is to intentionally pick something to focus on for a certain amount of time.

Trauma

As important as it is to work, there are things that are more viscerally urgent.

An example that school teachers see is traumatized kids. Children have a hard time focusing on school when they are hungry or worried about getting hurt when they get home. Their minds will be constantly flitting back to their visceral concerns. This context switching limits their ability to focus on school.

That’s an extreme example, but adults can have similar issues. Concerns about safety, relationships, or grief are very distracting. Some times, it is OK to work instead of dwelling on those things. Work can be a welcome distraction.

However, consider whether that’s wise in your case. If a phone call, or a few days off work, would improve the situation, try to to do that. Especially if not dealing with it will reduce your productivity for weeks or years.


Posted

in

by

Tags:

Comments

One response to “Context Switching”

  1. […] get used to that. In the mean time, the thought interruptions are a kind of frequent, involuntary context switching. Distracting and […]

Leave a Reply