Lukas' Notes

computer-architecture

Definition

Hardware Thread

A hardware thread is an independent execution context managed by the processor. Each hardware thread has its own program counter and register file, but shares the address space of a single process.

Relationship to Software

A software thread is a unit of execution managed by the operating system. A hardware thread is the physical execution context the processor uses to run a software thread. Multiple software threads can be multiplexed onto fewer hardware threads by the OS scheduler.

Hardware Multi-Threading

In hardware multi-threading, multiple hardware threads share the functional units of a single core. The processor duplicates only private state — the PC and register file — and switches between threads rapidly to hide pipeline and memory latencies. This is lighter-weight than a full process switch because the address space and caches remain shared.