Processes
Cheat sheet · https://pcornel.dk/topic.php?topic=3006
Answer
Processes is the Windows runtime branch for understanding an executing program as a resource and security container. A process owns an address space, token/security context, handles and one or more threads; the threads are the schedulable execution units that actually run code.
Remember
- A process is not the same thing as an executable file; one image can have many process instances.
- Threads execute inside a process and share that process resource context.
- Handles are process references to kernel-managed objects such as files, registry keys, events, processes and sections.
- A parent/child relation describes process creation provenance; it is not by itself a health or lifecycle guarantee.
- Process exists ≠ application healthy ≠ service healthy ≠ end-to-end function healthy.
First checks
Get-Process | Sort CPU -Desc | Select -First 10 Name,Id,CPU,WS— top processesGet-CimInstance Win32_Process -Filter "ProcessId=<pid>" | Select Name,ParentProcessId,CommandLine— command line and parenttasklist /v— processes with user and statustaskkill /PID <pid> /T— stop a process tree
Commands
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10- Lists the ten processes that have used the most CPU time since they started.
tasklist- Displays currently running processes on the local or a remote Windows computer, with filters and optional verbose/servi…
taskkill- Terminates one or more Windows processes by PID, image name or filter. It is a recovery/control command, not a diagnost…
Verify in this order
parent starts the process → threads run → uses memory and handles → exits
Where it usually breaks
First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.
Processes reference map
| Item | Meaning | Evidence boundary |
|---|---|---|
| Process | Resource/security container | PID, image, token, address space, handles and threads |
| Thread | Schedulable execution unit | CPU time, wait/state and owning process |
| Handle | Reference to an object | object type/name/access and owning process |
| Process tree | Creation provenance | parent/creator PID and child instances |
| Tool output | Observation | snapshot or event evidence; not automatic root cause |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3006