The hidden costs of the multi-tasking software developer

October 19, 2007, 03:40 PM —  ITworld.com — 

We software developers work with words for a living. We have words for everything. At the drop of a hat, we will appropriate an existing English word/phrase and bend it to some new purpose. Words like "function" or "service" or "filter" for example. Phrases like "load balancing" or "multiple inheritance" or "context switching"...

Hang on a moment. That last one is a bit different I think. Back up the truck a little here. The flow of language I speak of is not all one way. There are times when the software world has a word/phrase for something which flows from geekdom into the mainstream. This is one of them I think.

Yesterday, a colleague complained that the timesheet system we use at my day job does not have an entry for context switching[1]. The geeks in the room knew immediately what she meant but everyone else was baffled.

The phrase relates to a common computing concept of a single CPU juggling many tasks at the same time. In order to give the illusion that lots of things are going on at the same time, the CPU jumps very quickly between a bunch of separate tasks creating the illusion of parallel activity.

Obviously, for this to be an effective strategy, the time it takes to switch from one task to another, is critical. This process is known as context switching and CPUs typically do it very, very quickly indeed.

For human beings however, context switching is a much, much slower process. Consider a software developer working on multiple, distinct projects at various times. If the a.m. is to be spent on project A, that can easily go into the timesheet. No problem. If the afternoon is to be spent on project B, adding that to the timesheet is a little more problematic. The problem arises from the non-trivial amount of time it can take to mentally switch from project A to project B. The time involved can be anything from minutes to hours and even days.

Over the course of a year, this time can really add up and it can be infernally difficult to explain to non-technical folk why context switching can be so time consuming. In extreme cases, developers can spend more time context switching between projects than they do actually making progress on any project.

Which brings to mind another phrase us developers like to use -- a "disk thrashing"[2]. This occurs when there isn't enough memory and stuff needs to be parked to disk only to be hauled in again, the next time the context switches.

It is easy to spot when this happens as the machine tends to make unpleasant whirring noises and flash red a lot. Come to think of it, this is often the best way of spotting developers caught in endless context switches too.

[1] http://en.wikipedia.org/wiki/Context_switch


[2] http://www.webopedia.com/TERM/D/disk_thrashing.html

ITworld.com

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff

Enterprise 2.0 Implementation
By Aaron C. Newman, Jeremy Thomas
Published by McGraw-Hill
Learn more!

Deploying Cisco Wide Area Application Services
By Zach Seils, Joel Christner
Published by Cisco Press
Learn more!

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources