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.
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.
True... it should have nothing to do with how you code something.
EntropySink. You know you have to click it.
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...Originally posted by Eibro
How about with assembler? Is there any special preparation/code for multiple processors?
If you are writting an os or going low level, then you will have to account for it obviously....
So, could one process be running different threads on different CPU's at the same time?
>>> 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.
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)
>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.
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.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)
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 supportOriginally 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.