<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Kernel parameter for binding user processes to processor in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849600#M93166</link>
    <description>there is no kernel parameter for binding user processes to a fixed processor.&lt;BR /&gt;&lt;BR /&gt;You can set the processor affinity with the system call mpctl in a program.&lt;BR /&gt;&lt;BR /&gt;See man 2 mpctl</description>
    <pubDate>Thu, 21 Nov 2002 15:43:10 GMT</pubDate>
    <dc:creator>Volker Kiehn</dc:creator>
    <dc:date>2002-11-21T15:43:10Z</dc:date>
    <item>
      <title>Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849595#M93161</link>
      <description>Does anybody knows Kernel parameter for binding user processes to some fixed processor (i.e. affinity bind)?&lt;BR /&gt;OS HP-UX 11i on multiprocess system</description>
      <pubDate>Thu, 21 Nov 2002 15:27:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849595#M93161</guid>
      <dc:creator>Igor I. Shulz</dc:creator>
      <dc:date>2002-11-21T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849596#M93162</link>
      <description>Hi Igor,&lt;BR /&gt;&lt;BR /&gt;Same with Oracle.  Processor affinity is set within the application.  Nothing to set in the kernel.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Jim</description>
      <pubDate>Thu, 21 Nov 2002 15:37:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849596#M93162</guid>
      <dc:creator>Jim Turner</dc:creator>
      <dc:date>2002-11-21T15:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849597#M93163</link>
      <description>Igor,&lt;BR /&gt;&lt;BR /&gt;I could well be wrong, but I don't think there's a related kernel parameter.  Our Informix database has a "set processor affinity" option in it's startup that we were able to utilize without kernel changes.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 21 Nov 2002 15:39:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849597#M93163</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-11-21T15:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849598#M93164</link>
      <description>There is no such kernel parameter.  Normally you want processes to be able to switch between processors.&lt;BR /&gt;&lt;BR /&gt;There is a product called Process Resource Manager (PRM) that might allow you to do this.</description>
      <pubDate>Thu, 21 Nov 2002 15:40:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849598#M93164</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-11-21T15:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849599#M93165</link>
      <description>No kernel tunable... on 11.11 you should have a look at mpsched(1) and mpctl(2).&lt;BR /&gt;&lt;BR /&gt;Best regards...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Thu, 21 Nov 2002 15:41:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849599#M93165</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2002-11-21T15:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849600#M93166</link>
      <description>there is no kernel parameter for binding user processes to a fixed processor.&lt;BR /&gt;&lt;BR /&gt;You can set the processor affinity with the system call mpctl in a program.&lt;BR /&gt;&lt;BR /&gt;See man 2 mpctl</description>
      <pubDate>Thu, 21 Nov 2002 15:43:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849600#M93166</guid>
      <dc:creator>Volker Kiehn</dc:creator>
      <dc:date>2002-11-21T15:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849601#M93167</link>
      <description>Hello Igor.&lt;BR /&gt;&lt;BR /&gt;If lack of CPU resources is a problem for your process, you may consider priory manipulations using rtprio. However have to be carefull and do not overdo it :).&lt;BR /&gt;In case your concerns are 'global' like controling CPU resources for the group(s) of application - go with PRM.&lt;BR /&gt;I am not aware of any kernel parameters to manage CPU bindings.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;0leg</description>
      <pubDate>Thu, 21 Nov 2002 18:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849601#M93167</guid>
      <dc:creator>Oleg Zieaev_1</dc:creator>
      <dc:date>2002-11-21T18:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849602#M93168</link>
      <description>HP sent me two sources in 1999,&lt;BR /&gt;one to nail the process at start&lt;BR /&gt;the other to nail it later.&lt;BR /&gt;Both work fine. The sources are in the attachement.&lt;BR /&gt;&lt;BR /&gt;see man 2 mpctl:&lt;BR /&gt;&lt;BR /&gt; mpctl(2)                                                           mpctl(2)&lt;BR /&gt;&lt;BR /&gt; NAME&lt;BR /&gt;      mpctl - multiprocessor control&lt;BR /&gt;&lt;BR /&gt; SYNOPSIS&lt;BR /&gt;      #include &lt;SYS&gt;&lt;BR /&gt;&lt;BR /&gt;      int mpctl(&lt;BR /&gt;           mpc_request_t request,&lt;BR /&gt;           spu_t spu,&lt;BR /&gt;           pid_t pid&lt;BR /&gt;      );&lt;BR /&gt;&lt;BR /&gt;      int mpctl(&lt;BR /&gt;           mpc_request_t request,&lt;BR /&gt;           spu_t spu,&lt;BR /&gt;           lwpid_t lwpid&lt;BR /&gt;      );&lt;BR /&gt;&lt;BR /&gt; REMARKS&lt;BR /&gt;      Much of the functionality of this capability is highly dependent on&lt;BR /&gt;      the underlying hardware.  An application that uses this system call&lt;BR /&gt;      should not be expected to be portable across architectures or&lt;BR /&gt;      implementations.&lt;BR /&gt;&lt;BR /&gt; DESCRIPTION&lt;BR /&gt;      mpctl provides a means of determining how many processors are&lt;BR /&gt;      installed in the system and assigning proceses/lightweight processes&lt;BR /&gt;      to run on specific processors.&lt;BR /&gt;&lt;BR /&gt;      This call is expected to be used to increase performance in certain&lt;BR /&gt;      applications, but should not be used to ensure correctness of an&lt;BR /&gt;      application.  Specifically, cooperating processes/lightweight&lt;BR /&gt;      processes should not rely on processor assignment in lieu of a&lt;BR /&gt;      synchronization mechanism (such as semaphores).&lt;BR /&gt;...&lt;/SYS&gt;</description>
      <pubDate>Tue, 26 Nov 2002 10:46:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849602#M93168</guid>
      <dc:creator>Johannes Falk</dc:creator>
      <dc:date>2002-11-26T10:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel parameter for binding user processes to processor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849603#M93169</link>
      <description>/* This is the source code for "pbind.c" to bind/unbind/query a &lt;BR /&gt;given process.&lt;BR /&gt;This works on HP-UX 9.X,10.X and 11.X.&lt;BR /&gt;Don't remember who wrote the source code.&lt;BR /&gt;*/&lt;BR /&gt;/*&lt;BR /&gt; GETNUMSPUS();&lt;BR /&gt; GETFIRSTSPU();&lt;BR /&gt; GETNETXSPU(i);&lt;BR /&gt; PROCDISABLE(cpu); 0 = OK   -1 = Faild&lt;BR /&gt; PROCENABLE(cpu); 0 = OK   -1 = Faild&lt;BR /&gt; GETPROCSTAT(cpu); 0 = OK   -1 = Faild&lt;BR /&gt; SETPROCESS(cpu,pid);  MPC_SPUFLOAT, MPC_SPUNOCHANGE or cpu, pid&lt;BR /&gt;*/&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#define P_BIND 0&lt;BR /&gt;#define P_FLOAT 1&lt;BR /&gt;#define QUERY 2&lt;BR /&gt;&lt;BR /&gt;extern int optind;&lt;BR /&gt;extern char *optarg;&lt;BR /&gt;&lt;BR /&gt;main(argc,argv)&lt;BR /&gt;int argc;&lt;BR /&gt;char *argv[];&lt;BR /&gt;{&lt;BR /&gt;   int num_cpu,first_cpu,next_cpu;&lt;BR /&gt;   int i;&lt;BR /&gt;   int pid = 0;&lt;BR /&gt;   int cpu = 0;&lt;BR /&gt;   int ret = 0;&lt;BR /&gt;   int opt;&lt;BR /&gt;   int b_u = 9;&lt;BR /&gt;   char u[2];&lt;BR /&gt;   char buf[60];&lt;BR /&gt;&lt;BR /&gt;   if( argc &amp;lt; 2) usage();&lt;BR /&gt;   while((opt = getopt(argc,argv,"u:b:q:")) != -1)&lt;BR /&gt;   {&lt;BR /&gt;      switch(opt){&lt;BR /&gt;         case 'b' : b_u = P_BIND;&lt;BR /&gt;                    if( argc &amp;lt; 4) usage();&lt;BR /&gt;                    cpu = atoi(optarg);&lt;BR /&gt;                    pid = atoi(argv[3]);&lt;BR /&gt;                    break;&lt;BR /&gt;         case 'u' : b_u = P_FLOAT;&lt;BR /&gt;                    if( argc &amp;lt; 3) usage();&lt;BR /&gt;                    pid = atoi(optarg);&lt;BR /&gt;                    break;&lt;BR /&gt;         case 'q' : b_u = QUERY;&lt;BR /&gt;                    pid = atoi(optarg);&lt;BR /&gt;                    break;&lt;BR /&gt;         default  :&lt;BR /&gt;                    usage();&lt;BR /&gt;                    break;&lt;BR /&gt;     }&lt;BR /&gt;   }&lt;BR /&gt;   num_cpu = GETNUMSPUS();&lt;BR /&gt;   if(cpu &amp;gt; num_cpu -1 ){&lt;BR /&gt;      printf("%d processor(s) aviable in this system\n",num_cpu);&lt;BR /&gt;      usage();&lt;BR /&gt;      exit(1);&lt;BR /&gt;   }&lt;BR /&gt;   first_cpu = GETFIRSTSPU();&lt;BR /&gt;   if(b_u == P_BIND){&lt;BR /&gt;      ret = SETPROCESS(cpu,pid);&lt;BR /&gt;         u[0] = ('0' + ret);&lt;BR /&gt;         printf("Process id %d is bound to processor %s\n",pid,&lt;BR /&gt;                        (ret == MPC_SPUNOCHANGE) ? "unknown" :&lt;BR /&gt;                        (ret == MPC_SPUFLOAT) ? "FLOATING" :&lt;BR /&gt;                        (ret == -1) ? "ERROR IN BINDING" :&lt;BR /&gt;                        (ret &amp;gt;= 0) ? u : "ILLEGAL VALUE" );&lt;BR /&gt;   }&lt;BR /&gt;   else if(b_u == P_FLOAT){&lt;BR /&gt;      cpu = MPC_SPUFLOAT;&lt;BR /&gt;      ret = SETPROCESS(cpu,pid);&lt;BR /&gt;         u[0] = ('0' + ret);&lt;BR /&gt;         printf("Process id %d is set to %s\n",pid,&lt;BR /&gt;                        (ret == MPC_SPUNOCHANGE) ? "NO CHANGE" :&lt;BR /&gt;                        (ret == MPC_SPUFLOAT) ? "FLOATING" :&lt;BR /&gt;                        (ret == -1) ? "ERROR IN RELEASING" :&lt;BR /&gt;                        (ret &amp;gt;= 0) ? u : "ILLEGAL VALUE" );&lt;BR /&gt;   }&lt;BR /&gt;   else if(b_u == QUERY){&lt;BR /&gt;      cpu = MPC_SPUNOCHANGE;  &lt;BR /&gt;      ret = SETPROCESS(cpu,pid);&lt;BR /&gt;      u[0] = ('0' + ret);&lt;BR /&gt;      strcpy(buf,"is bound to processor ");&lt;BR /&gt;      strcat(buf,u);&lt;BR /&gt;      printf("Process id %d %s\n",pid,&lt;BR /&gt;                        (ret == MPC_SPUNOCHANGE) ? "NO CHANGE" :&lt;BR /&gt;                        (ret == MPC_SPUFLOAT) ? "is set to FLOATING" :&lt;BR /&gt;                        (ret == -1) ? "QUERING ERROR" :&lt;BR /&gt;                        (ret &amp;gt;= 0) ? buf : "ILLEGAL VALUE" );&lt;BR /&gt;&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;/*&lt;BR /&gt;      if(ret != -1){&lt;BR /&gt;         cpu = MPC_SPUNOCHANGE;  &lt;BR /&gt;         ret = SETPROCESS(cpu,pid);&lt;BR /&gt;         printf("Process id %d not to CPU # %d ret = %d\n",pid,cpu,ret);&lt;BR /&gt;         printf("Process id %d  is set to %s\n",pid,&lt;BR /&gt;                        (ret == MPC_SPUNOCHANGE) ? "NO CHANGE" :&lt;BR /&gt;                        (ret == MPC_SPUFLOAT) ? "FLOATING" :&lt;BR /&gt;                        (ret == -1) ? "ERROR IN BINDING" : "OK" );&lt;BR /&gt;      }&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;usage()&lt;BR /&gt;{&lt;BR /&gt;      fprintf(stderr,"Usage: pbind -b processor_id pid\n");&lt;BR /&gt;      fprintf(stderr,"Usage: pbind -u pid\n");&lt;BR /&gt;      fprintf(stderr,"Usage: pbind -q pid\n");&lt;BR /&gt;      exit(1);&lt;BR /&gt;}&lt;BR /&gt;&lt;/SYS&gt;&lt;/SYS&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Wed, 27 Nov 2002 17:52:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kernel-parameter-for-binding-user-processes-to-processor/m-p/2849603#M93169</guid>
      <dc:creator>Emil Velez_2</dc:creator>
      <dc:date>2002-11-27T17:52:54Z</dc:date>
    </item>
  </channel>
</rss>

