<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>倪勋的专栏</title><link>http://blog.csdn.net/nixun/</link><description>智慧和勇气，人生的两个财富</description><dc:language>zh-CN</dc:language><lastUpdateTime>Sun, 18 May 2008 14:21:48 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>nixun</dc:creator><title>EMC笔试题</title><link>http://blog.csdn.net/nixun/archive/2008/03/13/2178681.aspx</link><pubDate>Thu, 13 Mar 2008 19:32:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2008/03/13/2178681.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/2178681.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2008/03/13/2178681.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/2178681.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2178681</trackback:ping><description>EMC笔试题&lt;img src ="http://blog.csdn.net/nixun/aggbug/2178681.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>管理PnP状态转换</title><link>http://blog.csdn.net/nixun/archive/2007/11/27/1904791.aspx</link><pubDate>Tue, 27 Nov 2007 21:38:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2007/11/27/1904791.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/1904791.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2007/11/27/1904791.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/1904791.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1904791</trackback:ping><description>正如本章开头提到的，WDM需要跟踪设备的状态转换。状态跟踪还涉及到如何排队和取消IRP。而取消操作需要用到一个全局取消自旋锁，但该锁在多处理器机器上会造成性能瓶颈。IRP处理的标准模型不能解决所有这些问题。因此，在这一节中，我将介绍一种新的对象类型，DEVQUEUE，你可以在PnP请求处理中使用这种对象，它可以代替标准模型中的StartPacket和StartNextPacket例程。DEVQUEUE是我自己的创造，使用它的例子驱动程序有PNPPOWER和CANCEL。关于IRP取消的其它讨论见Ervin Peretz的文章“The Windows Driver Model Simplifies Management of Device Driver I/O Requests” (Microsoft Systems Journal, January 1999)。我描述的一部分IRP取消逻辑还来自Peretz和其它Microsoft雇员的工作。&lt;img src ="http://blog.csdn.net/nixun/aggbug/1904791.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>IRP</title><link>http://blog.csdn.net/nixun/archive/2007/11/27/1904787.aspx</link><pubDate>Tue, 27 Nov 2007 21:37:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2007/11/27/1904787.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/1904787.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2007/11/27/1904787.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/1904787.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1904787</trackback:ping><description>有两个数据结构对I/O请求的处理至关重要：I/O请求包(IRP)本身和IO_STACK_LOCATION结构。下面我将详细描述这两个结构。&lt;img src ="http://blog.csdn.net/nixun/aggbug/1904787.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>自旋锁</title><link>http://blog.csdn.net/nixun/archive/2007/11/27/1904781.aspx</link><pubDate>Tue, 27 Nov 2007 21:35:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2007/11/27/1904781.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/1904781.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2007/11/27/1904781.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/1904781.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1904781</trackback:ping><description>IRQL概念仅能解决单CPU上的同步问题，在多处理器平台上，它不能保证你的代码不被运行在其它处理器上的代码所干扰。一个称为自旋锁(spin lock)的原始对象可以解决这个问题。为了获得一个自旋锁，在某CPU上运行的代码需先执行一个原子操作，该操作测试并设置(test-and-set)某个内存变量，由于它是原子操作，所以在该操作完成之前其它CPU不可能访问这个内存变量。如果测试结果表明锁已经空闲，则程序获得这个自旋锁并继续执行。如果测试结果表明锁仍被占用，程序将在一个小的循环内重复这个“测试并设置(test-and-set)”操作，即开始“自旋”。最后，锁的所有者通过重置该变量释放这个自旋锁，于是，某个等待的test-and-set操作向其调用者报告锁已释放。

