Wednesday, July 29, 2009

Interruption and the Cost of Context Switching

I've been thinking about interruption lately. I shared some thoughts about anticipating interruptions in an article about the probability of interruption. More obviously, when an interruption happens it costs me something. Specifically, I have to switch from doing one thing to doing something else. There's a non-zero cost to focusing my mind on a new task. That effort is pure overhead. It's like energy lost to friction or electricity spent "heating the whole neighborhood" (as our parents used to say). If one can reduce interruptions, one should be able to reduce context switching costs.

I use a small program that I wrote to record the time I spend working. When I switch tasks, I press a few keys to indicate what I'm working on now. At the end of the month, I use this data to generate invoices, etc. Even though I don't record every context switch in my time clock program, I do record many of them. Reviewing the data for the last 18 months shows that I worked on 1,635 unique tasks. I switched context 7,768 times (subjectively, most of those were caused by interruptions). On average, I spent 25 minutes working on a given task before switching to something else. If I assume it takes me two minutes after a context switch to become productive again (which is a very conservative estimate), it means that I spent 7% of my total working time just switching between responsibilities. That 7% produced very little value for me or my clients.

Managing interruptions is an important component of enhancing one's productivity. I'd be thrilled if I could effectively have 7% more time in a day.

Friday, July 17, 2009

Probability of Interruption

I just got back from a one hour hike in the hills near my house. While I was hiking, I had my phone with me. According to telephone records for the last 10 weekdays, I received 2 text messages and 1 phone call (on separate days) between the hours of 2 pm and 3 pm. So during my hike, the probability of interruption was roughly .3. If I used a service to receive notifications of new email on my iPhone, the probability of interruption from incoming email would have been about .93 (based on my email records from 2008). In my typical office environment there are also possible interruptions from IM, Twitter and kids. The probability of receiving an interruption in my office during that hour approaches 1.

Subjectively, the probability of interruption strongly influences my stress level. A low probability of interruption encourages relaxation while a high probability causes stress and reduces concentration.

Why does the probability of interruption and not the interruption itself seem to cause stress? I think it's because I anticipate being interrupted. For example, when I travel for work, I often leave my house early in the morning to catch a flight. As I go to bed the night before departing, I set an alarm (a planned interruption) to wake me up. I often wake up throughout the night anticipating the upcoming alarm even though it hasn't gone off yet. I lose sleep without the interruption actually happening.

Another anecdote: Several years ago, I worked in a traditional office environment. While at my desk, I could be interrupted by an email, a phone call or a coworker across the room. When I left my desk and walked down the long hallway to the rest of the building, I always felt a release of tension. As I rounded the corner to pass another coworker's office, I felt an increase in tension. It was as though I was walking the hills and troughs an interruption probability function.

Probability of interruption may explain why some people are most creative when in the shower or on the toilet. There's some indication that stress reduces creativity. Because of social taboos, the probability of direct interruption while bathing or defecating is practically 0. That reduces stress and allows one to be creative.

I suspect that intentionally limiting possible interruptions can increase one's creative throughput.