Jump to content
Nytro

Defrag Tools: #26 - WinDbg - Semaphores, Mutexes and Timers

Recommended Posts

Posted (edited)

Defrag Tools: #26 - WinDbg - Semaphores, Mutexes and Timers

By: Larry Larsen, Andrew Richards, Chad Beeder

How do I download the videos?

  • To download, right click the file type you would like and pick “Save target as…” or “Save link as…”

Why should I download videos from Channel9?

  • It's an easy way to save the videos you like locally.
  • You can save the videos in order to watch them offline.
  • If all you want is to hear the audio, you can download the MP3!

Which version should I choose?

  • If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
  • If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
  • If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
  • If you just want to hear the audio of the video, choose the MP3 file.

Right click “Save as…”

  • MP3 (Audio only) File size
    46.7 MB

  • MP4 (iPod, Zune HD) File size
    281.5 MB

In this episode of Defrag Tools, Andrew Richards, Chad Beeder and Larry Larsen continue looking at the Debugging Tools for Windows (in particular WinDbg). WinDbg is a debugger that supports user mode debugging of a process, or kernel mode debugging of a computer.

This installment goes over the commands used to diagnose Semaphores, Mutexes and (Waitable) Timers in a user mode application. For timers, we delve deep in to the kernel to gather more information about them. We use these commands:

  • !handle
  • !handle <handle> <mask>
  • !object <name>
  • !object <addr>
  • !timer
  • !timer <addr>
  • ub @rip
  • dt nt!_KTHREAD <addr>

Make sure you watch Defrag Tools Episode #1 and Defrag Tools Episode #23 for instructions on how to get the Debugging Tools for Windows and how to set the required environment variables for symbol and source code resolution.

Resources:

Synchronization Functions

Semaphore Objects

Mutex Objects

Waitable Timer Objects

Sysinternals LiveKD

Sysinternals WinObj

Windows 7 and Windows Server 2008 R2 Kernel Changes (Timer Coalescing)

Timeline:

[02:47] - Demo Apps [SkyDrive]

[03:08] - Semaphores

[09:32] - Mutexes

[15:32] - Waitable Timers

[15:58] - Clock Resolution

[17:05] - Timer Coalescing

[19:45] - Timer demo application

[25:05] - LiveKD makes a kernel dump

[26:37] - Object Manager - !object

[29:40] - DPC Timers - !timer

[35:22] - !timer <addr>

[35:52] - Waiting Threads - !thread <addr> 17

[37:08] - Wait Start TickCount

[38:55] - Kernel Wait Routines

[41:12] - Dump Type of Kernel Thread - dt nt!_KTHREAD <addr>

[42:00] - Running, Ready and Waiting states

[44:54] - Wakable Timers

[47:22] - powercfg.exe /waketimers

[49:18] - 'Century' DPC Timer Routine

[50:43] - Post in the forums and email us at defragtools@microsoft.com!

Sursa: Defrag Tools: #26 - WinDbg - Semaphores, Mutexes and Timers | Defrag Tools | Channel 9

Edited by Nytro

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...