Monday, January 14, 2013

Multitasking

As we start the new year, many people make New Year's Resolution saying they are going to do this and stop that and change this and ...  The list just goes on. The resolution people are going to be trying to do many things and, more often than not, they try to do them at the same time. They read a book but then stop to answer the phone then cut that short to answer a question and only give a short answer because the program they want to watch on TV is coming on and during the commercials, they try to read a little in the book they started. This is called Multitasking and it comes from the computer industry. A computer is controlled by a specialized program called the Operating System. Most modern operating systems allow more than one program to seem to run at the same time or multitask. This is why you can have a web browser open and see it updating information while you type in a word processor to make out your Christmas list and all the while your antivirus program is checking to make sure no one is trying to break into your computer. The operating system gives the illusion of multiple programs running simultaneously by fitting in some work on one program while another program is waiting for you to hit the next key or another program is waiting for a website to respond. There is always some down time in a program when it doesn't need the full attention of the computer. And, if a program tries to hog up too much of the time, the operating system will suspend one program for a short time while it services another program.

Most of the time, this works pretty well but I'm sure we've all run into times when the computer seems to slow to a crawl as its multitasking gets bogged down. Partly, this comes from the operating system making a bad decision about which program can be interrupted and for how long. Also, switching too often between programs takes a certain amount of time. The operating system has to save the state of one program before suspending it and switching to a second program so that you can re-entry the first program later. Saving the state of the first program then getting the last known state of the second program to prepare to run the second program is called Context Switching and it takes a certain amount of time. If you are switching tasks too often, you spend most of your time context switching which wastes time. You can get to the point where all of your time is taken switching between tasks.

There are a lot of research papers written about this and all the ones I have read point out that people are terrible at multitasking. But you don't have to read a bunch of dry research papers to come to this conclusion yourself. I'm going to tell you about a short test you can take yourself to prove the point. The test came from a training class our entire software department took. We use a process called Agile Development to create our software programs. This is particularly useful for complex development projects that involve teams of programmers. You can read more about Agile Development in the Wikipedia article and at the site of the vendor (VersionOne) who gave our class.

Here's the demonstration. All you need is a piece of paper, a pencil and a way to time something to the second. You do the demonstration in two stages using the example here:

In the first stage, you write the characters in columns. So, you'll write 1, I, A, 2, II, B, 3, III, C etc. Stop the timer when you get to 'Z'. In the second stage, you write the characters in rows. So, you'll write 1, 2, 3 .. 26 then start the second row and write I, II, III ... XXVI and finally start the last row and write A, B, C ... Z. Again, stop the timer when you get to 'Z'. In the first stage, you are multitasking because you're shifting your focus (Context Switching) from one character style to a different character style. In the second stage, you are writing characters of the same type all along the row so there is less Context Switching. I won't tell you how it turns out. You do the timing. But I think you'll find that you're not as good at multitasking as you think.

1 comment:

Cindy said...

I used to be good, then I got married and stopped worrying so now I don't have to multi-task.