linux - Can a kernel that supports multi-core reduce cpu overhead, reduce cpu overheat

05
2014-04
  • FayadF

    I found only a single core as identified by kernel from /proc/cpuinfo. Therefore I am installing a 686 pae kernel to identify all cores and get multi-core functionality.

    I read about how a process can make use of more than one core if available. ie. An application must be programmed to make use of the multi cores available on a machine.

    But I wonder if a 686 pae kernel is capable to divide the total processes and 1. assign a set of processes to different cores 2. share a process between different cores which can reduce the work of each core. This will in fact reduces the processes in queue and complete processes faster. Can a kernel that support multiprocessing achieve this and help reduce the cpu overhead ?

    Any other methods I can follow for effectively sharing processes between the cores ?

  • Answers
  • Breakthrough

    One can already limit the cores a process can be executed on by setting the processes' affinity. On Linux, this can be accomplished by using taskset to limit the cores the process can be executed on. By default, Linux uses a pre-emptive task scheduler, which is almost identical to what you describe in (2). Almost all major operating systems use this kind of task scheduler, which will result in a process being run on multiple cores by default.

    To actually guarantee your process runs for X amount of time on core Y, as you have implied in (1) would require the use of a real-time operating system; there is an existing real-time kernel module for Linux as well (e.g. RTLinux).


    TL,DR: In response to the question How can I effectively share a process between cores? all major operating systems already do this due to the task scheduler being used. The job of an operating system is to control what process runs at what time, and where. While you can "pin" a process to a particular core (or set of cores) and disallow it from executing on other cores (via taskset), the operating system will still schedule other processes to be run on that core when the process is preempted.

    If you ever need to guarantee the execution of your program for at least X amount of time on core Y, you should consider either a real-time kernel, or "tuning" the task scheduler you already use to use different pre-emption policies (or even swap out the entire task scheduler for another!). Note that only a real-time operating system will guarantee execution.


  • Related Question

    windows xp - What browser or any tool can reduce flash CPU usage?
  • Stan

    OS: windows XP SP3

    While listening to Pandora in Chrome, the CPU usage is almost to 100% for a single core in CPU. Is there any way to reduce CPU usage? Either by using another browser, any plugins that reduce flash CPU usage, or like in Linux, there's a lightweight client - Pithos for Pandora. Thanks.


  • Related Answers
  • ta.speot.is

    Do you have the latest version of Flash? I find Pandora to be fairly resource light when idling. What happens when you run Flash in other browsers, do you have this problem? I have found that Chrome and Flash don't always go hand-in-hand.

  • Darth Android

    Since flash is a closed-source, compiled binary, I don't think you'll find any plugins, addons, or programs which can modify the way it does things (i.e., reduce CPU usage).

    Your best bet will be to try a different browser, or try re-installing google chrome (or try a different version, as I believe there's "stable", "beta", and "development" versions). Google partnered up with Adobe recently to distribute flash with chrome, so I'd expect these two to play much nicer in the future when they start shipping new builds with flash built in.