检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:聂镭[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.
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.148.108.24