<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Einen Thread auf eine bestimmte Core legen]]></title><description><![CDATA[<p>Servus, ist es eigentlich möglich einen Thread auf einer bestimmten Core laufen zu lassen?<br />
Ich würde gerne einen Thred auf dem ersten Core und einen zweiten Thread auf einem anderen Core setzen, vorausgesetzt die CPU ist eine Multi-Core-Architektur.<br />
Ist das überhaupt irgendwie möglich? Hat da schon einer Erfahrung? Ob Windows oder Linux ist mir relativ egal, lieber wär mir allerdings windows.</p>
<p>heimschmiede</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/185430/einen-thread-auf-eine-bestimmte-core-legen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 21:41:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185430.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jun 2007 15:06:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Mon, 25 Jun 2007 15:06:42 GMT]]></title><description><![CDATA[<p>Servus, ist es eigentlich möglich einen Thread auf einer bestimmten Core laufen zu lassen?<br />
Ich würde gerne einen Thred auf dem ersten Core und einen zweiten Thread auf einem anderen Core setzen, vorausgesetzt die CPU ist eine Multi-Core-Architektur.<br />
Ist das überhaupt irgendwie möglich? Hat da schon einer Erfahrung? Ob Windows oder Linux ist mir relativ egal, lieber wär mir allerdings windows.</p>
<p>heimschmiede</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313439</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313439</guid><dc:creator><![CDATA[Heimschmiede]]></dc:creator><pubDate>Mon, 25 Jun 2007 15:06:42 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Mon, 25 Jun 2007 16:22:06 GMT]]></title><description><![CDATA[<p>SetThreadAffinityMask</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313501</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313501</guid><dc:creator><![CDATA[Benutzername:]]></dc:creator><pubDate>Mon, 25 Jun 2007 16:22:06 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Mon, 25 Jun 2007 17:01:04 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-14811.html" rel="nofollow">Tim</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-10.html" rel="nofollow">ANSI C</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313532</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313532</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 25 Jun 2007 17:01:04 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Mon, 25 Jun 2007 17:24:03 GMT]]></title><description><![CDATA[<p>ein thread kann nicht auf einem anderen Prozessor als auf dem der main Prozess läuft.</p>
<p>aus <a href="http://msdn2.microsoft.com/en-us/library/ms686247.aspx" rel="nofollow">SetThreadAffinityMask</a>:</p>
<blockquote>
<p>A thread affinity mask is a bit vector in which each bit represents the processors that a thread is allowed to run on. A thread affinity mask must be a subset of the process affinity mask for the containing process of a thread. A thread can only run on the processors its process can run on.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1313548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313548</guid><dc:creator><![CDATA[firefly]]></dc:creator><pubDate>Mon, 25 Jun 2007 17:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Mon, 25 Jun 2007 21:34:19 GMT]]></title><description><![CDATA[<p>Firefly, ich denke da hast du was falsch verstanden.</p>
<p>Der &quot;main thread&quot; selbst hat eine &quot;thread affinity mask&quot;, jeder andere thread hat eine, und dann hat der Prozess nochmal eine eigene &quot;process affinity mask&quot;.</p>
<p>Das heisst aber nicht dass du den Thread in dem main() ausgeführt wird nicht auf Core 1 festbügeln könntest während ein anderer Thread des selben Prozesses auf Core 2 festgebügelt ist.</p>
<p>Du kannst bloss nicht als &quot;proccess affinity mask&quot; 1 angeben und dann für einen Thread eine &quot;thread affinity mask&quot; von 2. Wenn du die<br />
&quot;proccess affinity mask&quot; aber auf &quot;alle&quot; lässt kannst du die einzelnen threads setzen wie du lustig bist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313691</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313691</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 25 Jun 2007 21:34:19 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Tue, 26 Jun 2007 07:49:59 GMT]]></title><description><![CDATA[<p>ah, wunderbar. danke für die schnellen antworten.<br />
aber wie setzt man denn nun die process affinity mask ?<br />
und wisst ihr grad zufällig auch, wie man einfach herausfindet, wie viele cores überhaupt existieren? wenn nich, is auch egal, dann schreib ichs in assembler (cpuid lässt grüßen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313789</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313789</guid><dc:creator><![CDATA[Heimschmiede]]></dc:creator><pubDate>Tue, 26 Jun 2007 07:49:59 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Tue, 26 Jun 2007 09:44:59 GMT]]></title><description><![CDATA[<p>Heimschmiede schrieb:</p>
<blockquote>
<p>und wisst ihr grad zufällig auch, wie man einfach herausfindet, wie viele cores überhaupt existieren?</p>
</blockquote>
<pre><code class="language-cpp">SYSTEM_INFO si;
GetSystemInfo(&amp;si); 
// jetzt enthält si.dwNumberOfProcessors die Anzahl der virtuellen Prozessoren (also Kerne).
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1313860</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313860</guid><dc:creator><![CDATA[thommy88]]></dc:creator><pubDate>Tue, 26 Jun 2007 09:44:59 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Tue, 26 Jun 2007 09:45:30 GMT]]></title><description><![CDATA[<p>Nur als kleine Anmerkung: Du kannst unter Windows <em>nicht</em> einen Thread auf einen Core <strong>festlegen</strong>!!!!!<br />
Du kannst Ihn <em>nur</em> <strong>beschränken</strong>!</p>
<p>Es macht also IMHO in den seltensten Fällen Sinn dies zu machen. Du nimmst Deinem Thread nur Zeit weg!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313862</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 26 Jun 2007 09:45:30 GMT</pubDate></item><item><title><![CDATA[Reply to Einen Thread auf eine bestimmte Core legen on Tue, 26 Jun 2007 17:25:50 GMT]]></title><description><![CDATA[<blockquote>
<p>aber wie setzt man denn nun die process affinity mask</p>
</blockquote>
<p>tu dir selbst und uns einen gefallen und schlag solche dinge in der MSDN nach.<br />
du hast in diesem thread leicht genug informationen um die entsprechende funktion in der MSDN in weniger als 5 minuten zu finden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314203</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 26 Jun 2007 17:25:50 GMT</pubDate></item></channel></rss>