Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Isolating a processor to exclusively run an Application 2

Status
Not open for further replies.

jojimathew

Technical User
Dec 20, 2000
4
US
The poser is ..... in a multiple processor setup in a box, How am I to isolate and allocate one of the processors to run an application exclusively on it than let the SMP setup do the default load-sharing stuff ?

 
The application must be written in such a way as to allow you to define this. It can be done, but I've only seen it from the code upwards, not from the console downwards (if that makes sense). And don't ask me how they did it either! Ian

"IF" is not a word it's a way of life
 
The kernel supports LWP-level binding, where different LWPs in the same process cold be bound to different cpus, this binding can be done programmatically with "processor_bind", by which you can specify an LPW ID. Once a processor set is created (psrset -c cpu_id), the processors in the set are no longer available for running all kernel threads system wide. Rather, they will only run kernel threads (LWPs) that have been bound to the processor set with psrset(1M) or pset_bind(2). Once a process is bound, the binding is exclusive, only threads bound to the processor set are scheduled and executed on cpus in the set, cpus in a processor set are no available as targets of pbind(1M) requests, you cannot use pbind or processor_bind to bin process or LWPs to a cpu that is part of a user processor set, if a process has been bound to a cpu with pbind, that processor cannot be placed in a processor set until the binding is undone ...

Regards,
Carlos Almeida
(Solaris Internals)
 
... you coud also take a look at processor control interface commands:
psrinfo(1M)
processor_info(2)
p_online(2)
pbind(1M) - Binds or unbinds a process to a cpu ...
processor_bind(2) - Binds or unbinds a process to a cpu from a program ...
pset_bind(2)-> Binds/unbinds a process or LWP to/from a processor set
psrset(1M)
pset_info(2)
pset_create(2)
pset_destroy(2)
and pset_assing(2)

Have fun ...

Regards,
Carlos Almeida

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top