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

  • Questar - Monday, April 4, 2005 - link

    Is Xvid a relevent test? It's not multithreaded
  • boban10 - Monday, April 4, 2005 - link

    hi. thanks to responding.
    i have some sugestion for you work.
    can you test this:
    http://forum.doom9.org/showthread.php?s=&threa...

    easy real media producer, you get it here:
    http://redcheek.net/erm/ermp_full.zip

    its free..
    can you try to encoding some things, i wannt to see how much diference it it on one and two cpu, and would be nice if you can test with athlon xp too, because i wannt to see how much gain i get with dual-core cpu...

    then some more programs that suport dual-cpu:
    TMPGEnc , Photoshop. Premiere pro ...

    thanks...
  • Anand Lal Shimpi - Monday, April 4, 2005 - link

    Thanks so much for the comments, keep em coming in. This is just the first part, there's more coming. I've got another NDA tomorrow morning but then after that it's more dual core. Let me know what you want to see, I've already got quite a bit planned :)

    And yes that die shot is correct, it is simply rotated 90 degrees clockwise to fit on the page better.

    Take care,
    Anand
  • erikvanvelzen - Monday, April 4, 2005 - link

    Are you 100% sure that die picture is right? Again a great review from Anandtech!
  • DAPUNISHER - Monday, April 4, 2005 - link

    I must have missed it somehow; what storage setup did you use? Thanks and great article kid :-)
  • boban10 - Monday, April 4, 2005 - link

    Anandtech, i wannt to thank you, because this is a great preview....

    ronaldo
  • Avalon - Monday, April 4, 2005 - link

    Impressive results. Sometimes I come across a scenario where I'm doing two things at once fighting for 100% CPU time on my A64 Sempron rig, so it would be quite nice to have a dual core chip to handle that for me. I personally can't wait to see a more full review, and hopefully one of AMD's dual core setup as well.
  • karlreading - Monday, April 4, 2005 - link

    #11
    Very good points, but i think the thing to remeber about intel is this:
    Yes, they are beating AMD to the desktop. And yes, that will be good beacuse it will encourage the user base to adopt dual core, and thus programers to multi thread more. Bineg a enthusiast site, obviously dektop dual is the scene we care about and sticks in our minds.

    BUT:

    AMD will beat out Intel to dual core in the enterprise segment. THE area where the real money is. THE area where dual core can stretch its multithreaded wings. THE area where it has a product thats already causing waves ( opteron may not have the penertration of xeon, but it's given AMD a seriouse status in the enterprise sector and it is a respected architecture ), and, THE area it can really try and hurt intel, and its partners. DELL wont have a dual core capable box yet, HP can have one very soon. More to the point, if ur a IT head and u spent on Opteron server, Youll be a very happy one. Beacuse that 8 Way opteron box you got can suddenly become a 16- way box.

    Its strikes of AMD's stratagey with x86-64. No, it wasent as powerful as itanium, it wasent new, fresh, and funky. It certainly wasent the first 64 bit cpu for enterprise wither, not by a long shot. But by giving comapnys, and people what they want, a easy, painless upgrade path, it suceeded in destroying intels dream of killing of x86. Intel was still denying yamhill when it was already in there cpus, lying dormant for the day intel would swallow its pride and follow AMD down the x86-64 route.

    Intel will beat AMD to dual core on the desktop, but they will make waves and in roads in the enterprise sector, and, let's face it, its just better that way.
    Karlos
  • Googer - Monday, April 4, 2005 - link

    "I tried to take a screenshot of what was going on, but print screen wouldn't work. I could launch Paint, but I couldn't paste anything into it"

    If paint does not work you can always use wordpad and paste any images to it that are cahced to the clipboard.
  • karlreading - Monday, April 4, 2005 - link

    Personally, im very excited about dual core. It appears to me that everyone seems to be forgeting the main thing.
    Its not necesseraly about doing one thing faster, its about doing MORE things faster.
    the multi-tasking scenarios ANAND has given us is where the real excitment and benefit come in. Now, as a AMD FANboi, all i say is this: Bring on TOLEDO :)
    Karlos

Log in

Don't have an account? Sign up now