﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Charles-随笔分类-读书作笔记</title><link>http://www.cppblog.com/Winux32/category/3063.html</link><description>Thinking low level, Coding high level</description><language>zh-cn</language><lastBuildDate>Tue, 20 May 2008 03:44:43 GMT</lastBuildDate><pubDate>Tue, 20 May 2008 03:44:43 GMT</pubDate><ttl>60</ttl><item><title>经典</title><link>http://www.cppblog.com/Winux32/archive/2006/12/05/16025.html</link><dc:creator>Charles</dc:creator><author>Charles</author><pubDate>Tue, 05 Dec 2006 11:41:00 GMT</pubDate><guid>http://www.cppblog.com/Winux32/archive/2006/12/05/16025.html</guid><wfw:comment>http://www.cppblog.com/Winux32/comments/16025.html</wfw:comment><comments>http://www.cppblog.com/Winux32/archive/2006/12/05/16025.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/Winux32/comments/commentRss/16025.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Winux32/services/trackbacks/16025.html</trackback:ping><description><![CDATA[
		<font face="Verdana" color="#0000ff" size="2">下班后，花了点时间读了一下UNIX编程艺术的第一章，UNIX哲学。感觉非常好，品味大师的教诲，有醍醐灌顶之感！<br />值得研读<br /><a class="" title="UNIX哲学" href="/Files/Winux32/UNIX编程艺术之UNIX哲学.rar" target="">UNIX哲学</a></font>
		<br />
		<br />
		<font face="Verdana" color="#0000ff" size="2">今天下午(次日)，在china-pub上找到了这本书的第二章免读版，再次拜读大师巨著。<br />Those who cannot remember the past are condemned to repeat it.<br /><a class="" title="历史" href="/Files/Winux32/UNIX编程艺术之历史.rar" target="_blank"><font color="#ff0000">历史</font></a></font>
<img src ="http://www.cppblog.com/Winux32/aggbug/16025.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Winux32/" target="_blank">Charles</a> 2006-12-05 19:41 <a href="http://www.cppblog.com/Winux32/archive/2006/12/05/16025.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>贴图释义内存</title><link>http://www.cppblog.com/Winux32/archive/2006/11/29/15771.html</link><dc:creator>Charles</dc:creator><author>Charles</author><pubDate>Wed, 29 Nov 2006 03:19:00 GMT</pubDate><guid>http://www.cppblog.com/Winux32/archive/2006/11/29/15771.html</guid><wfw:comment>http://www.cppblog.com/Winux32/comments/15771.html</wfw:comment><comments>http://www.cppblog.com/Winux32/archive/2006/11/29/15771.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Winux32/comments/commentRss/15771.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Winux32/services/trackbacks/15771.html</trackback:ping><description><![CDATA[
		<p>
				<font face="Verdana" color="#0000ff" size="2">昨儿个读了《Write Greate Code》Volume1: Understanding the Machine<br />想通了很久困惑的问题，受益匪浅，贴图以共享<br /><br />1. 约翰.冯.诺伊曼体系结构(Von Neumann Architecture，VNA)<br /><img height="271" alt="VNA.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/VNA.JPG" width="332" border="0" /><br />2.内存物理组织<br />Read<br /><img height="198" alt="Read.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/Read.JPG" width="407" border="0" /><br />Write<br /><img height="198" alt="Write.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/Write.JPG" width="404" border="0" /><br />3.地址总线<br />8bit<br /><img height="214" alt="8bit.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/8bit.JPG" width="544" border="0" /><br />16bit<br />Say more here, there are a concept named <strong>bank </strong>which confused me when I read &lt;Intel Architecture Software Developer's Manual&gt;. The physical memory is organized into two banks, even and odd, in 16 bits data addr bus.<br />So, 16 bits x86 CPUs always put even addr on the addr bus, and if they access odd addr, the CPUs must op memory twice. <br /><img height="271" alt="16bit.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/16bit.JPG" width="368" border="0" /></font>
		</p>
		<p>
				<font face="Verdana">
						<font color="#0000ff" size="2">32bits<br />As with 16 bits, 32bits x86 CPUs always put 4X addr on their addr bus. <br /><img height="302" alt="32bit.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/32bit.JPG" width="480" border="0" /><br />4. Byte Genders<em><font face="Times New Roman" color="#000000" size="3"><br /></font></em>Little Endian</font>
				</font>
				<br />
				<img style="WIDTH: 768px; HEIGHT: 167px" height="167" alt="LittleEndian.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/LittleEndian.JPG" width="1000" border="0" />
				<br />
				<br />
				<font face="Verdana">
						<font color="#0000ff" size="2">Big Endian<br /></font>
						<img style="WIDTH: 770px; HEIGHT: 171px" height="171" alt="BigEndian.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/BigEndian.JPG" width="1000" border="0" />
						<br />
				</font>
		</p>
		<p>
				<font face="Verdana" color="#0000ff" size="2">5. System Clock</font>
		</p>
		<p>
				<font face="Verdana" color="#0000ff" size="2">
						<img height="160" alt="SysClock.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/SysClock.JPG" width="507" border="0" />
						<br />6. 内存访问<br />内存访问时间：从CPU讲地址放到地址总线上开始到CPU从数据总线上取得数据之间的时间。<br />x86 CPU，具有单周期内存访问时间<br /><img height="532" alt="X86MemAccessCycle.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/X86MemAccessCycle.JPG" width="635" border="0" /><br />等待状态——(CPU)别跑那么快，等等我(IO)<br /><img height="343" alt="WaitState.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/WaitState.JPG" width="630" border="0" /></font>
		</p>
		<p>
				<font face="Verdana" color="#0000ff" size="2">Cache-引用的时空局部特性(temporal and spatial locality of reference)<br /><img height="289" alt="Cache.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/Cache.JPG" width="558" border="0" /><br /><br /><br />7. 内存寻址模式<br />直接(direct), 间接(indirect), 变址(indexed), 比例变址(scaled indexed)<br /><br />8. 内存层次结构(hierarchy)<br />说一下NUMA，非一致内存访问(Non-Uniform Memory Access)，NUMA本来是说不同类型的内存有着不同的访问时间，此处用来描述一些电气上与主存类似，但由于其速度比主存低很多的内存。一如，显存，闪存。<br /><img height="360" alt="MemHierarchy.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Arch/MemHierarchy.JPG" width="451" border="0" /><br />So..., that's all for today :p<br /> </font>
		</p>
