<?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: Thread priority in OpenVMS in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214262#M62152</link>
    <description>Thanks for all the inputs.&lt;BR /&gt;&lt;BR /&gt;I tried to find it on OpenVMS 6.2 sda&amp;gt;pthread does not help.&lt;BR /&gt;I learned that pthread helps on OpenVMS 7.2.&lt;BR /&gt;&lt;BR /&gt;The confusing part is the result:&lt;BR /&gt;Thread Name           Policy      State   Pri&lt;BR /&gt;------ ----           -----       -----   ---&lt;BR /&gt;     1 default thread SCHED_OTHER blocked 11&lt;BR /&gt;     2 &lt;ANONYMOUS&gt;    SCHED_OTHER running 11&lt;BR /&gt;&lt;BR /&gt;I started the process with pri=4 and created the thread with pri=7.&lt;BR /&gt;How come I see priority 11 for both threads?&lt;BR /&gt;Do I mix up something here?&lt;BR /&gt;&lt;/ANONYMOUS&gt;</description>
    <pubDate>Thu, 11 Mar 2004 03:01:19 GMT</pubDate>
    <dc:creator>Hoedl</dc:creator>
    <dc:date>2004-03-11T03:01:19Z</dc:date>
    <item>
      <title>Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214257#M62147</link>
      <description>I wrote an application using DECthreads with different thread-priority.&lt;BR /&gt;Everything works fine.&lt;BR /&gt;But how can I verify a thread priority?&lt;BR /&gt;I tried with &lt;BR /&gt;$ana/system&lt;BR /&gt;SDA&amp;gt; sho proc/all &lt;PROCESSNAME&gt;&lt;BR /&gt;But this shows not the required informations.&lt;BR /&gt;&lt;BR /&gt;Thanks for informations&lt;/PROCESSNAME&gt;</description>
      <pubDate>Wed, 10 Mar 2004 02:31:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214257#M62147</guid>
      <dc:creator>Hoedl</dc:creator>
      <dc:date>2004-03-10T02:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214258#M62148</link>
      <description>may be with&lt;BR /&gt;&lt;BR /&gt;sda&amp;gt; pthread...</description>
      <pubDate>Wed, 10 Mar 2004 09:46:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214258#M62148</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2004-03-10T09:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214259#M62149</link>
      <description>Hello Gerard,&lt;BR /&gt;&lt;BR /&gt;I already gave him that answer in the business support forums ;-)&lt;BR /&gt;&lt;BR /&gt;Unfortunatly there is not much documentation &lt;BR /&gt;on this extension as far as I know.&lt;BR /&gt;&lt;BR /&gt;I did also check sys$share: for installed SDA extensions and did not find something else.&lt;BR /&gt;&lt;BR /&gt;Greetings, Martin</description>
      <pubDate>Wed, 10 Mar 2004 10:10:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214259#M62149</guid>
      <dc:creator>Martin P.J. Zinser</dc:creator>
      <dc:date>2004-03-10T10:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214260#M62150</link>
      <description>it seems that&lt;BR /&gt;sda&amp;gt; set proc/id=xx&lt;BR /&gt;sda&amp;gt; pthread thread&lt;BR /&gt;show something similar to the following&lt;BR /&gt;&lt;BR /&gt;Process name: MYSQL_SERVER      Extended PID: 20200157  Thread data: "thread"&lt;BR /&gt;-----------------------------------------------------------------------------&lt;BR /&gt;  Thread Name                      State           Substate    Policy       Pri&lt;BR /&gt;  ------ ------------------------- --------------- ----------- ------------ ---&lt;BR /&gt;       1 default thread            blocked         $synch   64 SCHED_OTHER  11&lt;BR /&gt;      -3 exit-handling thread      blocked                     SCHED_FIFO   32&lt;BR /&gt;       2 &lt;ANONYMOUS&gt;               blocked         cond  40025 SCHED_OTHER  11&lt;BR /&gt;       3 &lt;ANONYMOUS&gt;               blocked         cond  40026 SCHED_OTHER  11&lt;BR /&gt;       4 &lt;ANONYMOUS&gt;               blocked         cond  40027 SCHED_OTHER  11&lt;BR /&gt;       5 &lt;ANONYMOUS&gt;               blocked         cond  40028 SCHED_OTHER  11&lt;BR /&gt;       6 &lt;ANONYMOUS&gt;               blocked         cond  30013 SCHED_OTHER  11&lt;BR /&gt;       7 &lt;ANONYMOUS&gt;               blocked         $synch   64 SCHED_OTHER  11&lt;BR /&gt;       8 &lt;ANONYMOUS&gt;               blocked         cond  10013 SCHED_OTHER  11&lt;BR /&gt;       9 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;     174 &lt;ANONYMOUS&gt;               zombie          exited      SCHED_OTHER  11&lt;BR /&gt;SDA&amp;gt; &lt;BR /&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;</description>
      <pubDate>Wed, 10 Mar 2004 11:13:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214260#M62150</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2004-03-10T11:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214261#M62151</link>
      <description>Debug?&lt;BR /&gt;&lt;BR /&gt;DBG&amp;gt; SET EVENT THREADS&lt;BR /&gt;DBG&amp;gt; pthread thread -1&lt;BR /&gt;&lt;BR /&gt;this will give you the policies and priorities of the threads.&lt;BR /&gt;&lt;BR /&gt;Will this get you what you want?&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Mar 2004 11:25:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214261#M62151</guid>
      <dc:creator>Brad McCusker</dc:creator>
      <dc:date>2004-03-10T11:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214262#M62152</link>
      <description>Thanks for all the inputs.&lt;BR /&gt;&lt;BR /&gt;I tried to find it on OpenVMS 6.2 sda&amp;gt;pthread does not help.&lt;BR /&gt;I learned that pthread helps on OpenVMS 7.2.&lt;BR /&gt;&lt;BR /&gt;The confusing part is the result:&lt;BR /&gt;Thread Name           Policy      State   Pri&lt;BR /&gt;------ ----           -----       -----   ---&lt;BR /&gt;     1 default thread SCHED_OTHER blocked 11&lt;BR /&gt;     2 &lt;ANONYMOUS&gt;    SCHED_OTHER running 11&lt;BR /&gt;&lt;BR /&gt;I started the process with pri=4 and created the thread with pri=7.&lt;BR /&gt;How come I see priority 11 for both threads?&lt;BR /&gt;Do I mix up something here?&lt;BR /&gt;&lt;/ANONYMOUS&gt;</description>
      <pubDate>Thu, 11 Mar 2004 03:01:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214262#M62152</guid>
      <dc:creator>Hoedl</dc:creator>
      <dc:date>2004-03-11T03:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214263#M62153</link>
      <description>for info on the "pthread" command in SDA, try "SDA&amp;gt; pthread help" (it works on 7.2-2 at least). Note that the pthread help command won't work unless the "current" process is threaded... (stupid :-))&lt;BR /&gt;&lt;BR /&gt;-Anders</description>
      <pubDate>Thu, 11 Mar 2004 09:49:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214263#M62153</guid>
      <dc:creator>Anders Sundqvist</dc:creator>
      <dc:date>2004-03-11T09:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Thread priority in OpenVMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214264#M62154</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;Since it doesn't look like a single command will display the base priorities, here is the manual way to do it. &lt;BR /&gt;&lt;BR /&gt;Take a look at the process in SDA&lt;BR /&gt;SDA&amp;gt; show process &lt;NAME&gt;&lt;BR /&gt;&lt;BR /&gt;Note the PCB (Process Control Block) address, let's call it pcbaddr. If you want, you can display the entire pcb:&lt;BR /&gt;SDA&amp;gt; format/type=pcb &lt;PCBADDR&gt;    ! The /type isn't needed but old habits die hard&lt;BR /&gt;&lt;BR /&gt;Note the number of threads for this process.&lt;BR /&gt;SDA&amp;gt; examine &lt;PCBADDR&gt;+pcb$l_kt_count&lt;BR /&gt;If this count is one, there are no threads for this process.&lt;BR /&gt;If this count is two or more, we can check the base priorities of each thread.&lt;BR /&gt;&lt;BR /&gt;We need to find all the threads associated with this process. A block of 32bit addresses point to each KTB (Kernel Thread Block). Each ktb contains the base priority field ktb$l_prib. (Note: ktb's and pcb's are the same except certain fields are not defined in the ktb. Also, if a ktb and pcb are the address, it is okay.)&lt;BR /&gt;&lt;BR /&gt;So where is this block?&lt;BR /&gt;SDA&amp;gt; examine &lt;PCBADDR&gt;+PCB$L_KTBVEC&lt;BR /&gt;This is a block of 32bit addresses that is pcb$l_kt_count*4 bytes long.&lt;BR /&gt;This block contains a list of addresses pointing to each ktb data structure.&lt;BR /&gt;&lt;BR /&gt;Do &lt;PCBADDR&gt;+PCB$L_KT_Count times. So if this value is 3, do the following:&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; Examine @(@(&lt;PCBADDR&gt;+pcb$l_ktbvec)+0)+ktb$l_prib&lt;BR /&gt;Note that "+0" is the offset within the ktbvec block.&lt;BR /&gt;This is the base priority of the first thread&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; Examine @(@(&lt;PCBADDR&gt;+pcb$l_ktbvec)+4)+ktb$l_prib&lt;BR /&gt;Note that "+4" is the second ktb address within the ktbvec block.&lt;BR /&gt;This is the base priority of the second thread&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; Examine @(@(&lt;PCBADDR&gt;+pcb$l_ktbvec)+8)+ktb$l_prib&lt;BR /&gt;This is the base priority of the third thread&lt;BR /&gt;&lt;BR /&gt;If you need to change the base priority of a thread, just look at the pid, which is the epid in the pcb, and change it from DCL. For example, to get the pid of the third ktb do the following:&lt;BR /&gt;SDA&amp;gt; @(@(&lt;PCBADDR&gt;+pcb$l_ktbvec)+8)+ktb$l_epid&lt;BR /&gt;&lt;BR /&gt;A description of these data strucutres can be found at&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/DOC/73final/6466/6466pro_005.html#kthreads_process_structure" target="_blank"&gt;http://h71000.www7.hp.com/DOC/73final/6466/6466pro_005.html#kthreads_process_structure&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hopefully, I didn't mis-state something. Let me know if there is a typo or if doesn't look right (@ can be confusing, etc.).&lt;BR /&gt;&lt;BR /&gt;john&lt;BR /&gt;&lt;BR /&gt;ps - if you want, I can write a small macro-32 program to do this.&lt;/PCBADDR&gt;&lt;/PCBADDR&gt;&lt;/PCBADDR&gt;&lt;/PCBADDR&gt;&lt;/PCBADDR&gt;&lt;/PCBADDR&gt;&lt;/PCBADDR&gt;&lt;/PCBADDR&gt;&lt;/NAME&gt;</description>
      <pubDate>Thu, 11 Mar 2004 11:22:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/thread-priority-in-openvms/m-p/3214264#M62154</guid>
      <dc:creator>John Eerenberg</dc:creator>
      <dc:date>2004-03-11T11:22:48Z</dc:date>
    </item>
  </channel>
</rss>

