news 2026/4/23 10:16:33

windows线程切换之一个线程的Quantum: -93都是在处理KDPC

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
windows线程切换之一个线程的Quantum: -93都是在处理KDPC

windows线程切换之一个线程的Quantum: -93都是在处理KDPC----线程切换和KDPC没有关系


1: kd> g
Breakpoint 16 hit
eax=ffdff000 ebx=895f2a78 ecx=00000002 edx=000013ea esi=00002707 edi=e73f7530
eip=804ee4f8 esp=f789e820 ebp=f789e838 iopl=0 nv up ei pl nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000206
hal!HalRequestSoftwareInterrupt:
804ee4f8 643a0d95000000 cmp cl,byte ptr fs:[95h] fs:0030:00000095=00
0: kd> x nt!*tickcount
80b16f80 nt!KeTickCount = struct _KSYSTEM_TIME
80b16f80 nt!_KeTickCount = 0x105ee872
80a30bac nt!KeQueryTickCount (union _LARGE_INTEGER *)
80afc19a nt!_KiGetTickCount (void)
0: kd> dx -id 0,0,8954e020 -r1 ((ntkrnlmp!_KPRCB *)0xffdff120)
((ntkrnlmp!_KPRCB *)0xffdff120) : 0xffdff120 [Type: _KPRCB *]
[+0x000] MinorVersion : 0x1 [Type: unsigned short]
[+0x002] MajorVersion : 0x1 [Type: unsigned short]
[+0x004] CurrentThread : 0x895f2a78 [Type: _KTHREAD *]
[+0x008] NextThread : 0x89555268 [Type: _KTHREAD *]

[+0x928] ReadySummary : 0x1000 [Type: unsigned long]

