Thread: Making use of 64 bit/multi core processers?

  1. #1
    Registered User code2d's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    87

    Question 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.

    Any help is appreciated.

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    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%.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    I am wondering does windows spread resources over multiple core
    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.

    Each windows version has specifications of the supported hardware
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  4. #4
    Registered User code2d's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    87
    I found a article and some books on multithreading.
    . It's actually rather difficult to "balance" the threads in order to run multiple cores at 100%
    As I read, what you are saying comes more true after every sentence.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    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.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File IO
    By Jack1982 in forum C++ Programming
    Replies: 9
    Last Post: 10-15-2007, 01:14 AM
  2. program segfaults without dumping a core
    By ladar in forum C Programming
    Replies: 4
    Last Post: 04-04-2005, 11:21 AM
  3. If the RGB color is (64, 64, 255), change it to (64, 255, 64).
    By Grayson_Peddie in forum C# Programming
    Replies: 2
    Last Post: 06-14-2003, 04:26 PM