Reading Notebook: 15-March-10

Comments in italics are mine and express my own views, thoughts and opinions

Windows Internals by M. Russinovich, D. Solomon and A. Ionescu:

Limiting high-priority ready threads by a processor affinity (p. 391)

Thread dispatch reasons: ready, leaves running state, priority change, processor affinity change (p. 392) 

Thread vs. process scheduling granularity (pp. 392 - 393)

Thread priority level 0 is reserved for zero page thread (p. 393)

2 pespectives on thread priority levels (pp. 393 - 394)

Changing CPU-intensive process base priority instead of priority of individual threads (p. 395)

Increased based priority for special processes (p. 395) - here is a comparison of base priorities between lsm.exe and smss.exe from x64 W2K8:

0: kd> !process fffffa80047ffc10
PROCESS fffffa80047ffc10
    SessionId: 0  Cid: 0294    Peb: 7fffffd6000  ParentCid: 0238
    DirBase: b1c4e000  ObjectTable: fffff88007f05cd0  HandleCount: 173.
    Image: lsm.exe
    VadRoot fffffa80046dd720 Vads 68 Clone 0 Private 462. Modified 0. Locked 0.
    DeviceMap fffff88000007310
    Token                             fffff88007f376f0
    ElapsedTime                       00:04:17.552
    UserTime                          00:00:00.015
    KernelTime                        00:00:00.000
    QuotaPoolUsage[PagedPool]         69000
    QuotaPoolUsage[NonPagedPool]      7072
    Working Set Sizes (now,min,max)  (1314, 50, 345) (5256KB, 200KB, 1380KB)
    PeakWorkingSetSize                1318
    VirtualSize                       36 Mb
    PeakVirtualSize                   38 Mb
    PageFaultCount                    1375
    MemoryPriority                    BACKGROUND
    BasePriority                      8
    CommitCharge                      756

0: kd> !process fffffa80046d9040
PROCESS fffffa80046d9040
    SessionId: none  Cid: 019c    Peb: 7fffffdf000  ParentCid: 0004
    DirBase: bccd5000  ObjectTable: fffff880005f45b0  HandleCount:  33.
    Image: smss.exe
    VadRoot fffffa80046d97e0 Vads 19 Clone 0 Private 96. Modified 24. Locked 0.
    DeviceMap fffff88000007310
    Token                             fffff88000964af0
    ElapsedTime                       00:04:40.343
    UserTime                          00:00:00.000
    KernelTime                        00:00:00.000
    QuotaPoolUsage[PagedPool]         10392
    QuotaPoolUsage[NonPagedPool]      1728
    Working Set Sizes (now,min,max)  (254, 50, 345) (1016KB, 200KB, 1380KB)
    PeakWorkingSetSize                254
    VirtualSize                       6 Mb
    PeakVirtualSize                   16 Mb
    PageFaultCount                    458
    MemoryPriority                    BACKGROUND
    BasePriority                      11
    CommitCharge                      127

Sleep(0) to relinquish the rest of quantum (p. 396) 

Realtime Notepad (pp. 397 - 398) - I’m often asked why it doesn’t affect performance? This is because most threads in a system are waiting and notepad is waiting for window messages to process like keyboard and mouse. It is more noticeable when a realtime thread starts looping - it becomes scheduled every time 

WSRM (Windows System Resource Manager) (pp. 398 - 399) - Looks good to prevent CPU spikes and memory leaks to come out of control

Thread priorities and IRQL (pp. 399 - 400) - in another words these concepts are orthogonal (independent from each other)

- Dmitry Vostokov @ SoftwareGeneralist.com -

           

Announcements

Coming Soon:

Management Bits: An Anthology from Reductionist Manager

Crash Dump Analysis: Practical Foundations (Windows Edition, Systematic Software Fault Analysis Series)

Debugging Notebook: Essential Concepts, WinDbg Commands and Tools

Crash Dump Analysis for System Administrators and Support Engineers

New Magazines:

Debugged! MZ/PE: MagaZine for/from Practicing Engineers


New Books:

Memory Dump Analysis Anthology: Color Supplement for Volumes 1-3

Memory Dump Analysis Anthology, Volume 3

First Fault Software Problem Solving: A Guide for Engineers, Managers and Users

x64 Windows Debugging: Practical Foundations

Also available:

Windows Debugging: Practical Foundations

DLL List Landscape: The Art from Computer Memory Space

Dumps, Bugs and Debugging Forensics: The Adventures of Dr. Debugalov

WinDbg: A Reference Poster and Learning Cards

Memory Dump Analysis Anthology, Volume 2

Memory Dump Analysis Anthology, Volume 1

New Children's Book:

Baby Turing

Leave a Reply