Yes and no. The program must use several threads or execution flows for it to be able to take advantage of a multiprocessor system. Each processor (or core in this case) executes one thread at a time, changing the executing thread from time to time. If a program only has one thread (this is a very common case), it will be running in one of the processors. If, however, a program uses several threads, they can be run on different processors at the same time. You can have a multithreaded program running on a single processor, though, so it doesn't need to be programmed specifically to take advantage of multiple processors or cores. The OS takes care of that.
|