[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Use of dual CPU?



Walter Hoolwerf ha scritto:


the problem (probably) is, that your application isn't smp enabled, like others said.

this means, that your application is designed to do one task at a time, like for example, if you'd like to add 7 to 3 and put in in A, and afterwards like to add 9 to 7 and put it in B. If your application is designed like this, dual processor wont do you any good.

You can design your application to use threads. In this case, one thread will add 7 to 3 and put it in A, the other will add 9 to 7 and put it in B. One thread will run on one CPU, the other thread on the other. You application will be (in theory) twice as fast.

Multi threaded programming isn't possible in every situation. Let's say you want add 7 to 3 and put it in A, and then add 7 to A and put it in B. The first task has to be finished before the second can start. I think you can imagine, that the more complex your applications get, the harder it is for some compiler to decide what can and cannot be done using threads and what cannot. Therefore, smp applications are always of that nature by software design, and not by compiler settings.

So, short version, if your application isn't multithreaded, this is because the task at hand can't be put into multiple threads, or the software developper just didn't care about it. In either case, you're pretty much out of luck, unless you care to redesign the application yourself. Recompiling it, won't really do you any good I'm afraid.


Thanks very much for your clear reply, and thanks also to all the others.

Regards,
MC



Reply to: