中断工作方式下的WDM驱动程序设计  被引量:2

The WDM Driver Development through Interrupt Service Routine

在线阅读下载全文

作  者:聂镭[1] 韩建涛[1] 许人灿[1] 陈曾平[1] 

机构地区:[1]国防科技大学电子科学与工程学院,湖南长沙410073

出  处:《现代电子技术》2007年第8期134-138,共5页Modern Electronics Technique

摘  要:在设备驱动程序编写中,实时性问题是难点之一。详细讨论了中断工作方式下驱动程序的设计和编写的机制与方法,提出了一整套解决方案,即通过在操作系统中申请中断服务例程,在接口库程序中开辟中断服务线程并进入阻塞式等待,两者用事件句柄进行挂钩;当硬件中断产生时,驱动程序和接口库程序中分别做出响应,接口库发送的中断消息进入应用程序的消息循环,并最终驱动系统界面显示和数据保存等中断操作,从而完成从底层驱动到顶层应用程序的一次完整的中断响应。实验表明,所提供的设计方法具有好的效果和实用价值,实现最小化响应时间和最小化资源开销的统一,尤其是在平均速度能够满足处理需求,但在某段时间内突发的中断消息的产生速度超出处理能力的情况下,圆满地解决了传统设计模式的响应速度不足和数据丢失问题。The real - time performance is one of the difficult points in programming device driver. Focusing on the interrupt working style, this paper discusses the programming mechanism and method of designing and implementing device driver in detail. Then a suite of solution is put forward. Through registering Interrupt Service Routine in OS and applying for an interrupt service thread in the interfacing DI.L to wait for invoking,The above two threads are communicated through event handles. When the hardware interrupt is generated, the device driver and the interfacing DLI. response individually, then the message sent by interfacing DLL enters the message loop of top -level application. Then the final operation, such as displaying interface and saving data,is performed. With this method a whole interrupt response procedure from base - level device driver to toplevel application is completed. The experimental result demonstrates that the design method in this paper owns good effect and practical value,which has realized the integration of least response time and the minimum resource cost. Especially under the circumstances that the average speed can meet the processing demand while the speed of burst of interrupt message exceeds the processing ability of the system,this solution solves the problems of low response speed in traditional design mode and data losing.

关 键 词:中断 驱动程序 WDM 实时 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象