0: kd> dx -id 0,0,8954e020 -r1 ((ntkrnlmp!_KTHREAD *)0x895f2a78)
((ntkrnlmp!_KTHREAD *)0x895f2a78) : 0x895f2a78 [Type: _KTHREAD *]
[+0x000] Header [Type: _DISPATCHER_HEADER]
[+0x010] MutantListHead [Type: _LIST_ENTRY]
[+0x018] InitialStack : 0xba1b1000 [Type: void *]
[+0x01c] StackLimit : 0xba1ad000 [Type: void *]
[+0x020] KernelStack : 0xba1b0c5c [Type: void *]
[+0x024] ThreadLock : 0x0 [Type: unsigned long]
[+0x028] ContextSwitches : 0x470 [Type: unsigned long]
[+0x02c] State : 0x2 [Type: unsigned char]
[+0x02d] NpxState : 0xa [Type: unsigned char]
[+0x02e] WaitIrql : 0x0 [Type: unsigned char]
[+0x02f] WaitMode : 1 [Type: char]
[+0x030] Teb : 0x7ffd5000 [Type: void *]
[+0x034] ApcState [Type: _KAPC_STATE]
[+0x04c] ApcQueueLock : 0x0 [Type: unsigned long]
[+0x050] WaitStatus : 258 [Type: long]
[+0x054] WaitBlockList : 0x895f2b18 [Type: _KWAIT_BLOCK *]
[+0x058] Alertable : 0x0 [Type: unsigned char]
[+0x059] WaitNext : 0x0 [Type: unsigned char]
[+0x05a] WaitReason : 0x6 [Type: unsigned char]
[+0x05b] Priority : 13 '\r' [Type: char]
[+0x05c] EnableStackSwap : 0x1 [Type: unsigned char]
[+0x05d] SwapBusy : 0x0 [Type: unsigned char]
[+0x05e] Alerted [Type: unsigned char [2]]
[+0x060] WaitListEntry [Type: _LIST_ENTRY]
[+0x060] SwapListEntry [Type: _SINGLE_LIST_ENTRY]
[+0x068] Queue : 0x0 [Type: _KQUEUE *]
[+0x06c] WaitTime : 0x105ee7d7 [Type: unsigned long]
[+0x070] KernelApcDisable : 0 [Type: short]
[+0x072] SpecialApcDisable : 0 [Type: short]
[+0x070] CombinedApcDisable : 0x0 [Type: unsigned long]
[+0x078] Timer [Type: _KTIMER]
[+0x0a0] WaitBlock [Type: _KWAIT_BLOCK [4]]
[+0x100] QueueListEntry [Type: _LIST_ENTRY]
[+0x108] ApcStateIndex : 0x0 [Type: unsigned char]
[+0x109] ApcQueueable : 0x1 [Type: unsigned char]
[+0x10a] Preempted : 0x1 [Type: unsigned char]
[+0x10b] ProcessReadyQueue : 0x0 [Type: unsigned char]
[+0x10c] KernelStackResident : 0x1 [Type: unsigned char]
[+0x10d] Saturation : 0 [Type: char]
[+0x10e] IdealProcessor : 0x0 [Type: unsigned char]
[+0x10f] NextProcessor : 0x0 [Type: unsigned char]
[+0x110] BasePriority : 13 '\r' [Type: char]
[+0x111] Spare4 : 0x0 [Type: unsigned char]
[+0x112] PriorityDecrement : 0 [Type: char]
[+0x113] Quantum : -93 [Type: char]
[+0x114] SystemAffinityActive : 0x0 [Type: unsigned char]
[+0x115] PreviousMode : 1 [Type: char]
[+0x116] ResourceIndex : 0x1 [Type: unsigned char]
[+0x117] DisableBoost : 0x0 [Type: unsigned char]
[+0x118] UserAffinity : 0x3 [Type: unsigned long]
[+0x11c] Process : 0x8954e020 [Type: _KPROCESS *]
[+0x120] Affinity : 0x3 [Type: unsigned long]
[+0x124] ServiceTable : 0x80b207a0 [Type: void *]
[+0x128] ApcStatePointer [Type: _KAPC_STATE * [2]]
[+0x130] SavedApcState [Type: _KAPC_STATE]
[+0x148] CallbackStack : 0x0 [Type: void *]
[+0x14c] Win32Thread : 0xe17c0d18 [Type: void *]
[+0x150] TrapFrame : 0xba1b0d64 [Type: _KTRAP_FRAME *]
[+0x154] KernelTime : 0x12 [Type: unsigned long]
[+0x158] UserTime : 0x4 [Type: unsigned long]
[+0x15c] StackBase : 0xba1b1000 [Type: void *]
[+0x160] SuspendApc [Type: _KAPC]
[+0x190] SuspendSemaphore [Type: _KSEMAPHORE]
[+0x1a4] TlsArray : 0x0 [Type: void *]
[+0x1a8] LegoData : 0x0 [Type: void *]
[+0x1ac] ThreadListEntry [Type: _LIST_ENTRY]
[+0x1b4] LargeStack : 0x1 [Type: unsigned char]
[+0x1b5] PowerState : 0x0 [Type: unsigned char]
[+0x1b6] NpxIrql : 0x0 [Type: unsigned char]
[+0x1b7] Spare5 : 0x0 [Type: unsigned char]
[+0x1b8] AutoAlignment : 0x0 [Type: unsigned char]
[+0x1b9] Iopl : 0x0 [Type: unsigned char]
[+0x1ba] FreezeCount : 0 [Type: char]
[+0x1bb] SuspendCount : 0 [Type: char]
[+0x1bc] Spare0 [Type: unsigned char [1]]
[+0x1bd] UserIdealProcessor : 0x0 [Type: unsigned char]
[+0x1be] DeferredProcessor : 0x0 [Type: unsigned char]
[+0x1bf] AdjustReason : 0x0 [Type: unsigned char]
[+0x1c0] AdjustIncrement : 0 [Type: char]
[+0x1c1] Spare2 [Type: unsigned char [3]]
0: kd> g
Breakpoint 49 hit
eax=0000001b ebx=804edc6c ecx=80b16802 edx=00000000 esi=00000000 edi=f7737120
eip=80a4002e esp=f78aed64 ebp=f78aed80 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!KiExitDispatcher+0x42:
80a4002e 807dfc02 cmp byte ptr [ebp-4],2 ss:0010:f78aed7c=02
1: kd> g
Breakpoint 16 hit
eax=ffdff000 ebx=895f2a78 ecx=00000002 edx=000013ea esi=00002707 edi=e741d78a
eip=804ee4f8 esp=f789e818 ebp=f789e830 iopl=0 nv up ei pl nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000206
hal!HalRequestSoftwareInterrupt:
804ee4f8 643a0d95000000 cmp cl,byte ptr fs:[95h] fs:0030:00000095=00
0: kd> g
Breakpoint 49 hit
eax=0000001b ebx=804edc6c ecx=80b16802 edx=00000000 esi=00000000 edi=ffdff120
eip=80a4002e esp=f789ed88 ebp=f789eda4 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!KiExitDispatcher+0x42:
80a4002e 807dfc02 cmp byte ptr [ebp-4],2 ss:0010:f789eda0=02


