进程占用高CPU

时间:2016-02-17 09:43:05

标签: c++ windows multithreading

我有一个在Windows Server 2012计算机上作为服务运行的混合模式C ++ .exe。此过程持续占用机器总CPU(2个核心)的50%以上。但是,如果我在Windows 7中运行该服务,则只需要大约5-10%的CPU。

罪魁祸首线程的堆栈(取自Process Explorer)如下:

ntoskrnl.exe!KeSynchronizeExecution+0x2246
ntoskrnl.exe!ExAcquireCacheAwarePushLockExclusive+0x51a
ntoskrnl.exe!KeSynchronizeExecution+0x5f12
ntoskrnl.exe!KeIsAttachedProcess+0x8ba
ntoskrnl.exe!KeSynchronizeExecution+0x4133
mscorlib.ni.dll+0x4052a4
mscorlib.ni.dll+0x3c20
clr.dll!DllCanUnloadNowInternal+0xfb91
clr.dll!DllUnregisterServerInternal+0x9630
KERNEL32.dll!BaseThreadInitThunk+0x24
ntdll.dll!RtlInitializeExceptionChain+0x8f
ntdll.dll!RtlInitializeExceptionChain+0x5a

这个帖子是关于什么的?这种高CPU使用率的原因是什么?我该如何调试和解决这个问题?

0 个答案:

没有答案
相关问题