关于自旋锁有两个明显的事实。第一，如果一个已经拥有某个自旋锁的CPU想第二次获得这个自旋锁，则该CPU将死锁(deadlock)。自旋锁没有与其关联的“使用计数器”或“所有者标识”；锁或者被占用或者空闲。如果你在锁被占用时获取它，你将等待到该锁被释放。如果碰巧你的CPU已经拥有了该锁，那么用于释放锁的代码将得不到运行，因为&lt;img src ="http://blog.csdn.net/nixun/aggbug/1904781.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>中断请求级</title><link>http://blog.csdn.net/nixun/archive/2007/11/27/1904776.aspx</link><pubDate>Tue, 27 Nov 2007 21:34:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2007/11/27/1904776.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/1904776.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2007/11/27/1904776.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/1904776.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1904776</trackback:ping><description>Windows NT为每个硬件中断和少数软件事件赋予了一个优先级，即中断请求级(interrupt request level - IRQL)。IRQL为单CPU上的活动提供了同步方法，它基于下面规则：

一旦某CPU执行在高于PASSIVE_LEVEL的IRQL上时，该CPU上的活动仅能被拥有更高IRQL的活动抢先。

图4-1显示了x86平台上的IRQL值范围。(通常，这个IRQL数值要取决于你所面对的平台) 用户模式程序执行在PASSIVE_LEVEL上，可以被任何执行在高于该IRQL上的活动抢先。许多设备驱动程序例程也执行在PASSIVE_LEVEL上。第二章中讨论的DriverEntry和AddDevice例程就属于这类，大部分IRP派遣例程也属于这类。

某些公共驱动程序例程执行在DISPATCH_LEVEL上，而DISPATCH_LEVEL级要比PASSIVE_LEVEL级高。这些公共例程包括StartIo例程，DPC(推迟过程调用)例程，和其它一些例程。这些例程的共同特点是，它们都需要访问设备对象和设备扩展中的某些域，它们都不受派遣例程的干扰或互相干扰。当任&lt;img src ="http://blog.csdn.net/nixun/aggbug/1904776.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>内存管理</title><link>http://blog.csdn.net/nixun/archive/2007/11/27/1904770.aspx</link><pubDate>Tue, 27 Nov 2007 21:32:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2007/11/27/1904770.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/1904770.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2007/11/27/1904770.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/1904770.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1904770</trackback:ping><description>这一节我们讨论内存管理。Windows 2000采用多种方式分割虚拟地址空间。一种方式是基于安全性和完整性，有两种地址：用户模式地址和内核模式地址。另一种方式基于处理器的分页能力，有两种内存：分页内存和非分页内存。全部用户模式地址和某些内核模式地址使用分页内存，内存管理器可以在分页内存页帧和磁盘扇区间交换内容，而另一些内核模式地址总是引用物理内存中固定的页帧。由于Windows 2000允许驱动程序的某些部分存在于分页内存中，所以我将阐述如何在编译时和运行时控制驱动程序的分页属性。

Windows 2000提供了多种内存管理方法。我将描述其中的两个基本服务函数，ExAllocatePool和ExFreePool，你可以用它们从堆上分配和释放任意大小的内存块。我还将描述把内存块组织成结构链表的原语。最后，我将描述lookaside(后援式)链表的概念，它可以使你高效率地分配和释放相同大小的内存块。 

