Windows 8, Windows 8.1, Windows Server 2012, and Windows Server 2012 R2 use TSCs as the basis for the performance counter. Windows 8, Windows 8.1, Windows Server 2012, and Windows Server 2012 R2 On systems where the TSC is not suitable for timekeeping, Windows automatically selects a platform counter (either the HPET timer or the ACPI PM timer) as the basis for QPC. Furthermore, there is no added overhead for concurrent calls and user-mode queries often bypass system calls, which further reduces overhead. On such systems, the cost of reading the performance counter is significantly lower compared to systems that use a platform counter. Windows 7 and Windows Server 2008 R2 use TSCs as the basis of QPC on single-clock domain systems where the operating system (or the hypervisor) is able to tightly synchronize the individual TSCs across all processors during system initialization. TSCs are high-resolution per-processor hardware counters that can be accessed with very low latency and overhead (in the order of 10s or 100s of machine cycles, depending on the processor type). The majority of Windows 7 and Windows Server 2008 R2 computers have processors with constant-rate TSCs and use these counters as the basis for QPC. This limits scalability of QPC if it is called concurrently from multiple processors. Such platform timers have higher access latency than the TSC and are shared between multiple processors. Windows Vista and Windows Server 2008Īll computers that shipped with Windows Vista and Windows Server 2008 used a platform counter (High Precision Event Timer (HPET)) or the ACPI Power Management Timer (PM timer) as the basis for QPC. Systems with flawed firmware that run these versions of Windows might not provide the same QPC reading on different cores if they used the TSC as the basis for QPC. However, some hardware systems' BIOS didn't indicate the hardware CPU characteristics correctly (a non-invariant TSC), and some multi-core or multi-processor systems used processors with TSCs that couldn't be synchronized across cores. QPC is available on Windows XP and Windows 2000 and works well on most systems. Here we describe the characteristics of QPC on different Windows versions to help you maintain software that runs on those Windows versions. QPC was introduced in Windows 2000 and Windows XP and has evolved to take advantage of improvements in the hardware platform and processors. Resolution, Precision, Accuracy, and Stability.Low-level hardware clock characteristics.QPC helps you avoid difficulties that can be encountered with other time measurement approaches, such as reading the processor’s time stamp counter (TSC) directly. Consider using GetSystemTimePreciseAsFileTime when you want to time-stamp events across multiple machines, provided that each machine is participating in a time synchronization scheme such as Network Time Protocol (NTP). QPC is typically the best method to use to time-stamp events and measure small time intervals that occur on the same system or virtual machine. Each of these operations involves a measurement of activities that occur during a time interval that is defined by a start and an end event that can be independent of any external time-of-day reference. These performance measurement operations include the computation of response time, throughput, and latency, as well as profiling code execution. Time stamps and time-interval measurements are an integral part of computer and network performance measurements. To retrieve time stamps that can be synchronized to an external time reference, such as, Coordinated Universal Time (UTC) for use in high-resolution time-of-day measurements, use GetSystemTimePreciseAsFileTime. QPC is independent of, and isn't synchronized to, any external time reference. For managed code, the class uses QPC as its precise time basis. For device drivers, the kernel-mode API is KeQueryPerformanceCounter. The primary API for native code is QueryPerformanceCounter (QPC). Windows provides APIs that you can use to acquire high-resolution time stamps, or measure time intervals.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |