Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for implementing high-accuracy low-CPU (central processing unit)-occupancy timer under Pentium IV architecture of Windows operating system

A technology of operating system and implementation method, applied in the direction of instruments, program startup/switching, multi-programming device, etc., can solve the problems of difficult to achieve high precision, low CPU resource occupancy rate, etc., to meet timing application requirements, CPU occupancy rate low effect

Active Publication Date: 2013-07-10
HARBIN INST OF TECH
View PDF2 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0016] The purpose of the present invention is to design a timer with high precision and few resources occupied by the CPU at the same time, so as to solve the technical problem that it is difficult to achieve high precision and low CPU resource occupancy when Windows multi-task time-sharing work.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for implementing high-accuracy low-CPU (central processing unit)-occupancy timer under Pentium IV architecture of Windows operating system
  • Method for implementing high-accuracy low-CPU (central processing unit)-occupancy timer under Pentium IV architecture of Windows operating system
  • Method for implementing high-accuracy low-CPU (central processing unit)-occupancy timer under Pentium IV architecture of Windows operating system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] like Figure 1~4 As shown, the implementation method of the high-precision and low CPU usage timer under the Windows operating system Pentium IV architecture described in this embodiment mainly includes three steps in Windows to realize the high-precision timer:

[0037] Step 1. Initialize the 8254 chip, set the internal registers, and enable the 8254 internal counter: use the 8254 chip in the PentiumIV architecture PC chipset, and configure the 8254 internal registers by writing the driver for the 8254 interrupt timer to enable the 8254 The internal counting function of the chip;

[0038] Step 2. In the programmable interrupt controller APIC, set the corresponding interrupt vector for 8254PIT: through the programmed programmable interrupt controller APIC driver, set the corresponding interrupt vector for 8254PIT in the programmable interrupt controller APIC;

[0039] Step 3, modify the Windows IDT (interrupt description table), after allowing the interrupt to trigger...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for implementing a high-accuracy low-CPU (central processing unit)-occupancy timer under Pentium IV architecture of the Windows operating system, relates to the technical field of timer software development of the Windows operating system and aims to design a timer high in accuracy and low in CPU resources occupancy to solve the technical problem of failure in realizing high accuracy and low CPU resources occupancy during Windows multi-task time division operation. By adopting 8254 chips in a chip set of a PC (personal computer) under Pentium IV architecture and writing 8254 interrupt timer driving program and APIC (advanced programmable interrupt controller) program, an interrupt based clock timer is realized in the Windows. By defining an interrupt processing function, changing interrupt door structure in an interrupt descriptor table and valuating the door structure by a pointer of the self-defined interrupt processing function, calling of user-defined interrupt processing functions is realized, and applicable timer is realized. After test, timing accuracy can reach submillimeters, timing offset is smaller than 7 microseconds when timing is 100 microseconds, CPU occupancy is quite low, and most timing application requirements of the Windows system are met.

Description

technical field [0001] The invention relates to a high-precision and low CPU occupancy timer realized by using an 8254 interrupt timer under the Windows operating system Pentium IV architecture, and relates to the technical field of timer software development of the Windows operating system. Background technique [0002] The Windows operating system provides users with many APIs to realize the timer function, which can be roughly divided into the following three timers in principle: WM_TIMER message timer, multimedia timer, and Windows timestamp timer. The following introduces these three timers from the realization method and performance respectively. [0003] (1) WM_TIMER timer [0004] The WM_TIMER timer is the simplest timer in Windows. It needs to use the SetTimer() function to set the interval time of the timer, and then send the WM_TIMER message to the specified thread regularly. The WM_TIMER message is added to the message queue and waits for processing. The KillTi...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/48G06F13/24
Inventor 魏长安杨京礼李龙华李骥姜守达
Owner HARBIN INST OF TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products