Question about Dual Core and XP AND VISTA

TheArabian

Senior member
Nov 18, 2005
251
0
76
Ok so obviously software will only optimize dual core if built to work with multiple threads.

Well i have a question about the operating systems. Does XP optimize the cpu usage of say c2d, does vista?
 

JasonCoder

Golden Member
Feb 23, 2005
1,893
1
81
Your first statement is only partially true. Depending on how the software chunks up its units of work it will be optimized by the scheduler better or worse.

Vista's scheduler is supposed to be much improved over XP's. Personally I run an Opty 170 and things feel much snappier on Vista. But that could be due to a number of other factors.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Ok so obviously software will only optimize dual core if built to work with multiple threads.

Yes and no, being able to run multiple processes and not have them have to fight over CPU time is a huge plus. So no, that single lame process won't encode your MP3s any faster but being able to run 2 or more of them at once at full speed is a bonus.

Well i have a question about the operating systems. Does XP optimize the cpu usage of say c2d, does vista?

As much as it does with any other SMP system. Dual core doesn't have the same shared resource problems that HT CPUs do so there's a lot less logic required to use the cores effectively. What are you really trying to get at with these questions?
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Vista's scheduler is improved and updated compared to XP, but the C2D is a system that may not need much optimisation.

C2D is essentially 2 seperate cores, connected to the same FSB. There aren't any special resource contention issues with such a design.

Vista has been changed to better support multi-socket opteron systems (because opterons have a built in memory controller, a program running on CPU1 gets very fast access to memory connected to CPU1, but slow access to memory connected to CPU2). Vista knows about this, and if a program is running in CPU1's memory, then vista will try to schedule it to run on CPU1, rather than CPU2. XP, however, would just schedule it for whichever CPU was available.

There are some other changes in Vista - vista's scheduler now takes into account how much LAN/hard drive activity is being used. Under XP, only CPU usage was taken into account. This meant that an 'idle' task which needed a lot of hard drive/LAN resources could stall out a 'high priority' task which was competing for the same resources.


 

JasonCoder

Golden Member
Feb 23, 2005
1,893
1
81
Originally posted by: Mark R
Vista's scheduler is improved and updated compared to XP, but the C2D is a system that may not need much optimisation.

C2D is essentially 2 seperate cores, connected to the same FSB. There aren't any special resource contention issues with such a design.

Vista has been changed to better support multi-socket opteron systems (because opterons have a built in memory controller, a program running on CPU1 gets very fast access to memory connected to CPU1, but slow access to memory connected to CPU2). Vista knows about this, and if a program is running in CPU1's memory, then vista will try to schedule it to run on CPU1, rather than CPU2. XP, however, would just schedule it for whichever CPU was available.

There are some other changes in Vista - vista's scheduler now takes into account how much LAN/hard drive activity is being used. Under XP, only CPU usage was taken into account. This meant that an 'idle' task which needed a lot of hard drive/LAN resources could stall out a 'high priority' task which was competing for the same resources.

Link to scheduler improvements details?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Agree with everything said previously. One way I like to answer this question is to have people open Task Manager in XP (or Vista), add thread count to the process view, and count the number of threads in their system. You'll probably find well north of 200 running threads, depending on how many processes are loaded. Many (if not most) of these threads are "idle", meaing they are looping and waiting on some event to occur, or waking up occasionally and checking some condition. But they all have to be serviced on a regular basis by the CPU. So the bottom line is that regardless of what you're running on your user account, Windows is a heavily multi-threaded operating environment, and overall system responsiveness will benefit from multiple execution units.
 

TheArabian

Senior member
Nov 18, 2005
251
0
76
OK bottom line, is Vista going to be that much better than XP? Faster?

I have a license for Ultimate when it comes out that i pretty much got for free, essentially i want to know should i sell it for 300 bucks and use my XP disc or keep it? Is it worth it?

Thanks guyz
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
It's working well for me. I think it is more efficient in terms of the scheduling algorithms, from what I have heard, and certainly the UI benefits from being built on DirectX instead of GDI+.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
OK bottom line, is Vista going to be that much better than XP? Faster?

If you play any games it'll be essentially required in a year or so since DX10 is Vista-only.

I have a license for Ultimate when it comes out that i pretty much got for free, essentially i want to know should i sell it for 300 bucks and use my XP disc or keep it? Is it worth it?

Since you got it for free I highly doubt it's legal t resell it.
 

TheArabian

Senior member
Nov 18, 2005
251
0
76
No its completely legal, i purchased it+c2d+mobo for 240 and resold hardware for 285, so basically free.
 

imaheadcase

Diamond Member
May 9, 2005
3,850
7
76
I can't believe all the copies of Vista microsoft has given away free this time around, winxp i remember you had a few rare chances to win. But I kid you not I know people are winning copies all over the place, I won a free $300 value copy, my brother did, quite a few in IRC did. Its like they are giving away copies to every geek on the planet. lol
 

masteraleph

Senior member
Oct 20, 2002
363
0
71
Originally posted by: TheArabian
No its completely legal, i purchased it+c2d+mobo for 240 and resold hardware for 285, so basically free.


Sounds like you got an OEM copy, in which case it's not even legal for you to use it- it's meant to be used with the hardware it's purchased with.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: imaheadcase
I can't believe all the copies of Vista microsoft has given away free this time around, winxp i remember you had a few rare chances to win. But I kid you not I know people are winning copies all over the place, I won a free $300 value copy, my brother did, quite a few in IRC did. Its like they are giving away copies to every geek on the planet. lol

