Scheduling and Responsiveness

In a single processor system (without Hyper Threading), the OS can only send one instruction thread to the CPU for execution at a time.  But, you can run two applications at the same time and they can both be using up CPU time.  In order to understand how this is possible, you have to understand a bit about how scheduling works.

As its name implies, the OS' scheduler schedules tasks.  It takes the unlimited number of tasks that are requested of the OS, and schedules them to get done in the quickest way possible (in theory) on limited hardware resources. 

When running a single application, the job of the scheduler is simple - the single active application gets all of the CPU's time for as long as it needs it.  But what happens when you switch away from that active application and try to click on the Start Menu?  Your usage experience would be pretty poor if you had to wait until your active application was done with its tasks before the scheduler would take the time to handle your Start Menu request.  Imagine that your active application was 3ds max and you were rendering a scene that was going to take hours to complete. Would you be willing to wait hours for your Start Menu to appear?

Modern day OSes understand that this linear approach to scheduling isn't very practical, so they support pre-emptive multitasking, meaning that one task can pre-empt another before it is finished executing, and steal CPU time so that it may get some work done as well.  In the previous example, the Start Menu request would pre-empt the 3D rendering process and your menu would pop up and the 3D rendering would resume immediately following that.  Given that microprocessors these days are so fast, this rotation through tasks sent to the CPU occurs seamlessly to the end user, or at least it does most of the time. 

There are times when the scheduler's work is not as transparent as it should be.  In some cases, especially in Windows, processes will not always be able to pre-empt one another.  If you're running two time-consuming, CPU intensive tasks, you may not notice, but if you're running one and trying to open a file or just click on a menu at the same time, then the hiccup is far more noticeable.  The end result is usually a significantly delayed reaction to your input, such as a menu taking multiple seconds to appear instead of being an instantaneous response to your clicking.  Anyone who runs more than one application at a time has undoubtedly encountered this type of a situation. Luckily, there are solutions.

Intel's Hyper Threading was one way around the problem. By fooling the scheduler into thinking that it can dispatch two threads simultaneously, situations like the one above were usually avoided assuming that the CPU had the appropriate resources free.  Dual core is another solution to the problem, a far more robust one, since you literally have twice the processor resources.

The result of using a HT enabled or dual core system is better responsiveness when multitasking, but how do you quantify that?  Unfortunately, it is extremely difficult to quantify response time in these situations.  Even if we could easily quantify the response time improvements, is a snappier system when multitasking worth more than another 15% more performance in single threaded applications?  How about 25%?  It's a very different way of looking at the impact of a CPU to overall system performance, but it is an issue that we will have to tackle a lot more moving forward. 

The Intangible Dual Core Characterizing Dual Core Performance
Comments Locked

141 Comments

View All Comments

  • haveblue128 - Wednesday, July 6, 2005 - link

    Only downside but I think a majorleague heat solution should make everything sweet
  • haveblue128 - Wednesday, July 6, 2005 - link

    Oh Please give us a break. If you want to be a purist, go live in the woods without clothes. I say that multitasking makes my day a breeze.
    Whats your dilemma??
  • haveblue128 - Wednesday, July 6, 2005 - link

    Wow-I just purchased a new sys with an Intel Dual CPU setup. As a multitasking monster on my machine, I was always having crashes in the past.
    I think that is gone with George Bush in 2008. THe good news is the dual core pair is already hear and ready to run. Give them a try-no downside, albeit a good bit of heat. That is something I will need to work on, but....
  • peufeu - Monday, May 9, 2005 - link

    I forgot to mention... gentoo linux ;)
  • peufeu - Monday, May 9, 2005 - link

    Dual CPUs to compensate for the inept MS Windows.
    Interesting.

    I'm torturing a webserver I just wrote, on my laptop. It's in Python. Right now it's serving about 2000 requests per second with 1000 concurrent connections.

    I don't even notice it's running. The CPU gauge is at 100%, so what ? Nothing special. As reactive as usual. It doesn't swap. The harddisk even put itself in standby....

    Go, bill, go !


  • shady28 - Sunday, April 17, 2005 - link


    Making special tests just for these processors seems a bit contrived to me. In particular, comparing dual core processors to a Pentium 4 with HT disabled, in a multithreading/multitasking benchmark, is just plane lame.

    I would have been a lot more interested in seeing how dual core compares in multitasking vs dual opterons or dual Xeons. Right now it looks like dual core is slower at doing one task at a time, suprisingly not that much faster at doing two tasks at a time than HT Pentium 4s. The only exceptions were the off the wall tests done at the end.

    Since these new 'benchmarks' are made to simulate 'real life use', does that mean that all Anand's previous reviews were bogus?

  • JimGunn - Wednesday, April 13, 2005 - link

    I think I will want one of these for my next video editing & encoding workstation. Will come in handy for HDV post I am sure!
  • BoBOh - Monday, April 11, 2005 - link

    Where are the code compile tests. We're not all gamers, some are software developers! :)

    BoB
  • warath - Friday, April 8, 2005 - link

    I can't wait to see 64-bit dual cores! :)
  • WoodenPupa - Thursday, April 7, 2005 - link

    Well, I'm not a tech whiz like everyone else here, but here's my 2 centavos...

    I can attest to the fact that every machine I ever buy, I bring it to its knees. I usually wait several generations before I upgrade in order to get a more profound effect. Yet that strategy doesn't seem to matter because no matter how fast my computer is, I find that my NORMAL computing habits end up crushing the CPU and everything else.

    I use Cool Edit Pro and some other audio programs, and I am also a chess player, and like to anyalyze games in the background with Fritz or Chessbase, both of which allow for gigantic hash tables. So as a typical case I like to do wave transforms and chess analysis as background items while I compose e-mails or use Word for more serious writing. Naturally I like to listen to music at the same time, but usually I have to give that up. Needless to say, all of this stuff cripples my computer---I'm due for an upgrade, I know---my box is a 2.53 GHz P4, 1 GB of Rambus 800 (no groaning, please), a GF4 ti 4600, 120 GB HD, I'm not even sure what the cache on that is, I don't think it's 8 or 5 MB---feels more like 2.

    I usually end up quitting the Chess program or the Mp3 player---once in a while I can do all of this stuff concurrently if the wave transforms on cool edit aren't too complex, and I minimize the hash tables on the chess program.

    Ideally I want everything to be instantaneous, but...:) Anyway, from what it sounds like, I need a dual or even quad processor setup. Because even with all the above mentioned programs running, I can think of more I would like to add. I'm a monster multitasker and really like to kick a computer right in the face, to show it who's boss. I'm tired of winning, though---I'd love it if one day the computer just scoffed at everything I threw at it. Sadly, I don't think it'll happen in my lifetime.

    Should I upgrade to a dual core, or should I save and get a true multi-CPU Mobo like a quad Xeon??

Log in

Don't have an account? Sign up now