I'm using jobs, tasks, cores, threads, etc., but I don't really understand the relationship between them.
No matter how much I am not a specialist in computers, what happened as a person studying informatics, so I summarized it briefly.
-** Threads, processes, jobs, tasks ** are ** concepts ** and components of the program itself --A process is the execution unit of a program, that is, ** the largest group of programs ** --Thread ⊂ Process --Jobs and tasks seem to be ** ambiguous ** -** Processor, core, CPU ** are ** physically present ** PC components --Processor = CPU --Core ⊂ CPU
This is the easiest to understand. One or more threads are created in one process.
The process is the parent and the thread is the child.
How it is used varies depending on the environment, and it seems that it is often ** ambiguous **. Was good. I used it properly, but it wasn't a mistake.
For the time being, if it is a Linux system, --A job is a collection of multiple processes --Task is a general term for processes and threads
It seems.
The composition that ** CPU (= processor) ** contains ** parts (core) ** that actually perform processing.
In reality, the core is recognized as a CPU and processes and threads are assigned.
To be honest, I didn't understand this area well, so I looked it up. The answer is No.
Since the core is the place where processes and threads are ** processed **, which thread is assigned to the core is a story after the process or thread is created.
So, first of all, it seems correct that the upper limit of threads that can be run in parallel is 12, and there are 6 cores to allocate it.
In other words. If the thread limit is 12, the process limit will inevitably be 12.
For example, if you use all 12 threads in 3 processes, you can think of an allocation method like this.
Process name | Number of threads Example 1 | Number of threads Example 2 |
---|---|---|
A | 4 | 6 |
B | 4 | 4 |
C | 4 | 2 |
Reference
Recommended Posts