jeudi 29 mai 2014

c ++ - par défaut tous les threads d'un noyau ? -Débordement de pile


I specified a cpuset X with core 2-11, and taskset --cpu-list 2.


It seems like if I run a process with taskset nested with cpuset X, then sched_getaffinity() only sees core #2 available.


My question is that is there a way to achieve the followings:
- default all threads in a process to 1 core, AND
- the process is "protected" by cpuset (so that no other processes will use the set of cores specified), AND
- I can still set the cpu affinities for some threads programmatically (I know how this can be done with pthread_attr_setaffinity_np())?


Thanks in advance.



I specified a cpuset X with core 2-11, and taskset --cpu-list 2.


It seems like if I run a process with taskset nested with cpuset X, then sched_getaffinity() only sees core #2 available.


My question is that is there a way to achieve the followings:
- default all threads in a process to 1 core, AND
- the process is "protected" by cpuset (so that no other processes will use the set of cores specified), AND
- I can still set the cpu affinities for some threads programmatically (I know how this can be done with pthread_attr_setaffinity_np())?


Thanks in advance.


0 commentaires:

Enregistrer un commentaire