In case of Linux kernel, there is no difference between a process and a thread.
愈睇愈唔明咩係thread
青山綠豆2022-04-21 11:55:49
mynameis...2022-04-21 12:00:30
摩根士丹利2022-04-21 12:03:49
False
手一黏便緊(UTC+92022-04-21 12:10:53
In linux, from the view point of kernel, there is no thread nor process, there is only task
Some task does not share any execution context
Some task shares some execution context with other task, for example memory space
When you clone a new task with some particular flag, the task looks like a thread from the view point of programmer
Note that the viewpoint of linux kernel is quite different from windows, as windows sees process as owner of resources and thread as unit of execution
Don’t try to compare these two ideas. Instead treat these two viewpoints as two different features provided by two systems, and process/thread is your abstraction.