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

  • hosto - Tuesday, April 5, 2005 - link

    #110 - did you notice better performance on the p4 that you used to have? because on single instance of firefox, the amd chips blow the p4's away....yet, when i have multiple panes open with my a64 it chugs quite nastily if there is flash content. Is there some way that macromedia have optimised the flash player for the P4 for firefox? i wonder if the same slowdowns would be noticeable with internet explorer, or if it is specific to the player in firefox/mozilla?
  • xsilver - Tuesday, April 5, 2005 - link

    #106
    I hope you mean in multithreaded apps, as has been said many times before... single threaded apps run the SAME, therefore no benchies were included

    #108
    So true --- its the only reason why I wish I still had my p4HT over the amd64
  • xsilver - Tuesday, April 5, 2005 - link

    ANAND ... for your gaming benchmarks I recommend a scattering of commonly used programs

    1) the lot of antivirus, trillian, firefox, spyware running in background
    2) gaming related stuff like teamspeak or an audio cd playing in the background (to drown out the crappy game music :)
    any other gaming related stuff would be good too....

    if dual core proves itself, there should be no performance drop, whereas the single core will drop somewhat
  • hosto - Tuesday, April 5, 2005 - link

    thats funny the comment about the flash going slowly in firefox on the AMD processors in the benchmark..ive noticed the same on my athlon64 3200+ that i cannot have too many flash sites opening without it chugging.
  • sprockkets - Tuesday, April 5, 2005 - link

    this would be funny, but if simply having another core helps out with responsiveness and nothing else, I'm getting the dual VIA C3 mini-itx board hahahahaha!

    OK, not dual core, but hell, it's still small enough and they take only 7w each.
  • ksteele - Tuesday, April 5, 2005 - link

    I would like to see some "apple to apple" benchmarks by removing the clock speed disparities.

    Pentium D 820 2.8Ghz versus Pentium 4 520 2.8Ghz
    Pentium D 830 3.0Ghz versus Pentium 4 530 3.0Ghx
    Pentium D 840 3.2Ghz versus Pentium 4 540 3.2Ghz

    This will allow us to see the true benefit of dual cores without the speed differences.
  • mino - Tuesday, April 5, 2005 - link

    sorry for some typpo's
  • mino - Tuesday, April 5, 2005 - link

    #101 and some others
    You'are mistaken, Inquirer is NOT to be compared to AT. Is is solely news/romours/opinions site and THAT IS THEY ARE BEST AT ! The practical(not theoretical as at CNN...)non-existence of censorship makes them what they are.
    One thing for sure: they make biased and wrong stance against AT on this, but this is what they do almost all the time.

    The beauty of The Inquirer's approach to journalism is that it let's the reader choose which report is to be taken seriously. They even state it in articles regularly.

    I just hate those juornalists that usurp the right for correct judgement just for themselves.

    Just to make clear: I'm in no relation to The Inq. except readeship.

    To Anand:
    This is one of the best articles(at all) a have read so far. And it looks like it's going to be even better when it's completed. Keep up the good work.

    To topic: One thing should be noted. That is that the VERY poor performance at the singlecore(AMD & intel HT off) scenarios is NOT to be atributed to their inferiority but mostly to the incredibly crappy windows scheduler. Availability of multiple CPU's to it just partly hides its inefficiencies. Let's face it. HT is mainly a Windows baby. No way Intel would make the trouble developing it *NIX system were the main ones.
  • ksteele - Tuesday, April 5, 2005 - link

    I noticed the dual core's have 1MB L2 cache. Does this mean they are 5xx based? Do they support Intel EM64T, XD Bit and Enhanced Intel Speedstep Technology?
  • Gatak - Tuesday, April 5, 2005 - link

    #83 So you do not think that a game can utilize two CPUs? Run physics and I/O on one Core and render 3D and textures on the other.

    Also, Even though a game is single threaded, you still have the OS in the background, you have the video and audio card drivers running in separate threads. harddisk I/O and interrupt handling is also spread out on multiple cores.

Log in

Don't have an account? Sign up now