作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 开发研究与工程应用 • 上一篇    

基于APIC 的高精度定时器设计

杨 皓1,江 南2,杜承烈1   

  1. (1. 西北工业大学计算机学院,西安710129;2. 中国船舶重工集团公司750 试验场,昆明650051)
  • 收稿日期:2013-08-05 出版日期:2014-09-15 发布日期:2014-09-12
  • 作者简介:杨 皓(1988 - ),男,硕士,主研方向:实时操作系统;江 南,研究员;杜承烈,教授、博士生导师。
  • 基金资助:
    国家部委基金资助项目。

Design of High Precision Timer Based on Advanced Programmable Interrupt Controller

YANG Hao 1,JIANG Nan 2,DU Cheng-lie 1   

  1. (1. School of Computer Science,Northwestern Polytechnical University,Xi’an 710129,China; 2. 750 Testing Ground,China Shipbuilding Industry Corporation,Kunming 650051,China)
  • Received:2013-08-05 Online:2014-09-15 Published:2014-09-12

摘要: 在操作系统开发过程中需要一定精度的计时器支持。在Windows 实时扩展改造过程中,针对原有定时精度低和波动较大的问题,提出一种基于高级可编程中断控制器(APIC)的高精度定时器设计方案。利用CPU 片上结构APIC 的计数寄存器编程,构建高精度时钟。运用内核驱动建立内核调度管理,通过内存映射提高用户态到内核态的数据传输速度,保证实时性能。利用DLL 提供一组和内核交互的定时器接口供用户使用。实验结果表明,该方案有效解决了定时精度和稳定性问题,构造的定时器性能稳定,具有良好的实用性。

关键词: 高级可编程中断控制器, 定时器, 高精度, 稳定性, 内存映射, 实时性

Abstract: Timer with a certain precision is often required in the process of developing the system. In the Windows real time extending process,aiming at the problem of insufficient original timing accuracy and the fluctuation problem,this paper presents a high precision timer based on local Advanced Programmable Interrupt Controller(APIC). Making use of the counting register programs CPU sheet structure of APIC,it constructs high precision clock effectively,and uses the kernel driver construction scheduling management,memory mapping to improve data transmission speed of user state to guarantee real-time kernel to provide real-time. DLL provides a set of interface for users. Experimental results show that the scheme can effectively solve the problem of timing precision,and it has good usability.

Key words: Advanced Programmable Interrupt Controller (APIC), timer;high precision, stability, memory mapping, real-time

中图分类号: