A process is represented by a data structure (i.e., a struct or class)- the process control block (PCB).
A thread in a process is also represented by another data structure (i.e., a struct or class) - thread control block (TCB).
A process will have have one or more threads. The PCB may have a pointer to a list of thread control blocks.
The context of a thread is represented by its
- stack
- register state
- process memory
- open files
- ...
The TCB will need to provide access to all components of the thread context.