Home  >  Article  >  Operation and Maintenance  >  What does linux thread mean?

What does linux thread mean?

王林
王林Original
2020-06-29 14:13:183175browse

Linux thread is an execution branch within the process, and the thread magnitude is very small. All processes have at least one thread. Resources shared by threads: 1. User ID and group ID; 2. Current working directory; 3. The same address space; 4. The processing method of each signal.

What does linux thread mean?

The definition of thread

(Recommended learning: linux tutorial)

Thread is inside the process An execution branch, the thread size is very small (the so-called internal means running in the address space of the process).

All processes have at least one thread.

Thread-shared resources

  • The same address space

  • File descriptor table ()

  • The processing method of each signal (such as: SIG_DFL, SIG_IGN or customized signal priority)

  • Current working directory

  • User id and group id

Thread-independent resources

  • The thread will generate temporary variables, and the temporary variables are saved on the stack, so Each thread has its own private stack structure

  • Each thread has private context information.

  • Thread ID

  • The value of a set of registers

  • errno variable

  • Signal masking words and scheduling priority

The above is the detailed content of What does linux thread mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what does lvs meanNext article:what does lvs mean