<img src ="http://www.cppblog.com/Winux32/aggbug/15771.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Winux32/" target="_blank">Charles</a> 2006-11-29 11:19 <a href="http://www.cppblog.com/Winux32/archive/2006/11/29/15771.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读【计算机图形学导论】</title><link>http://www.cppblog.com/Winux32/archive/2006/11/16/15257.html</link><dc:creator>Charles</dc:creator><author>Charles</author><pubDate>Thu, 16 Nov 2006 12:00:00 GMT</pubDate><guid>http://www.cppblog.com/Winux32/archive/2006/11/16/15257.html</guid><wfw:comment>http://www.cppblog.com/Winux32/comments/15257.html</wfw:comment><comments>http://www.cppblog.com/Winux32/archive/2006/11/16/15257.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Winux32/comments/commentRss/15257.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Winux32/services/trackbacks/15257.html</trackback:ping><description><![CDATA[
		<font face="Verdana" color="#0000ff" size="2">昨天在网上逛的时候发现了一本不错的书-【计算机图形学的算法基础】，读了第一章计算机图形学导论，收获颇多。<br /><br /><a class="" title="ACM" href="http://www.acm.org/" target="">美国计算机协会</a>(Association of Computing Machinery, ACM), 图形学专业委员会(Special Interest Group on Graphics)<br /><font color="#ff0000">图形</font> 广义概念，凡是可以在图形设备上输出的点、线和文本等的集合都可以称为图形。点是图形的基本组成元素。<br /><font color="#ff0000">窗口(Window)和视口(Viewport)</font> Window是用窗口边界裁剪数据并获得所需的部分；Viewport是显示设备上用于显示窗口框定内容的一个区域。<br /><img height="235" alt="WindowViewport.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/WindowViewport.JPG" width="647" border="0" /><br /><br /><font color="#ff0000">光栅(raster)显示器</font> 逻辑上可看作可发光点阵，只有在水平、垂直或45度的情况下才能用像素点画出一条“直”线<br /><img height="235" alt="line.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/line.JPG" width="518" border="0" /><br /><font color="#ff0000">位平面(bit plane)</font> 每个像素一位存储容量的帧缓冲区(frame buffer)<br /><img height="207" alt="bitplane1.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/bitplane1.JPG" width="535" border="0" /><br /><br />位平面的产生是当年内存资源有限聪明的Hareware Vender想出来的巧招，(了解历史才可能更好的把握现在)，增加位平面数可以表示不同的彩色或灰度级。把各个位平面与当前像素对应的0/1值读入到寄存器相应的位，最后得到的二进制数就是像素在0(黑)到2<sup>n </sup>- 1(最大强度)之间的光强等级。最后由数模转换为模拟电压。<br /><img height="348" alt="bitplane2.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/bitplane2.JPG" width="567" border="0" /><br /><br />进一步的方法，使用调色板。从寄存器中读出来的值作为颜色表的索引。颜色表必须有2<sup>n</sup>表项，每一项为W位宽，W一般比N大。这样光强等级可以有2<sup>w</sup>个，但一次只能同时使用2<sup>n</sup>个表项，如果要使用其他光强等级，就必须重装颜色表。<br /><img height="365" alt="bitplane3.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/bitplane3.JPG" width="570" border="0" /><br />再进一步，彩色帧缓冲区。三原色，红绿蓝RGB。三个位面分别对应一种原色，三个原色电子枪。<br /><img height="286" alt="bitplane4.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/bitplane4.JPG" width="570" border="0" /><br />更进一步，每支电子枪使用更多位平面。<br /><img height="451" alt="bitplane5.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/bitplane5.JPG" width="570" border="0" /><br />组合<br /><img height="672" alt="bitplane6.JPG" src="http://www.cppblog.com/images/cppblog_com/winux32/Graph/bitplane6.JPG" width="541" border="0" /><br />位平面就此打住，下一话题。<br /><br />回头再补充吧，还有很多，今天时间不多了, 待续...<br /><br /></font>
<img src ="http://www.cppblog.com/Winux32/aggbug/15257.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Winux32/" target="_blank">Charles</a> 2006-11-16 20:00 <a href="http://www.cppblog.com/Winux32/archive/2006/11/16/15257.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>