Understanding Kernel Threads

A thread is an independent flow of control that operates within the same address space as other independent flows of control within a process.

One process can have multiple threads, with each thread executing different code concurrently, while sharing data and synchronizing much more easily than cooperating processes. Threads require fewer system resources than processes, and can start more quickly.

Although threads can be scheduled, they exist in the context of their process. The following list indicates what is managed at process level and shared among all threads within a process:

  • Address space
  • System resources, like files or terminals
  • Signal list of actions.

The process remains the swappable entity. Only a few resources are managed at thread level, as indicated in the following list:

  • State
  • Stack
  • Signal masks.