Writing

Software, technology, sysadmin war stories, and more. Feed
Monday, October 22, 2012

Multitasking and response times

I'm surprised by just how "single-threaded" some people can be at times. I've encountered this a lot with different folks in different situations, but it usually comes up when computers are involved. I guess it's because the computer can inherently handle lots of things at once, and with a big enough display, can also show them to you as they happen.

I've been discovering that some things that seemed unusual but possible for me are completely out of this world for others. It's not even anything which seemed particularly tough. I'll give a few examples to try to explain what I mean.

Back when I was taking classes online to finish my degree, there would be scheduling anomalies from time to time. One quarter had two classes scheduled at the same time: Wednesdays at 5. One of them was a project management class where the prof frequently called on people to comment on things - he had a full whiteboard/slide system with audio, and we had a chat room to respond.

The other class was just some dull Java stuff with a professor who tended to do periodic pings to make sure everything was still working and would occasionally check to see if there were any questions. Not many people showed up, but I considered it a good idea to make an appearance whenever possible. It was a good way to be sure he wasn't pulling anything weird on me in terms of requirements for our regular assignments.

I suppose I could have watched the Java class from the recordings (all classes were recorded), but that would mean giving it another 90 minutes of my life in addition to the 60 minutes my project management class demanded. It was bad enough that I had to suffer through it, but giving it that much more time when I was also working full time? Come on.

So, I decided to double things up. The school's site would let you log in multiple times and join different classrooms from different sessions, so I just grabbed two laptops and put them side by side on a table. One of them was my dumb Windows machine I had purchased explicitly for school, and the other was my usual Mac. I connected headphones to one and turned the speaker volume way up on the other, and just let it run.

Somehow, I managed to follow both of them and even answered questions on the PM side while posing a few on-topic comments to the Java side to at least make it look like I was interested. I found that showing up and doing this sort of thing was a good way to make sure any judgement calls about grading tended to go my way. My teachers hated talking to an empty room, even though it was a virtual classroom held on a web site. The fact that nobody showed up tended to bug them, even if it was all being recorded for later playback.

I described this to a friend back when it was happening and she seemed to think I was nuts. Well, maybe it was kind of crazy, but the alternative was blowing even more time (by watching the recording) and not making an appearance when the prof was there doing it live.

This also came up a few times in a troubleshooting context. I'd have someone at my desk, and I'd have a couple of xterms open on my beautiful huge company-provided display. I actually had two of them, since I joined the company back when they still did that sort of thing. It meant I usually had a whole bunch of windows open with stuff running in parallel.

Anyway, more than once, we'd be doing something, and it would involve starting a process that might run for a while and then return a result many seconds or minutes later. While that was going on, sometimes I'd refresh graphs showing latency, or check to see if certain errors had cleared, or whatever. The point is, eventually my xterm would kick out a result and drop back to the prompt. I could then take that result and key it into some other web page (like to update a bug tracking system, for instance) and carry on with something else.

So, I'd be there, just chatting with this person, and the number would come up, and I'd grab it and plug it into the page, and would keep on going, and they'd miss it. It's like it never actually happened, and it was never on screen, but of course it was, since I did my usual clickity-click to submit the form. Upon inquiring, sometimes I found out that when they were talking, they weren't watching the screen, or they had zoned in on one specific xterm of mine and missed the other one returning to the prompt.

I wondered how much this affected the time to resolution for certain issues. I mean, I'm really picky about response times when I'm doing things in an interactive shell environment. If something is being stupid and is taking forever to finish, I have no qualms about hitting my hotkey to pop up another xterm and going out to do something in parallel.

I also have no problem "typing ahead" in a terminal to supply the entire command line for the next thing I'm going to run while the last thing is still running. I can do this safely when I know that the current command isn't going to read from stdin and eat my input. This leads to a messy display, sure, and some people have actually commented on the fact that there was garbage in the output. I've had to explain that it's not garbage, and in fact it's just the stuff I was typing for the next command.

Really, when there's something to be done and I already know all of the steps between me and my goal, the only limiting factor is how quickly I can get it typed in and start things running. If you combine that with a willingness to fork off multiple windows and let them start going according to when things are ready, it can look pretty intense. I'm not doing it to show off. I'm just doing it because that's just how I roll all the time, even when nobody else is around.

As far as I'm concerned, "fast" is something which gives me the output I requested before I can get my finger back up from the ENTER key. Anything else is "slow".

Using that metric as a guide, I can safely say that despite having multiple cores, clocks in the GHz range, gigabytes of memory, terabytes of disk space, and many more things which completely blow away computers of the past, far too many things I do on my machines even today are still "slow".

I guess this makes me an atypical user.