Making use of 64 bit/multi core processers?

This is a discussion on Making use of 64 bit/multi core processers? within the C++ Programming forums, part of the General Programming Boards category; Resent processers seem to mostly all have 64 bit support. Some also have more than one processer in one packege. ...

Making use of 64 bit/multi core processers?

Resent processers seem to mostly all have 64 bit support. Some also have more than one processer in one packege. Core 2 duo processers for example. There is even a core 2 duo with four processors in one.
I am wondering does windows spread resources over multiple core and use "64 bit" when it is available or do you use c++ to make for efficient use of these technologies.

It's up to the compiler. I'm not running 64 bits yet, but there should be an option in Visual Studio to compile for the 64-bit Windows OS.

I am wondering does windows spread resources over multiple core.

To some extent, yes, the operating system takes care of it. Windows will automatically split the various running processes/programs between the available processors. If you write a program that hogs the processor in a "tight loop", it will only hog a single processor/core and the other processors will be available for other tasks. (In fact, Windows won't allow a user-mode program to totally hog the processor.)

If you want your program to take advantage of multiple processors, you need to write a multi-threaded program. Then Windows can divide the threads among the available processors. It's actually rather difficult to "balance" the threads in order to run multiple cores at 100%.

Win9x/ME support 1 processor
WinXp Pro - 2
Win 2003 Server
The Web Edition supports a maximum of two processors and a maximum of two GB of RAM.
The Standard Edition supports a maximum of four processors and four GB or RAM
Enterprise Edition will support up to eight multiprocessors and up to 32 GB of RAM. A 64-bit version is also available, but it requires 64-bit processors.
Datacenter Editionsupports up to 64 multiprocessors and 512 GB of RAM and is also available in a 64-bit version.

You can only really make use of 64-bit CPUs if you write a program that actually can do something useful with more than 2 GB RAM. Otherwise it's just so much wasted space for bigger pointers, and the additional registers that the x64 architecture happens to provide. (Nothing to do with 64-bit, though. Just that they're only available in 64-bit mode.)