how kernel distinguishes between thread and process

Viewed 1735

in Linux threads are called light weight processes. Whether process or thread, they are implemented by task_struct data structure.

1> So, in that sense how kernel distinguishes between thread and process?

2> when context switching happens, how do threads get less overhead in context switching? because prior to this thread, another thread from another process may be running. So kernel should load all resources even if resources are shared between threads of a processes.

3 Answers
Related