﻿<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>评论: 多核技术与并发多线程技术介绍</title>
	<link>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html</link>
	<description>dba on unix</description>
	<pubDate>Sat, 11 Oct 2008 14:17:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-432</link>
		<author>piner</author>
		<pubDate>Fri, 18 May 2007 03:26:36 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-432</guid>
					<description>再补充2个命令，bindprocessor获得是逻辑cpu个数，smtctl查看smt详细信息，更多信息，查看man

#&lt;font color=blue&gt;bindprocessor -q&lt;/font&gt;
&lt;pre style='background:#e6e6e6;margin: 0cm 0cm 0pt'&gt;
    The available processors are:  0 1 2 3 4 5 6 7&lt;/pre&gt;

#&lt;font color=blue&gt;smtctl&lt;/font&gt;
&lt;pre style='background:#e6e6e6;margin: 0cm 0cm 0pt'&gt;
    This system is SMT capable.
    
    SMT is currently enabled.
    
    SMT boot mode is not set.
    SMT threads are bound to the same physical processor.
    
    proc0 has 2 SMT threads.
    Bind processor 0 is bound with proc0
    Bind processor 1 is bound with proc0
    
    
    proc2 has 2 SMT threads.
    Bind processor 2 is bound with proc2
    Bind processor 3 is bound with proc2
    
    
    proc4 has 2 SMT threads.
    Bind processor 4 is bound with proc4
    Bind processor 5 is bound with proc4
    
    
    proc6 has 2 SMT threads.
    Bind processor 6 is bound with proc6
    Bind processor 7 is bound with proc6&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>再补充2个命令，bindprocessor获得是逻辑cpu个数，smtctl查看smt详细信息，更多信息，查看man</p>
<p>#<font color=blue>bindprocessor -q</font></p>
<pre style='background:#e6e6e6;margin: 0cm 0cm 0pt'>
    The available processors are:  0 1 2 3 4 5 6 7</pre>
<p>#<font color=blue>smtctl</font></p>
<pre style='background:#e6e6e6;margin: 0cm 0cm 0pt'>
    This system is SMT capable.

    SMT is currently enabled.

    SMT boot mode is not set.
    SMT threads are bound to the same physical processor.

    proc0 has 2 SMT threads.
    Bind processor 0 is bound with proc0
    Bind processor 1 is bound with proc0

    proc2 has 2 SMT threads.
    Bind processor 2 is bound with proc2
    Bind processor 3 is bound with proc2

    proc4 has 2 SMT threads.
    Bind processor 4 is bound with proc4
    Bind processor 5 is bound with proc4

    proc6 has 2 SMT threads.
    Bind processor 6 is bound with proc6
    Bind processor 7 is bound with proc6</pre>
]]></content:encoded>
				</item>
	<item>
		<title>作者: 马艺桐</title>
		<link>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-433</link>
		<author>马艺桐</author>
		<pubDate>Fri, 18 May 2007 04:44:56 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-433</guid>
					<description>补充的命令好，学习中......</description>
		<content:encoded><![CDATA[<p>补充的命令好，学习中&#8230;&#8230;</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: melity78</title>
		<link>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-1497</link>
		<author>melity78</author>
		<pubDate>Sat, 26 Jan 2008 13:17:50 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-1497</guid>
					<description>"并发多线程技术则需要OS的支持，是在OS级别上，可以实现一个物理cpu的多线程并发处理."
你这句话错误明显，大部分操作系统在一个单核上的多线程运行都是异步方式的，都是每个线程获取相应的时间片到期或者由于i/o会让出cpu周期，让其它线程运行，不是并发执行的。有些操作系统或者虚拟机可以根据一个核中存在的多个执行流水线（如mimd）架构并行执行一段代码。
在多核cpu上，多线程才是在多个多核上运行。
同事并发多线程技术并不需要os支持，自己采用芯片提供的开发接口就能实现，并且为了减少线程之间的上下文切换的代价，完全可以用一个核对应一个线程，然后在线程中实现轻线程机制，避免多线程上下文切换的代价，你可以参考下erlang。</description>
		<content:encoded><![CDATA[<p>&#8220;并发多线程技术则需要OS的支持，是在OS级别上，可以实现一个物理cpu的多线程并发处理.&#8221;<br />
你这句话错误明显，大部分操作系统在一个单核上的多线程运行都是异步方式的，都是每个线程获取相应的时间片到期或者由于i/o会让出cpu周期，让其它线程运行，不是并发执行的。有些操作系统或者虚拟机可以根据一个核中存在的多个执行流水线（如mimd）架构并行执行一段代码。<br />
在多核cpu上，多线程才是在多个多核上运行。<br />
同事并发多线程技术并不需要os支持，自己采用芯片提供的开发接口就能实现，并且为了减少线程之间的上下文切换的代价，完全可以用一个核对应一个线程，然后在线程中实现轻线程机制，避免多线程上下文切换的代价，你可以参考下erlang。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-1502</link>
		<author>piner</author>
		<pubDate>Mon, 28 Jan 2008 01:52:54 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-1502</guid>
					<description>硬件实现的只是构架，没有软件（OS）的支持，是不行的。
你跟我说的好象根本不是一回事，我没有看明白你的意思。</description>
		<content:encoded><![CDATA[<p>硬件实现的只是构架，没有软件（OS）的支持，是不行的。<br />
你跟我说的好象根本不是一回事，我没有看明白你的意思。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: bruce</title>
		<link>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-1742</link>
		<author>bruce</author>
		<pubDate>Sun, 04 May 2008 02:48:00 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/104-cpu-core-smt.html#comment-1742</guid>
					<description>文章作者是对的！！！

[quote]“并发多线程技术则需要OS的支持，是在OS级别上，可以实现一个物理cpu的多线程并发处理.”你这句话错误明显，大部分操作系统在一个单核上的多线程运行都是异步方式的，都是每个线程获取相应的时间片到期或者由于i/o会让出cpu周期，让其它线程运行，不是并发执行的。有些操作系统或者虚拟机可以根据一个核中存在的多个执行流水线（如mimd）架构并行执行一段代码。在多核cpu上，多线程才是在多个多核上运行。同事并发多线程技术并不需要os支持，自己采用芯片提供的开发接口就能实现，并且为了减少线程之间的上下文切换的代价，完全可以用一个核对应一个线程，然后在线程中实现轻线程机制，避免多线程上下文切换的代价，你可以参考下erlang。[/quote]</description>
		<content:encoded><![CDATA[<p>文章作者是对的！！！</p>
<p>[quote]“并发多线程技术则需要OS的支持，是在OS级别上，可以实现一个物理cpu的多线程并发处理.”你这句话错误明显，大部分操作系统在一个单核上的多线程运行都是异步方式的，都是每个线程获取相应的时间片到期或者由于i/o会让出cpu周期，让其它线程运行，不是并发执行的。有些操作系统或者虚拟机可以根据一个核中存在的多个执行流水线（如mimd）架构并行执行一段代码。在多核cpu上，多线程才是在多个多核上运行。同事并发多线程技术并不需要os支持，自己采用芯片提供的开发接口就能实现，并且为了减少线程之间的上下文切换的代价，完全可以用一个核对应一个线程，然后在线程中实现轻线程机制，避免多线程上下文切换的代价，你可以参考下erlang。[/quote]</p>
]]></content:encoded>
				</item>
</channel>
</rss>
