In Linux,

  1. what is the definition of a light weight process?

    Is a light weight process defined as any thing created by clone() system call? (That is my understanding from the book Understanding the Linux Kernel)

    Is a regular process a light weight process? (I guess yes)

  2. Does Linux have a concept called "heavy weight process"? (I guess it means a regular process, so a heavy weight process is still a light weight process?)


  • Light basically means sharing the memory space with others, but since the process and threads concept is too ambiguous, so LWP is not precisely defined. Also there are tons of other resources/properties you need to consider, so it's useless concept. What you need to focus is what reality's like, not how human study the reality. Sep 30 '18 at 1:30

No, light process is just a thread share resources with others. Because early Linux doesn't support threads and TGID. But not anymore, modern Linux do have thread concept and TGID, which is what you get from getpid. Today people don't talk about light or heavy anymore.

But important thing is, for KERNEL, threads in the same process can be much more independent than you think(I believe they all have their own PCBs), threads not in the same process may also share amazing things you may not expected. KERNEL force threads in one process to share some things like user namespace, mount namespace, PID namespace, but not credentials or some others. To get "threads" that acts more like what you expected, use 1-1 mapping or m-n mapping user-space thread like pthread or Go threads.

  • Thanks. What is "no" to? Could you reply to the specific questions in my post?
    – Tim
    Sep 30 '18 at 1:16
  • I already answered.Younger People don't talk about light/heavy anymore, just old people.@Tim Sep 30 '18 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.