Thread personas
A thread can run in two modes, which are sometimes described as personas.
These
personas help describe the change in privilege, address space access, and stack use that occurs
when a thread makes a kernel call.
user persona) and triggers the following changes in its attributes and behavior:
- it runs at an elevated privilege level
- the kernel address space becomes visible
- it uses a kernel-space stack instead of its regular stack
However, a thread in its kernel persona retains most of its attributes, including its priority and scheduling algorithm. A thread that makes a kernel call can still be pre-empted, interrupted, and so on, much like when it makes a regular, user-space library call.
Some threads, such as in-kernel Interrupt Service Threads (ISTs), have a kernel persona only. For example, calling InterruptAttachEvent() creates a kernel-persona-only thread that belongs to the process. The thread has no user stack and never runs user code. These characteristics mean that if the process has only one other thread, it is still considered single-threaded (e.g., for synchronization and safety purposes).
