<?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 Threading Model Poll in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Threading-Model-Poll/m-p/986559#M5849</link>
    <description>Threading Model defines the way a user thread maps to a kernel scheduled entity, either a process or a kernel thread. There are two leading models 1:1 (one to one) and M:N.&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;In 1:1 approach&lt;/B&gt;, each user thread is mapped to a kernel scheduled entity. Thread creation, termination, synchronization and scheduling all end up as kernel activities.&lt;BR /&gt;&lt;B&gt;The strength&lt;/B&gt; is that the thread scheduling is simple. Application software is easy to debug.&lt;BR /&gt;&lt;B&gt;The weakness&lt;/B&gt; is the management overhead to maintain all the threads information, the time spent on ring switches (going from user to kernel space) for major thread operations and also the potential bottleneck in kernel scheduler. Many kernel threads increase the chances of context switch.&lt;BR /&gt;Win32 Threads,  LinuxThread, and NPTL adopts 1:1 Model.&lt;BR /&gt; &lt;BR /&gt;&lt;B&gt;In M:N approach&lt;/B&gt;, user and kernel threads do not have to be in a fixed correlation, ie Many user threads running on aNy number of kernel threads. Thread creation, termination and synchronization could simply be user space operations. Thread scheduling is accomplished as a joint effort between user space scheduler and kernel level scheduler.&lt;BR /&gt;&lt;B&gt;The strength&lt;/B&gt; is the flexibility. The number of user threads could be optimized for each application workload, and number of kernel threads optimized for number of processors or availability of HT. Another area of strength is the scalability. Large amount of user threads do not necessarily translate into huge kernel data structures, which reduces the chance of context switching. Thread creation, termination and some synchronization happens on the user space.&lt;BR /&gt;&lt;B&gt;The weakness&lt;/B&gt; is that the synchronization involves the intact cooperation between kernel and user scheduler and thus complex and difficult to implement. For example, a simple mechanism of scheduling activation, which requires user level scheduler provide the hints to the kernel and the kernel scheduler notifies the result to the user scheduler, would necessitate passing a substantial amount kernel information from kernel to user space.&lt;BR /&gt;Both Window Fibers and IBM NGPT for Linux implements M:N model, do did the previous Solaris? version.   &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 12 Aug 2003 07:13:31 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2003-08-12T07:13:31Z</dc:date>
    <item>
      <title>Threading Model Poll</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Threading-Model-Poll/m-p/986559#M5849</link>
      <description>Threading Model defines the way a user thread maps to a kernel scheduled entity, either a process or a kernel thread. There are two leading models 1:1 (one to one) and M:N.&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;In 1:1 approach&lt;/B&gt;, each user thread is mapped to a kernel scheduled entity. Thread creation, termination, synchronization and scheduling all end up as kernel activities.&lt;BR /&gt;&lt;B&gt;The strength&lt;/B&gt; is that the thread scheduling is simple. Application software is easy to debug.&lt;BR /&gt;&lt;B&gt;The weakness&lt;/B&gt; is the management overhead to maintain all the threads information, the time spent on ring switches (going from user to kernel space) for major thread operations and also the potential bottleneck in kernel scheduler. Many kernel threads increase the chances of context switch.&lt;BR /&gt;Win32 Threads,  LinuxThread, and NPTL adopts 1:1 Model.&lt;BR /&gt; &lt;BR /&gt;&lt;B&gt;In M:N approach&lt;/B&gt;, user and kernel threads do not have to be in a fixed correlation, ie Many user threads running on aNy number of kernel threads. Thread creation, termination and synchronization could simply be user space operations. Thread scheduling is accomplished as a joint effort between user space scheduler and kernel level scheduler.&lt;BR /&gt;&lt;B&gt;The strength&lt;/B&gt; is the flexibility. The number of user threads could be optimized for each application workload, and number of kernel threads optimized for number of processors or availability of HT. Another area of strength is the scalability. Large amount of user threads do not necessarily translate into huge kernel data structures, which reduces the chance of context switching. Thread creation, termination and some synchronization happens on the user space.&lt;BR /&gt;&lt;B&gt;The weakness&lt;/B&gt; is that the synchronization involves the intact cooperation between kernel and user scheduler and thus complex and difficult to implement. For example, a simple mechanism of scheduling activation, which requires user level scheduler provide the hints to the kernel and the kernel scheduler notifies the result to the user scheduler, would necessitate passing a substantial amount kernel information from kernel to user space.&lt;BR /&gt;Both Window Fibers and IBM NGPT for Linux implements M:N model, do did the previous Solaris? version.   &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Aug 2003 07:13:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Threading-Model-Poll/m-p/986559#M5849</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2003-08-12T07:13:31Z</dc:date>
    </item>
  </channel>
</rss>

