首页 | 本学科首页   官方微博 | 高级检索  
     检索      

中断工作方式下的WDM驱动程序设计
引用本文:聂镭,韩建涛,许人灿,陈曾平.中断工作方式下的WDM驱动程序设计[J].现代电子技术,2007,30(8):134-138.
作者姓名:聂镭  韩建涛  许人灿  陈曾平
作者单位:国防科技大学,电子科学与工程学院,湖南,长沙,410073
摘    要:在设备驱动程序编写中,实时性问题是难点之一。详细讨论了中断工作方式下驱动程序的设计和编写的机制与方法,提出了一整套解决方案,即通过在操作系统中申请中断服务例程,在接口库程序中开辟中断服务线程并进入阻塞式等待,两者用事件句柄进行挂钩;当硬件中断产生时,驱动程序和接口库程序中分别做出响应,接口库发送的中断消息进入应用程序的消息循环,并最终驱动系统界面显示和数据保存等中断操作,从而完成从底层驱动到顶层应用程序的一次完整的中断响应。实验表明,所提供的设计方法具有好的效果和实用价值,实现最小化响应时间和最小化资源开销的统一,尤其是在平均速度能够满足处理需求,但在某段时间内突发的中断消息的产生速度超出处理能力的情况下,圆满地解决了传统设计模式的响应速度不足和数据丢失问题。

关 键 词:中断  驱动程序  实时
文章编号:1004-373X(2007)08-134-05
收稿时间:2006-08-31
修稿时间:2006年8月31日

The WDM Driver Development through Interrupt Service Routine
NIE Lei,HAN Jiantao,XU Rencan,CHEN Zengping.The WDM Driver Development through Interrupt Service Routine[J].Modern Electronic Technique,2007,30(8):134-138.
Authors:NIE Lei  HAN Jiantao  XU Rencan  CHEN Zengping
Institution:College of Electronics Science and Engineering, National University of Defense Technology, Changsha, 410073,China
Abstract: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 DLL 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 DLL 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 top-level 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.
Keywords:WDM
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号