# Exclude init from a CPU?

## wallace1819

Hi,

I have a process that can be extremely CPU intensive but it is a non-threaded application. I would like to excluded all other processes and services from using one of my cores and dedicate that core to my non-threaded application. I know I can pin my non-threaded process to a specific core, but is it possible to also prevent anything else from using that core?

Thx,

Wally

----------

## Dorsai!

Isn't this done automatically? If one of the processes is using all of one core aren't the other processes are changed to the other cores anyway?

----------

## wallace1819

I don't know. If the core were at 100% all the time I would think this might happen, but the process I'm trying to dedicate a core to does not always use 100% of the core. But when it does need the full core I do not want anything else to be using it. This is for a critical security application that needs to react immediately.

----------

## gentoo_ram

Just re-nice the process to -10 or -15 or something.  Then it will have higher priority.

----------

## coolsnowmen

If you set you kernel preemption model to low-latency it can help with this. But yeah, if you launch a process with a lower priority than everything else, you basically have to have a little trust that the scheduler knows what it is doing.

----------

## Sadako

You should look into cpusets, '/usr/src/linux/Documentation/cpusets.txt' is a good starting point.

----------

## Hu

 *wallace1819 wrote:*   

> This is for a critical security application that needs to react immediately.

 What are the consequences of a less than immediate reaction?

----------

## Ant P.

To me this sounds like you're relying on a race condition in initscripts for security...

----------

## coolsnowmen

@Hopeless, 

   cpusets.txt for newer kernels is located in /Documentation/cgroups/cpusets.txt

----------

