An LWP is a data structure placed between user thread and kernel thread, an appears as a virtual processor to user thread library. So, the minimum number of LWP required in many to many model of threading is the number of concurrent blocking system call.

Please explain why is it so.

Thank You.

  • Homework? Looks quite like it. I can assure you that not that many people will be willing to do it for you. I will just point you towards the next steps into finding your answer: 0) Read the predicate carefully, you have already data there. 1) What does a system call imply (...which piece of data provided in your text links to this...) ? 2) What is "blocking" (why does it make a difference)? Have fun researching and learning – dave_alcarin Oct 6 '15 at 8:22
  • no its not homework, actually i am preparing for some competitive programming and I am stuck on this topic – Navneet Srivastava Oct 7 '15 at 11:31

A Lightweitght Process is (in Unix and Unix-like) a process that runs in user space over a single kernel thread and shares its address space and resources with other LWPs of the same user process.

A system call is an invocation of kernel functionality from user space. When a user process performs a system call, the call is handled by the LWP associated with the user process/thread and gets blocked while the call is handled down in the kernel (through the kernel thread associated with the LWP) and when the call is solved, the kernel thread and LWP are free again. That is why the minimum number of LWPs required in a many to many threading model is the amount of concurrent blocking system calls, because blocking system calls and LWPs are 1:1 related (The LWP cannot do any other task when engaged by a blocking system call from the user thread)

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.