True or false

This is a discussion on True or false within the Tech Board forums, part of the Community Boards category; Having multiple processors is completly transparent when programming with C++. As in, the OS takes care of scheduling on the ...

  1. #1
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361

    True or false

    Having multiple processors is completly transparent when programming with C++. As in, the OS takes care of scheduling on the different processors. Correct?


    I read something about it in a book of mine... but I can't find it right now.

  2. #2
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    True... it should have nothing to do with how you code something.
    EntropySink. You know you have to click it.

  3. #3
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    How about with assembler? Is there any special preparation/code for multiple processors?

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Originally posted by Eibro
    How about with assembler? Is there any special preparation/code for multiple processors?
    On an app level, the OS will control the implementation so you shouldnt see any difference...

    If you are writting an os or going low level, then you will have to account for it obviously....

  5. #5
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    So, could one process be running different threads on different CPU's at the same time?

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> Having multiple processors is completly transparent when programming with C++.

    In general, yes, but...

    >>> So, could one process be running different threads on different CPU's at the same time?

    ... once you start doing things like this, you can run into race conditions, word tearing, cache misses and all manner of things. However, you can get enormous performance lifts. Our DEC Alpha's have multiple processors and the VMS operating system supports POSIX compliant multithreading, fun.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Alright, i'm just arguing with someone about this.
    A few more:
    True or false;

    On a system which supports (and implements) multiple CPUs, it is feasable that a single process will get time on both CPUs for its different threads.

    A process will reap a performance increase with 2 CPU's of the same MHZ, then it will with 1 of the same MHZ (wow, this is a stupid one)

  8. #8
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >On a system which supports (and implements) multiple CPUs, it is feasable that a single process will get time on both CPUs for its different threads.<

    That's really dependent on the way the OS at hand implements SMP.

  9. #9
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    On a system which supports (and implements) multiple CPUs, it is feasable that a single process will get time on both CPUs for its different threads.

    A process will reap a performance increase with 2 CPU's of the same MHZ, then it will with 1 of the same MHZ (wow, this is a stupid one)
    This is all dependent on the o/s. With something like Windows the first one may be true, but the second one probably won't be. I would have to say your more likely to get a good dual cpu usage more from say linux then windows.

  10. #10
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Originally posted by Ride -or- Die
    I would have to say your more likely to get a good dual cpu usage more from say linux then windows.
    That would depend on the type of Windows......if its toy windows (95-ME) then true....if its decent windows like 2000 etc .....then it gives MultiProcessor support

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help making a dot bounce up and down y axis in this prog
    By redwing26 in forum Game Programming
    Replies: 10
    Last Post: 08-05-2006, 12:48 PM
  2. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 01:39 PM
  3. 1 or 0 == true or false?
    By Discolemonade in forum C++ Programming
    Replies: 4
    Last Post: 08-14-2005, 04:08 PM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 06:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21