- High Precision Event Timer
The High Precision Event Timer (HPET, formerly known as Multimedia Timer) is a hardware timer used in computers. It was developed jointly by Intel and Microsoft.
Older
operating system s cannot use HPET and run only on hardware that has the older timer facilities. Some hardware has both.Features
An HPET block consists of a fixed-rate up-counter and 3 to 32 independent timers, each of which consists of a comparator and a register for storing a trigger value. There can be at most 8 HPET blocks. Each comparator can generate an
interrupt when the counter reaches a pre-programmed value.All timers can be put into one-shot mode and some may also support a periodic mode. In one-shot mode the timer fires an interrupt once when the main counter reaches the value stored in the comparator's register. In the periodic mode the interrupts are generated at specified intervals.
Applications
The HPET can produce periodic interrupts at a much higher resolution than the RTC and is often used to synchronize multimedia streams, providing smooth playback and reducing the need to use other timestamp calculations such as an x86 CPU's
RDTSC instruction.Comparison to predecessors
HPET is meant to supplement and replace the 8254
Programmable Interval Timer (PIT) and theReal-time clock 's (RTC) periodic interrupt function. Compared to these older timer circuits, the HPET has higher frequency (at least 10 MHz) and wider 64-bit counters (although they can be driven in 32-bit mode).Citation | author = Intel Corporation | title = IA-PC HPET (High Precision Event Timers) Specification (revision 1.0a) | month = October 2004 | url=http://www.intel.com/hardwaredesign/hpetspec_1.pdf | accessdate = 2007-07-16]While 8254 and RTC can, similarly to HPET, be put in one-shot mode, the set-up process is so slow that their one-shot mode is not used in practice for tasks requiring precise scheduling. [Citation | title = Guidelines For Providing Multimedia Timer Support | date = 2002-09-20 | url = http://www.microsoft.com/whdc/system/CEC/mm-timer.mspx | accessdate = 2007-07-16] Instead, 8254 and RTC are typically used in periodic mode with very small time interval. For example, if an application needs to perform several short (some milliseconds, perhaps) waits, it is better to have a periodic timer running constantly with 1 ms period because of the high setup cost of an 8254 or RTC one-shot timer. This causes an interrupt on every millisecond even if the application needs to do actual work less frequently. With HPET, the extra interrupts can be avoided, because the set-up cost of a HPET one-shot timer is considerably smaller.
Compatibility
Operating systems designed before HPET existed cannot use HPET, so work only on hardware that has other timer facilities. Newer operating systems tend to be able to use either. Some hardware has both.
The following operating systems are known not to be able to use HPET:
Windows XP ,Windows Server 2003 , and earlier Windows versions. OlderLinux .Windows XP contains a driver for the HPET, but it is not functional.The following operating systems are known to be able to use HPET:
Windows Vista ,Windows 2008 , x86 based versions ofMac OS X ,Linux 2.6 andFreeBSD .With a
Linux kernel , you need the newer "rtc-cmos" hardware clock device driver rather than the original "rtc" driver.ee also
*
Programmable Interval Timer (PIT)
*Advanced Programmable Interrupt Controller (APIC)
*RDTSC (read time stamp counter)
* TSC (time stamp counter)References
Wikimedia Foundation. 2010.