How to isolate a cpu for a single process

Hi,
I have a PC with 2 cpu quad core, i need to isolate a core for a process.
Does anyone know some metod with console or with c++ programming to isolate a core or a processor for a process?

Thanks

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Google: linux cpu affinity

Looks like ‘taskset’ is what you are after.

Good luck.

lupin982 wrote:
> Hi,
> I have a PC with 2 cpu quad core, i need to isolate a core for a
> process.
> Does anyone know some metod with console or with c++ programming to
> isolate a core or a processor for a process?
>
> Thanks
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJLaiWSAAoJEF+XTK08PnB5fzcQAJoM69mwz8goe+bDKWitOyNu
S0tTFIhY8TzRRbiVldUzefcpLjZ0/vla/i/hD8ra14sLOBU1Ju4J6qsUcfrW0aL9
dl4yljSVlho1SJrEHvxalJXkKt4/uP/faugnb7+GvbhDsFT5fOdLaliupWoFoLKg
UdOILtwCWknzzOphE0P+K03rWI5i2DjygR9rfkuhgjfkkyFZUdNrqKii53Kq2sad
Lfg30RNN3SfKhcVbVmszuxAhNfRJMI7UBm5M77h82GcRQpFZk44Nuc3mRJbl8du/
sI+wProSwpfhqy04NgUMN1eDkWlt5LZobdWU8zTGhVBumC2jmlKogOdbAbAaqF4S
7CscTumA8/GQNBmOgYLbWp3gQ+zvEQhzPKQ82kSGfKEz3SjnCo9M4UjmgGQ6XzHh
SB+GBB09LPTEwV8GyNpcX/NJZ8Fvxo0/hoCn67KGqQ8M2B1THqx2K1lMl+V9rkOw
oorLkJa+i7FOetoLKaX0d2yArNcZ6NiZIZK7QTSPMiLIt5uf6fjLnHdlffhYTCnj
JdFJMO8eZHTyOyQZS1mYX1Vn3vN2sVMzU9qzdXt0vEuTdPeW3SZTOSouDIOreon+
/AOeUgKlcm8OpWMXfOkRe+uuhdMSjaLx4uQ2oqooofR27meXwNTtKF2X2afW7NpU
zDXgIQYr5dnn0xBfyggK
=2Hy3
-----END PGP SIGNATURE-----

Thanks for reply,
i try with this command, bat with it , i can run a process on a specified cpu, but i want to isolate this cpu from schedulig, i want that on the cpu run only my process

thank

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oh… oops. No idea then unless you run taskset for every OTHER
command… bleh.

Good luck.

lupin982 wrote:
> Thanks for reply,
> i try with this command, bat with it , i can run a process on a
> specified cpu, but i want to isolate this cpu from schedulig, i want
> that on the cpu run only my process
>
> thank
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJLatKCAAoJEF+XTK08PnB5/24P/0BOOudhogQlqJq7Ok5eV6Jp
NJWqN1TrvUnBX0g0hdXmcTIj1yEYt+y2Sy0bmadtwwMHp9qvqHN3dm/AyEp1qDln
yWoZh7plofs63ej4MjbhqTlEGo6mtIAPFAbSHIzCc7uVfEFL/VDd00BeUJyZEDy+
TdvhCR+70ZOHbKabluL3iDAUf60MeaYeHauTVX/gx/e4IikItUZqulHuFLPps/88
BSID6PeK0+AsItzt3GqF6LGc8Qqs0d7OuGNc7+agrQTZqDxpc5f19yc2L1k/ECv/
I1rerfpZnVEow528QGjL9SGUCGA8JLIqBHF9KI6CXNJKsFEfx7kUpG8Oeg40MGq3
xTXgcX1iZITwEwk4cipPuJrJGviOXvzoNeEyGemYd5kxP1QepGXbRbwSMk1hzQ4g
7ovyDrHrZsUNMwXRSvE0QqquXKSfTfK1xnJVmqQR91SN/MTBwGohiAU1h2HQG/mW
Bfo5tnga6l404+qmcFL5TNTtCjBfEebzFbUR973mbAUOp2zI78RXSNb80RI8xQbu
2xqcZxa0zECUQKT8e18afnQy2oOsJpRfjDA7DFEsPqODAOP3ElnrIeDkEKUnhy+A
ieGK5Bdugnxnms8whKBfYy383GS1r0HuJingcYh9aoGZroqxfYXivD+NAd9ca0DT
oLaU7kW/wTkUlWKDsZQM
=vcCy
-----END PGP SIGNATURE-----

On Wed, 2010-02-03 at 21:06 +0000, lupin982 wrote:
> Hi,
> I have a PC with 2 cpu quad core, i need to isolate a core for a
> process.
> Does anyone know some metod with console or with c++ programming to
> isolate a core or a processor for a process?

man numactl (command line tool)