&lt;img src ="http://blog.csdn.net/nixun/aggbug/1904770.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>WDM 驱动错误处理</title><link>http://blog.csdn.net/nixun/archive/2007/11/27/1904731.aspx</link><pubDate>Tue, 27 Nov 2007 21:27:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2007/11/27/1904731.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/1904731.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2007/11/27/1904731.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/1904731.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1904731</trackback:ping><description>人总会犯错误，错误恢复是软件工程的一部分。程序中总会发生异常情况，其中一些源自程序中的Bug，或者在我们的代码中或者在调用我们代码的用户模式应用程序中。另一些涉及到系统装载或硬件的瞬间状态。无论什么原因，代码必须能对不寻常的情况作出恰当的反应。在这一节中，我将描述三种错误处理形式：状态代码、结构化异常处理，和bug check。一般，内核模式支持例程通过返回状态代码来报告意外错误。对于正常情况，它们将返回布尔值或者数值而不是正式的状态代码。结构化异常处理为异常事件发生后的清除工作提供了一个标准化方法，它可以避免因为异常事件而导致系统崩溃，异常事件是指诸如被零除或参考无效指针等的意外错误。Bug check实际上就是致命错误的内部名称，对于这种错误，唯一的解决办法就是重启动系统。&lt;img src ="http://blog.csdn.net/nixun/aggbug/1904731.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>好久没更新了。。。。。。</title><link>http://blog.csdn.net/nixun/archive/2007/06/27/1669305.aspx</link><pubDate>Wed, 27 Jun 2007 20:02:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2007/06/27/1669305.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/1669305.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2007/06/27/1669305.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/1669305.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1669305</trackback:ping><description>随笔&lt;img src ="http://blog.csdn.net/nixun/aggbug/1669305.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>Google 面试题讨论</title><link>http://blog.csdn.net/nixun/archive/2006/01/11/576547.aspx</link><pubDate>Wed, 11 Jan 2006 19:03:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2006/01/11/576547.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/576547.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2006/01/11/576547.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/576547.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=576547</trackback:ping><description>Google面试题，本文展示了两种解法，同时附上代码&lt;img src ="http://blog.csdn.net/nixun/aggbug/576547.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>凹凸电子Firmware/Software Engineer笔试题目（俺的处女笔试，赫赫）</title><link>http://blog.csdn.net/nixun/archive/2005/10/14/504105.aspx</link><pubDate>Fri, 14 Oct 2005 22:12:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2005/10/14/504105.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/504105.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2005/10/14/504105.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/504105.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=504105</trackback:ping><description>嵌入式系统笔试题目&lt;img src ="http://blog.csdn.net/nixun/aggbug/504105.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>C++内联函数(Inline)介绍 </title><link>http://blog.csdn.net/nixun/archive/2005/10/08/497330.aspx</link><pubDate>Sat, 08 Oct 2005 16:27:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2005/10/08/497330.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/497330.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2005/10/08/497330.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/497330.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=497330</trackback:ping><description>C++内联函数(Inline)介绍 &lt;img src ="http://blog.csdn.net/nixun/aggbug/497330.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>C语言测试：想成为嵌入式程序员应知道的0x10个基本问题 </title><link>http://blog.csdn.net/nixun/archive/2005/10/08/497295.aspx</link><pubDate>Sat, 08 Oct 2005 15:35:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2005/10/08/497295.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/497295.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2005/10/08/497295.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/497295.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=497295</trackback:ping><description>C语言测试：想成为嵌入式程序员应知道的0x10个基本问题 &lt;img src ="http://blog.csdn.net/nixun/aggbug/497295.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>数据结构笔记2（转载）</title><link>http://blog.csdn.net/nixun/archive/2005/10/06/495730.aspx</link><pubDate>Thu, 06 Oct 2005 10:59:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2005/10/06/495730.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/495730.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2005/10/06/495730.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/495730.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=495730</trackback:ping><description>数据结构笔记2&lt;img src ="http://blog.csdn.net/nixun/aggbug/495730.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>数据结构笔记（转载）</title><link>http://blog.csdn.net/nixun/archive/2005/10/06/495716.aspx</link><pubDate>Thu, 06 Oct 2005 10:42:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2005/10/06/495716.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/495716.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2005/10/06/495716.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/495716.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=495716</trackback:ping><description>数据结构复习笔记&lt;img src ="http://blog.csdn.net/nixun/aggbug/495716.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>nixun</dc:creator><title>重温经典排序思想--C语言常用排序全解(转载）</title><link>http://blog.csdn.net/nixun/archive/2005/10/05/495345.aspx</link><pubDate>Wed, 05 Oct 2005 10:56:00 GMT</pubDate><guid>http://blog.csdn.net/nixun/archive/2005/10/05/495345.aspx</guid><wfw:comment>http://blog.csdn.net/nixun/comments/495345.aspx</wfw:comment><comments>http://blog.csdn.net/nixun/archive/2005/10/05/495345.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/nixun/comments/commentRss/495345.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=495345</trackback:ping><description>C语言常用排序全解&lt;img src ="http://blog.csdn.net/nixun/aggbug/495345.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>