Pcornel
Windows

Processes

Cheat sheet · https://pcornel.dk/topic.php?topic=3006

Back to the Topic

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 processes
  • Get-CimInstance Win32_Process -Filter "ProcessId=<pid>" | Select Name,ParentProcessId,CommandLine — command line and parent
  • tasklist /v — processes with user and status
  • taskkill /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

ItemMeaningEvidence boundary
ProcessResource/security containerPID, image, token, address space, handles and threads
ThreadSchedulable execution unitCPU time, wait/state and owning process
HandleReference to an objectobject type/name/access and owning process
Process treeCreation provenanceparent/creator PID and child instances
Tool outputObservationsnapshot 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

Confirmation

Confirm action

Continue?