<?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: system dump analyzer and worker-threads and ... in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519556#M43021</link>
    <description>Hi Simon,&lt;BR /&gt;&lt;BR /&gt;User threads are created by using pthreads/DECthreads library (or any other user library) to create multiple parallel execution contexts within the same process. All these user threads are part of the same process (and hence they share the address space, help, static storage etc.). However, each user thread has its own stack and register set.&lt;BR /&gt;&lt;BR /&gt;Prior to the introduction of kernel threads, the primary scheduling entity was a process. This means that even if the process was multithreaded, only one thread could be executing at one time (since execution of one thread would make the process CURrent). &lt;BR /&gt;&lt;BR /&gt;We can also have an threaded process that has multiple user threads ready to be executed. So the state of the process will be CURrent if it is executing even one of the user threads. Now, in a multiprocessor environment, we could have other processors that are idle, but it cannot execute other user threads within the same process.&lt;BR /&gt;&lt;BR /&gt;Kernel threads was introduced to take care of such a scenario. With OpenVMS V7.0, the primary scheduling entity is a kernel thread (instead of a process). This means, for a threaded process, OpenVMS creates as many "kernel threads" as there are processors. The user thread library "thinks" that each of the kernel thread is a processor. The user thread library (for e.g., pthreads library) has an internal scheduler which will schedule the user threads (pthreads) on the kernel threads. And the OpenVMS scheduler would schedule the kernel threads on the processors.&lt;BR /&gt;&lt;BR /&gt;So if we consider the above example, the process has multiple user threads that are ready to run, OpenVMS would create multiple kernel threads for this process. The pthreads library would schedule the pthreads on the kernel threads and OpenVMS scheduler would schedule kernel threads on the CPUs. In effect, we can have multiple user threads running parallelly on multiple CPUs.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; how can i identify Multiple-Kernel-Thread activity via sda/T4/monitor/TDC...&lt;BR /&gt;From DCL, you can give &lt;BR /&gt;$ SHOW SYSTEM /MULTITHREAD&lt;BR /&gt;This will display only the multiple kernel threaded processes on the system. If you use /FULL qualifier along with this, you will get detailed information about each kernel thread within the process.&lt;BR /&gt;&lt;BR /&gt;From SDA, you can use &lt;BR /&gt;SDA&amp;gt; SHOW SUMMARY /THREAD&lt;BR /&gt;This will diplay all the processes, along with the kernel threads within the same process.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; i only can speculate about, whats going on...&lt;BR /&gt;&amp;gt;&amp;gt; &lt;BR /&gt;&amp;gt;&amp;gt; "serv" proc has:&lt;BR /&gt;&amp;gt;&amp;gt; 8 workerthreads&lt;BR /&gt;&amp;gt;&amp;gt; 8 kernel-threads&lt;BR /&gt;&amp;gt;&amp;gt; &lt;BR /&gt;&amp;gt;&amp;gt; or do i have 8 kernel threads for all processes on my system...&lt;BR /&gt;&lt;BR /&gt;The process "serv" has 8 kernel threads. Since MULTITHREAD parameter is 8, you *could* have upto eight kernel threads per process (for all the processes on the system). However, kernel threads are created *only* when there are more than one user thread. So if a process does not have multiple user threads (pthreads), then it will have only one kernel thread.&lt;BR /&gt;&lt;BR /&gt;Also, if the application has only 4 user threads, only 4 kernel threads would be created for the process. The kernel thread is created when the application creates a user thread. However, the creation kernel threads would be limited by the MULTITHREAD parameter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; And where is the boarder between the on-chip scheduling and the&lt;BR /&gt;&amp;gt;&amp;gt; openvms-scheduling?&lt;BR /&gt;&amp;gt;&amp;gt; The Montvale can handle two threads per core... &lt;BR /&gt;&amp;gt;&amp;gt; how does this handshake with the openvms scheduler... &lt;BR /&gt;&lt;BR /&gt;Hyperthreads (the threads on the chip) look to the operating system like CPUs.&lt;BR /&gt;&lt;BR /&gt;Hyperthreads does not have the complete hardware that a core would have. The two threads on a core will share the cache and execution logic. Hence, inside the&lt;BR /&gt;hardware, only one of the two threads is executing at any one time. The&lt;BR /&gt;hardware swaps between each thread based on a timer. The swap also happens if one of the threads stall or is idle. The advantage of this is if one thread is waiting for (lets say) a cache fill, the other thread can execute, hence better utilizing the core. However, since only one thread is executing at once, if a program executing on one&lt;BR /&gt;thread it slows down the program executing on the other.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Sandeep</description>
    <pubDate>Fri, 23 Oct 2009 03:13:53 GMT</pubDate>
    <dc:creator>Sandeep Ramavana</dc:creator>
    <dc:date>2009-10-23T03:13:53Z</dc:date>
    <item>
      <title>system dump analyzer and worker-threads and ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519553#M43018</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;when i use the sda prf extension to collect PC_Sampling information - why is the name of my process not in the following list (see attachment) =( There's just a "Not found"?&lt;BR /&gt;Found no information about this in the web... Maybe you can help me...&lt;BR /&gt;&lt;BR /&gt;By the way - how can i identify Multiple-Kernel-Thread activity via sda/T4/monitor/TDC... and why is in the WORLD WIDE WEB not at least ONE Diagram which shows, what MKTs are really are... i'll never understand this term...&lt;BR /&gt;&lt;BR /&gt;for example:&lt;BR /&gt;&lt;BR /&gt;i have a process "serv"&lt;BR /&gt;- serv has 8 workerthreads&lt;BR /&gt;- link-flags mkt/upcalls = 1&lt;BR /&gt;- sysgen-param multithread=8&lt;BR /&gt;- sysgen-param multiproc=3&lt;BR /&gt;- i have 4 montvale cpus (intel itanium 9140N) &lt;BR /&gt;- OpenVMS 8.3 for IA-64 Arch.&lt;BR /&gt;- Process Priority 16&lt;BR /&gt;&lt;BR /&gt;i only can speculate about, whats going on... &lt;BR /&gt;&lt;BR /&gt;"serv" proc has:&lt;BR /&gt;8 workerthreads&lt;BR /&gt;8 kernel-threads&lt;BR /&gt;&lt;BR /&gt;or do i have 8 kernel threads for all processes on my system...&lt;BR /&gt;&lt;BR /&gt;And where is the boarder between the on-chip scheduling and the openvms-scheduling?&lt;BR /&gt;The Montvale can handle two threads per core... how does this handshake with the openvms scheduler... iam a little bit frustrated... sorry... searched very long for a clearifying answer... Maybe you guys know much more about this.&lt;BR /&gt;&lt;BR /&gt;best greets!&lt;BR /&gt;Simon</description>
      <pubDate>Thu, 22 Oct 2009 17:26:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519553#M43018</guid>
      <dc:creator>dodger_1</dc:creator>
      <dc:date>2009-10-22T17:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: system dump analyzer and worker-threads and ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519554#M43019</link>
      <description>&lt;A href="http://books.google.com/books?id=ydKIsgCiFVsC&amp;amp;pg=PA151&amp;amp;dq=%22multiple+kernel+threads%22#v=onepage&amp;amp;q=%22multiple%20kernel%20threads%22&amp;amp;f=false" target="_blank"&gt;http://books.google.com/books?id=ydKIsgCiFVsC&amp;amp;pg=PA151&amp;amp;dq=%22multiple+kernel+threads%22#v=onepage&amp;amp;q=%22multiple%20kernel%20threads%22&amp;amp;f=false&lt;/A&gt;</description>
      <pubDate>Thu, 22 Oct 2009 22:26:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519554#M43019</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-10-22T22:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: system dump analyzer and worker-threads and ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519555#M43020</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;PRF does not show PID's by default.  You can use the following commands&lt;BR /&gt;to collect the PC samples for a process using PRF by following set of&lt;BR /&gt;commands.&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; PRF LOAD&lt;BR /&gt;SDA&amp;gt; prf start/index=&lt;PID&gt; pc_sampling&lt;BR /&gt;SDA&amp;gt; prf start collect&lt;BR /&gt;SDA&amp;gt; prf show collect&lt;BR /&gt;&lt;BR /&gt;You can also use PCS sda extension as below to collect PC samples&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt;PCS LOAD&lt;BR /&gt;SDA&amp;gt;PCS START TRACE&lt;BR /&gt;SDA&amp;gt;PCS STOP  TRACE&lt;BR /&gt;SDA&amp;gt;PCS DUMP &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;Then you can use SDA&amp;gt;PCS ANALYZE &lt;FILENAME&gt; to see PC samples&lt;BR /&gt;systemwide,particular process or processor.&lt;BR /&gt;&lt;BR /&gt;If your process has multiple pthreads then only depending on&lt;BR /&gt;whether you have enabled upcalls while linking and also the&lt;BR /&gt;fact that you have multiple processors decides whether your&lt;BR /&gt;process is running a single kernel thread or multiple kernel&lt;BR /&gt;thread&lt;BR /&gt;&lt;BR /&gt;Multiple Pthreads + Upcalls disabled = Single Kernel Thread&lt;BR /&gt;Multiple Pthreads + Upcalls Enabled = Multiple Kernel Thread&lt;BR /&gt;&lt;BR /&gt;Default number of maximum possible kernel threads a process&lt;BR /&gt;will have is decided by the number processors/cores you have.&lt;BR /&gt;This can be figured out by looking at MULTITHREAD sysgen&lt;BR /&gt;parameter.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Pramod.&lt;/FILENAME&gt;&lt;/FILENAME&gt;&lt;/PID&gt;</description>
      <pubDate>Fri, 23 Oct 2009 02:43:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519555#M43020</guid>
      <dc:creator>Pramod Kumar M</dc:creator>
      <dc:date>2009-10-23T02:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: system dump analyzer and worker-threads and ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519556#M43021</link>
      <description>Hi Simon,&lt;BR /&gt;&lt;BR /&gt;User threads are created by using pthreads/DECthreads library (or any other user library) to create multiple parallel execution contexts within the same process. All these user threads are part of the same process (and hence they share the address space, help, static storage etc.). However, each user thread has its own stack and register set.&lt;BR /&gt;&lt;BR /&gt;Prior to the introduction of kernel threads, the primary scheduling entity was a process. This means that even if the process was multithreaded, only one thread could be executing at one time (since execution of one thread would make the process CURrent). &lt;BR /&gt;&lt;BR /&gt;We can also have an threaded process that has multiple user threads ready to be executed. So the state of the process will be CURrent if it is executing even one of the user threads. Now, in a multiprocessor environment, we could have other processors that are idle, but it cannot execute other user threads within the same process.&lt;BR /&gt;&lt;BR /&gt;Kernel threads was introduced to take care of such a scenario. With OpenVMS V7.0, the primary scheduling entity is a kernel thread (instead of a process). This means, for a threaded process, OpenVMS creates as many "kernel threads" as there are processors. The user thread library "thinks" that each of the kernel thread is a processor. The user thread library (for e.g., pthreads library) has an internal scheduler which will schedule the user threads (pthreads) on the kernel threads. And the OpenVMS scheduler would schedule the kernel threads on the processors.&lt;BR /&gt;&lt;BR /&gt;So if we consider the above example, the process has multiple user threads that are ready to run, OpenVMS would create multiple kernel threads for this process. The pthreads library would schedule the pthreads on the kernel threads and OpenVMS scheduler would schedule kernel threads on the CPUs. In effect, we can have multiple user threads running parallelly on multiple CPUs.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; how can i identify Multiple-Kernel-Thread activity via sda/T4/monitor/TDC...&lt;BR /&gt;From DCL, you can give &lt;BR /&gt;$ SHOW SYSTEM /MULTITHREAD&lt;BR /&gt;This will display only the multiple kernel threaded processes on the system. If you use /FULL qualifier along with this, you will get detailed information about each kernel thread within the process.&lt;BR /&gt;&lt;BR /&gt;From SDA, you can use &lt;BR /&gt;SDA&amp;gt; SHOW SUMMARY /THREAD&lt;BR /&gt;This will diplay all the processes, along with the kernel threads within the same process.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; i only can speculate about, whats going on...&lt;BR /&gt;&amp;gt;&amp;gt; &lt;BR /&gt;&amp;gt;&amp;gt; "serv" proc has:&lt;BR /&gt;&amp;gt;&amp;gt; 8 workerthreads&lt;BR /&gt;&amp;gt;&amp;gt; 8 kernel-threads&lt;BR /&gt;&amp;gt;&amp;gt; &lt;BR /&gt;&amp;gt;&amp;gt; or do i have 8 kernel threads for all processes on my system...&lt;BR /&gt;&lt;BR /&gt;The process "serv" has 8 kernel threads. Since MULTITHREAD parameter is 8, you *could* have upto eight kernel threads per process (for all the processes on the system). However, kernel threads are created *only* when there are more than one user thread. So if a process does not have multiple user threads (pthreads), then it will have only one kernel thread.&lt;BR /&gt;&lt;BR /&gt;Also, if the application has only 4 user threads, only 4 kernel threads would be created for the process. The kernel thread is created when the application creates a user thread. However, the creation kernel threads would be limited by the MULTITHREAD parameter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; And where is the boarder between the on-chip scheduling and the&lt;BR /&gt;&amp;gt;&amp;gt; openvms-scheduling?&lt;BR /&gt;&amp;gt;&amp;gt; The Montvale can handle two threads per core... &lt;BR /&gt;&amp;gt;&amp;gt; how does this handshake with the openvms scheduler... &lt;BR /&gt;&lt;BR /&gt;Hyperthreads (the threads on the chip) look to the operating system like CPUs.&lt;BR /&gt;&lt;BR /&gt;Hyperthreads does not have the complete hardware that a core would have. The two threads on a core will share the cache and execution logic. Hence, inside the&lt;BR /&gt;hardware, only one of the two threads is executing at any one time. The&lt;BR /&gt;hardware swaps between each thread based on a timer. The swap also happens if one of the threads stall or is idle. The advantage of this is if one thread is waiting for (lets say) a cache fill, the other thread can execute, hence better utilizing the core. However, since only one thread is executing at once, if a program executing on one&lt;BR /&gt;thread it slows down the program executing on the other.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Sandeep</description>
      <pubDate>Fri, 23 Oct 2009 03:13:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519556#M43021</guid>
      <dc:creator>Sandeep Ramavana</dc:creator>
      <dc:date>2009-10-23T03:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: system dump analyzer and worker-threads and ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519557#M43022</link>
      <description>Hi Pramod,&lt;BR /&gt;&lt;BR /&gt;You can control the creation of multiple kernel threads during LINK time.&lt;BR /&gt;&lt;BR /&gt;$ LINK /THREADS_ENABLE=(MULTIPLE_KERNEL_THREADS,UPCALLS)&lt;BR /&gt;&lt;BR /&gt;will create multiple kernel threads on a multiprocessor system. The number of kernel threads to be created, however, is limited by the SYSGEN parameter MULTITHREAD.&lt;BR /&gt;&lt;BR /&gt;Creation of multiple kernel threads require upcalls to be enabled. However, the other way round is not true.&lt;BR /&gt;&lt;BR /&gt;So,&lt;BR /&gt;&lt;BR /&gt;Multiple Pthreads + Upcalls disabled = Single Kernel Thread and no upcalls&lt;BR /&gt;Multiple Pthreads + Upcalls Enabled = Single Kernel Thread and upcalls&lt;BR /&gt;Multiple Pthreads + Upcalls Enabled + Multiple kernel threads enabled = Multiple Kernel threads&lt;BR /&gt;&lt;BR /&gt;Also, if you have an application that is already built, you need not link it again to change these features.&lt;BR /&gt;&lt;BR /&gt;On Alpha, you can use the THREADCP utility to change these image flags.&lt;BR /&gt;On Itanium, you can use the DCL $ SET IMAGE command.&lt;BR /&gt;&lt;BR /&gt;Bet Regards,&lt;BR /&gt;Sandeep&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 03:29:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-dump-analyzer-and-worker-threads-and/m-p/4519557#M43022</guid>
      <dc:creator>Sandeep Ramavana</dc:creator>
      <dc:date>2009-10-23T03:29:33Z</dc:date>
    </item>
  </channel>
</rss>

