Do you know where your processor spends its time?

Before we dive into this, a quick disclaimer: this post is not going to get into Processor architecture, RISC, Registers or the ALU. What we’re going to talk about today is the two states in which a processor executes instructions and how that relates back to our post on Processor Bottlenecks. So without further ado […]

Windows_Logo Before we dive into this, a quick disclaimer: this post is not going to get into Processor architecture, RISC, Registers or the ALU. What we’re going to talk about today is the two states in which a processor executes instructions and how that relates back to our post on Processor Bottlenecks. So without further ado ...

There are two different states to be aware of when talking about processors executing instructions: Privileged mode and User mode. Some operating system threads and interrupts (including all device driver functions) as well as Kernel-mode threads execute in privileged mode. User mode is where program threads from applications and services execute. User-mode threads cannot access system memory locations and perform OS functions directly. So looking at this in the context of our post on Processor Bottlenecks, let’s take a look at the relevant Performance Monitor counters.

The first one to consider is Processor (n) ’ % Privileged time. As the counter name suggests this indicates the percentage of the time in which the system was executing in Privileged mode. When dealing with Privileged mode operations, there are two modes to consider - Interrupt mode and Deferred Procedure Call (DPC) mode. Interrupt mode is reserved for interrupt service routines which are device driver functions.

When looking at this in Performance Monitor, % Interrupt Time is the time the processor spends receiving and servicing hardware interrupts during sample intervals. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. DPC mode is time spent in routines known as deferred procedure calls - these are routines scheduled by device drivers to complete interrupt processing. DPC’s are often referred to as soft interrupts. From the Performance Monitor perspective, the % DPC Time counter shows the percentage of the time that the system was executing in DPC mode. Measuring these counters separately can provide insight into whether there are issues with the interrupt service routine or its DPC.

Full Article

Processor, CPUs, Hardware, Architecture, Performance, Troubleshooting, Microsoft, Windows