Display scheduler thread queue information for all (active) threads.
Syntax:
────.PQ ──────────────────────┬──────────┬──────────────────── ├── # ──┤ ├── * ──┤ └── slot ──┘
Parameters:
slot
The following short-hand may be used for the slot number:
_TaskNumber
If no slot number is given then all thread slots are displayed in slot number order.
Results & Notes:
The .PQ command locates each thread's TCB from the thread slot table, the linear address of which is given by global variable:
_papTCBSlots
or by traversing the process tree using TCBpTCBNext (TCB +0x14), TCBpPTDA (TCB +0x08) and ptda_pTCBHead (PTDA + 0x20) fields.
Output from the .PQ command appears in tabular form as follows:
Slot QSt Pri pTCB PriNextQ PriPrevQ PriHigh PriLow PriNext PriPrev 0001 blk 0100 ffe3c61c 0002 blk 0200 7b9c8020 0003 blk 0200 7b9c81d8 0004 blk 081f 7b9c8390 0005 blk 0800 7b9c8548 0006 blk 0800 7b9c8700 7b9cb3b0 7b9c9830 0008 blk 0500 7b9c8a70 000a blk 0800 7b9c8de0 *000b blk 0800 7b9c8f98 7b9ca960 7b9ca960 000c# blk 0800 7b9c9150 7b9cab18 7b9cab18
Each of the fields has the following meaning:
slot
This value may be flagged with:
to the left to signify the current (or last)
dispatched thread.
to the right to signify the Kernel Debugger
default thread slot.
Slot may be found in the TCBNumber (TCB + 0x2) field of the TCB
Except when a state transition is progress this is the same as the desired state of the thread (see Sta field of the .P command.)
The following states are possible:
┌────┬────────────────┬────────────────────┬──────────────────────────────┐ │Abrv│Qst │TCBQState Value │Description │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │--- │STATE_VOID │0 │Uninitialized or Dead thread │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │rdy │STATE_READY │1 │Thread ready to run │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │blk │STATE_BLOCKED │2 │Blocked on a Block Id │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │sus │STATE_SUSPENDED │3 │*** Not in Use *** │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │crt │STATE_CRITSEC │4 │Blocked by another CritSec │ │ │ │ │thread (after attempting to │ │ │ │ │run) │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │run │STATE_RUNNING │5 │Thread currently running │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │tsd │STATE_TSD │7 │Thread waiting for the TSD │ │ │ │ │daemon to page in the TSD. │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │bst │STATE_READYBOOST│6 │current state never set to │ │ │ │ │this value - see note below. │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │dly │STATE_DELAYED │8 │Delayed TKWakeup (Almost │ │ │ │ │Ready) │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │frz │STATE_FROZEN │9 │Frozen Thread via │ │ │ │ │DosSuspendThread, │ │ │ │ │DosCreateThread, DosExecPgm or│ │ │ │ │DosSystemService │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │gsk │STATE_GETSTACK │10 │TSD daemon is waiting for the │ │ │ │ │page manager to page in a TSD │ ├────┼────────────────┼────────────────────┼──────────────────────────────┤ │bad │STATE_BADSTACK │11 │TSD failed to page in │ └────┴────────────────┴────────────────────┴──────────────────────────────┘
Notes:
STATE_READYBOOST is a modified ready state and never becomes the current state, instead a priority boost is applied and the state becomes STATE_READY
See Sta field decription of the .P Command for related information on thread states. Pri
This is the current priority calculated by the scheduler based upon priority class (TCBPriClass (TCB +0x164)) priority class level (TCBPrilevel (TCB +0x165)) and priority boosts (TCBPriClassMod (TCB +0x166)). See Pri field description of the .P command for further information.
PriNextQ is taken from the TCBpTCBPriNextQ (TCB + 0x170) double-word field.
If there are no other linked priority queues then TCBpTCBPriNextQ and TCBpTCBPriPrevQ point to this thread and PriNextQ and PriPrevQ are shown blank.
All TCBs not heading a priority queue have TCBpTCBPriNextQ and TCBpTCBPriPrevQ pointing to themselves.
PriNext and PriPrev is only of relevance to blocked and delayed threads.
PriPrevQ is taken from the TCBpTCBPriPrevQ (TCB + 0x174) double-word field.
If there are no other linked priority queues then TCBpTCBPriNextQ and TCBpTCBPriPrevQ point to this thread and PriNextQ and PriPrevQ are shown blank.
All TCBs not heading a priority queue have TCBpTCBPriNextQ and TCBpTCBPriPrevQ pointing to themselves.
PriNext and PriPrev is only of relevance to blocked and delayed threads.
PriHigh is taken from the TCBpTCBPriHigher (TCB + 0x178) double-word field.
If there are no higher priority threads on this priority queue then TCBpTCBPriHigher points to this thread and PriHigh is shown blank.
PriLow is taken from the TCBpTCBPriLower (TCB + 0x17c) double-word field.
If there are no lower priority threads on this priority queue then TCBpTCBPriLower points to this thread and PriLow is shown blank.
PriNext is taken from the TCBpTCBPriNext (TCB + 0x180) double-word field.
If there are no other threads of the same priority on this priority queue then TCBpTCBPriNext and TCBpTCBPriPrev point to this thread and PriNext and PriPrev are shown blank.
Priprev is taken from the TCBpTCBPriPrev (TCB + 0x184) double-word field.
If there are no other threads of the same priority on this priority queue then TCBpTCBPriNext and TCBpTCBPriPrev point to this thread and PriNext and PriPrev are shown blank.