Content extension for the question "50% CPU usage"
System Idle Process
Windows page memory management process, with 0 priority. This process runs on each processor as a single thread, and the processor time is reversed when the system does not process other threads. Interestingly, the larger the CPU usage, the more CPU resources available for allocation. This process is required by the system and cannot be disabled, but it is not a system process. It allows the background and does not use the network. The process name is "system idle process", and the corresponding description is "processor idle time percentage".
So how can we find it? In Windows XP/Vista/7, open the task manager and you can see it directly in Windows 8/8. 1. In Windows 10, it is a little hidden, so many people think that it does not exist ......
What is level 0 priority?
In Windows, each process has a priority. The range from 0 to is the lowest priority, and 31 is the highest priority. When the system determines the process scheduling, priority is given to 31 processes. If yes, the system first executes the process. After the process is executed, check whether there are other processes with a priority of 31. If so, no process with a priority of 0 to 30 will be scheduled. Windows supports six priority types: Real-time (Real-time), High (High), abve normal (higher than standard), Normal (standard), and Below normal (lower than standard) and Idle (Idle ). There are still threads in the process, and the threads also have relative thread priorities: Time-critical (critical Time), Heightest (highest, but no key Time priority), and Above nZ priority? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> vcm1hbKOouN/kernel/qrei1d + kernel/gttS9 + kernel/kernel + dOzyeS3vcq9y + kernel/CzbzWu9f2ss6/kernel + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20150424/2015042410075380.png" alt = "here write picture description" title = "\">
DWORD
DWORD is Double Word. Each Word has two bytes in length. DWORD has four bytes, each of which is 8 bits and a total of 32 bits.
So how do I need to include anything in C ++?
#include "windows.h"
Although DWORD represents a 32-bit unsigned integer, DWORD is a 32-bit unsigned integer in a 32-bit or 64-bit Windows operating system.
Sleep ()In C/C ++, the Sleep () function is used to execute a suspended file for a period of time, which is the same as that required by DWORD. In Linux, The unistd. h header file must be included.
#include<unistd.h>
Note that the first letter of Sleep in VC is in uppercase "S", while that in Standard C is in lowercase. Sleep () requires an unsigned integer in milliseconds. Sleep () is second.
GetTickCount ()DWORD GetTickCount (void) starts timing from 0 and returns the number of milliseconds after the program starts (excluding the system pause time ). It also needs to include the "windows. h" header file.
Perfmon.exe