0: kd> g
Breakpoint 49 hit
eax=0000001b ebx=804edc6c ecx=80b16802 edx=00000000 esi=00000000 edi=ffdff120
eip=80a4002e esp=f789ed88 ebp=f789eda4 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!KiExitDispatcher+0x42:
80a4002e 807dfc02 cmp byte ptr [ebp-4],2 ss:0010:f789eda0=02
0: kd> kc
#
00 nt!KiExitDispatcher
01 nt!KeSetEvent
02 HIDCLASS!HidpSubmitInterruptRead
03 HIDCLASS!HidpInterruptReadComplete
04 nt!IopfCompleteRequest
05 USBPORT!USBPORT_CompleteTransfer
06 USBPORT!USBPORT_DoneTransfer
07 USBPORT!USBPORT_FlushDoneTransferList
08 USBPORT!USBPORT_DpcWorker
09 USBPORT!USBPORT_IsrDpcWorker
0a USBPORT!USBPORT_IsrDpc
0b nt!KiRetireDpcList
0c nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
0d 0x0

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/18 1:07:32

CompreFace终极指南:Web端人脸识别快速集成完整教程

在当今数字化时代,人脸识别技术正迅速从专业安防领域扩展到日常Web应用中。然而,许多开发者在尝试将人脸识别功能集成到Web端时都会遇到这样的困境:API调用复杂、识别延迟明显、用户体验不佳。本文将为您提供一套完整的CompreFace Web端人脸识…

作者头像 李华
网站建设 2026/4/14 4:33:25

Qwen3-8B-Base:36万亿token训练的新模型

Qwen3-8B-Base作为Qwen系列最新一代大语言模型的基础版本,凭借36万亿token的超大规模训练数据和多维度技术升级,重新定义了80亿参数级别模型的性能标准。 【免费下载链接】Qwen3-8B-Base Qwen3-8B-Base具有以下特点: 类型:因果语言…

作者头像 李华
网站建设 2026/4/18 16:11:19

Notepads文本编辑器:重新定义Windows高效写作体验

Notepads文本编辑器:重新定义Windows高效写作体验 【免费下载链接】Notepads A modern, lightweight text editor with a minimalist design. 项目地址: https://gitcode.com/gh_mirrors/no/Notepads 在数字时代,高效写作工具成为现代人必备的生产…

作者头像 李华
网站建设 2026/4/18 13:33:46

Langchain-Chatchat在政府信息公开查询中的便民价值

Langchain-Chatchat在政府信息公开查询中的便民价值 在政务服务日益智能化的今天,公众对信息获取的期待早已超越了“能查到”,而是追求“查得快、问得准、看得懂”。然而现实中,许多人仍面临这样的窘境:想了解一项新出台的社保政策…

作者头像 李华
网站建设 2026/4/23 9:50:05

EasyFlash嵌入式Flash存储终极指南:从零开始掌握MCU数据管理

EasyFlash嵌入式Flash存储终极指南:从零开始掌握MCU数据管理 【免费下载链接】EasyFlash Lightweight IoT device information storage solution: KV/IAP/LOG. | 轻量级物联网设备信息存储方案:参数存储、在线升级及日志存储 ,全新一代版本请…

作者头像 李华
网站建设 2026/4/23 9:49:18

macOS iSCSI存储终极指南:轻松扩展你的存储空间

macOS iSCSI存储终极指南:轻松扩展你的存储空间 【免费下载链接】iSCSIInitiator iSCSI Initiator for macOS 项目地址: https://gitcode.com/gh_mirrors/is/iSCSIInitiator 还在为Mac电脑存储空间不足而烦恼吗?想要像专业人士一样管理网络存储资…

作者头像 李华