If they are, it's a smart move ;).
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
I think a quick differentiation between multi-threading and SMP capable/optimized code needs to be made.

A multithreaded application can possibly make use of multiple cores, depending on the type of work the program is doing, and whether or not the OS's scheduler can recognize a need and then follow through with the allocation.

On the other hand, applications can actually be designed by the developer to use multiple processing cores. While difficult and complex, performance can be significantly higher then simply relying on an OS's scheduler, which is tuned for general use and performance situations.

Some examples, Winamp, Firefox, Internet Explorer, mIRC, Windows Live Messenger, AIM and so on are all multithreaded applications. Pretty well all current games are heavily threaded applications but gain pretty well no performance benefit when adding more cores to a system. (Quake 3 'has' SMP support but it was broken with a patch along time ago. I'm not sure if the Doom3 engine is SMP capable. Half-Life 2 will get SMP capability added when HL2 Episode 2 comes out in '07.)

Photoshop, Apache, Windows Media Encoder, 3D Studio Max for example are also multithreaded applications but also have SMP routines coded in. These applications do gain performance when multiple cores are provided to them.
 

aka1nas

Diamond Member
Aug 30, 2001
4,335
1
0
Originally posted by: TheArabian
NOT AN OEM COPY???? its a deal that intel does for retail workers.

The retail edge deal is not for resale. That is most likely an NFR(Not For Resale) copy of vista.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Some examples, Winamp, Firefox, Internet Explorer, mIRC, Windows Live Messenger, AIM and so on are all multithreaded applications.

Those are examples of apps being multithreaded in order to keep the UI responsive, for example so that when you click on a link the connect() syscall doesn't block the UI while it blocks waiting for the webserver to respond. And I don't think that FF is multithreaded, at least the Linux build doesn't appear to be.

On the other hand, applications can actually be designed by the developer to use multiple processing cores. While difficult and complex, performance can be significantly higher then simply relying on an OS's scheduler, which is tuned for general use and performance situations.

The OS's scheduler has to be adhere'd to, there's no way around that without something in the kernel. When a process/thread is preempted it has no say in the matter what so ever.

Photoshop, Apache, Windows Media Encoder, 3D Studio Max for example are also multithreaded applications but also have SMP routines coded in. These applications do gain performance when multiple cores are provided to them.

But they don't gain performance because they have special routines to manage CPU time, they gain performance because they're able to break their work up into multiple threads and let the OS schedule those threads as necessary. Out of those in the list Apache is the only one to which the source is available, so if you do have evidence that it has "SMP routines" I'd appreciate it if you could point it out to me.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: Nothinman
Some examples, Winamp, Firefox, Internet Explorer, mIRC, Windows Live Messenger, AIM and so on are all multithreaded applications.

Those are examples of apps being multithreaded in order to keep the UI responsive, for example so that when you click on a link the connect() syscall doesn't block the UI while it blocks waiting for the webserver to respond. And I don't think that FF is multithreaded, at least the Linux build doesn't appear to be.

On the other hand, applications can actually be designed by the developer to use multiple processing cores. While difficult and complex, performance can be significantly higher then simply relying on an OS's scheduler, which is tuned for general use and performance situations.

The OS's scheduler has to be adhere'd to, there's no way around that without something in the kernel. When a process/thread is preempted it has no say in the matter what so ever.

Photoshop, Apache, Windows Media Encoder, 3D Studio Max for example are also multithreaded applications but also have SMP routines coded in. These applications do gain performance when multiple cores are provided to them.

But they don't gain performance because they have special routines to manage CPU time, they gain performance because they're able to break their work up into multiple threads and let the OS schedule those threads as necessary. Out of those in the list Apache is the only one to which the source is available, so if you do have evidence that it has "SMP routines" I'd appreciate it if you could point it out to me.

Agree with Nothinman, the scheduler is in control regardless of how the programmer decides to decompose the problem. But in general dawks is also correct: just having multiple threads doesn't mean that the really CPU-intensive parts have been decomposed in such a way that they can be parallelized. This is really tough, and has to be designed in from the very beginning. Even then there are lots of additional problems and potential problems created, such as resource deadlock, that can actually lower performance.

All of that notwithstanding, I stand by my original point, which is that any XP system today is running a crapload of threads, and will benefit to some extent from multiple cores.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
Some examples, Winamp, Firefox, Internet Explorer, mIRC, Windows Live Messenger, AIM and so on are all multithreaded applications.

Those are examples of apps being multithreaded in order to keep the UI responsive, for example so that when you click on a link the connect() syscall doesn't block the UI while it blocks waiting for the webserver to respond. And I don't think that FF is multithreaded, at least the Linux build doesn't appear to be.
I've always figured it was. I mean, you can set one page loading and then go do stuff on another tab and the gui remains somewhat responsive. Unless you're suggesting that a single thread renders small chunks of a page at a time and then goes back to the event loop while waiting for more. I bet CTho would know.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I've always figured it was. I mean, you can set one page loading and then go do stuff on another tab and the gui remains somewhat responsive. Unless you're suggesting that a single thread renders small chunks of a page at a time and then goes back to the event loop while waiting for more. I bet CTho would know.

I always thought that threads in Linux just show up as normal processes and I only ever see one firefox-bin process so I have to assume it's single threaded. Although it looks like /proc/<pid>/status says "Threads: 7" so I guess I'm wrong.