Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dedicating one CPU to a particular process?

0 views
Skip to first unread message

bkelab

unread,
Oct 2, 2002, 6:14:25 PM10/2/02
to
I am using Red Hat 7.3 with the 2.4.18-3smp kernel. Is there a way to
assign just one particular process to a CPU to where no other
processes can be run on it? Thanks for any help.

Kasper Dupont

unread,
Oct 3, 2002, 2:18:26 AM10/3/02
to

First of all you can specify that the process is only allowed to run on
this single CPU. To prevent others from using the CPU you can set the
process to a realtime priority. This will of course allow others to use
your CPU while your process is sleeping. If that is undesired, you
might have to modify the cpus_allowed set for all other processes in
the system. Otherwise you could modify your kernels scheduler.

Your kernel does not seem to provide a system call to set the
cpus_allowed set for a process. AFAIK such a system call exists in the
2.5 series. Either backport that system call, or take a look on the
module I have written:

http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#affinity

--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaa...@daimi.au.dk
or mailto:mcxumhv...@skrammel.yaboo.dk

0 new messages