cpu - Force a single core program to use multi core

24
2014-04
  • Chris

    The title says it all, is there a way to force a single cpu core designed program (older programs) to use multiple cpu cores?

  • Answers
  • DragonLord

    Unfortunately, a legacy program written for a single CPU cannot be forced to use multiple CPU cores. The usage of multiple CPU cores requires multiple threads, which need to communicate with each other while ensuring that race conditions and other problems do not occur. An older application cannot be made to use more than CPU core unless it is rewritten to do so, and only if the nature of the application allows it to be parallelized.

  • francisswest

    What is your goal with it? Increased performance? Sadly applications that are designed to make use of only 1 core will not make use of more. Thats what this talk of "multi-threaded" applications are all about.


  • Related Question

    cpu - Multi core processors... are they really needed?
  • Questioner

    What things are multi-core processors needed for? I mean what type of things benefit from using multi-core ? Also are there anythings that suffer in performance for using multi-core... ie. they perform better using a single core processor?


  • Related Answers
  • Brabster

    Anything where you want to do more than one independent thing at once benefits from having multiple processors, or cores. The traditional example is Operating Systems, running your word processor, browser, etc. simultaneously. A single core computer can become less responsive for all applications when one application is doing something computationally expensive, whereas a multi-core machine may isolate the busy application on one core, leaving free resources to still serve the user's requests.

    Another benefactor is highly parallelisable computation, such as happens in scientific computing. The work can be spread across multiple processors or cores. Processor manufacturing is hitting the limits of how fast a single processor can run and not melt. The answer they have found is to have more processors running more slowly.

  • duffymo

    Multi-threaded applications benefit from multi-core processors, because you can assign threads to run on different processors. You get true parallelization instead of time slicing that way.

    Java Swing has a separate thread just for processing UI events. I would say it's a definite benefit, even for single processor machines.

    The trick is that it doesn't happen by magic. The application has to be written in such a way that it's aware of multiple processors using algorithms that explicitly take advantage of them.

  • stacker

    Since clock signals are limited it's the only way for scaling, count your currently opened windows don't forget system tray. If you still doubt open the task manager or do ps -ef it you're running linux.

  • Eric J.

    Calculations that are CPU intensive benefit the most from multi-core processors. For example, one hobby of mine is computer rendering and ray tracing. There is a linear speedup with the number of CPU's available.

    Note that high intensity calculations are now being shifted to the GPU (Graphical Processing Unit, i.e. Graphic Card) using such technologies as CUDA, OpenCL and Direct Compute.

    Calculation intensive software will perform best using a blend of multi-core and GPU-based computation.

    Microsoft .NET 4.0 has significant advances in parallel programming that make it much easier to write multi-threaded programs. As a result, they will be even more common in the near future.

  • unixman83

    Yes they are necessary for faster speeds with current CPU design. There are pitfalls with this approach however, mainly that the program in question must be capable of running parallelized.

  • Seasoned Advice (cooking)

    Multi core processors have been around for some time now and it's really up to developers to make use of them, by writing multi threaded applications.