LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Threading in linux (https://www.linuxquestions.org/questions/linux-newbie-8/threading-in-linux-4175438029/)

bunny85 11-20-2012 05:24 PM

Threading in linux
 
I'm new to linux and learing about threading in linux. i would like to know how linux handles threads? and are threads faster in linux than in windows?
any reference or documents wuld really help

tekhead2 11-20-2012 05:35 PM

Welcome to LQ, and yes Linux is faster in everyway you can imagine lol! There are a lot of differing camps and opinions on wither POSIX threading is faster or better than Win32 threading. Its difficult to make comparisons because the way Linux handles processes and threads is entirely different than the way a Windows system will handle them. So there is no real apples to apples comparisons to be made. The way Linux works is entirely different from Windows so its difficult to just pull out one aspect and compare them. I think you need to consider all of the functions an OS does in order to determine which is faster and or better. For more in dept information on how Linux or any POSIX compliant OS handles threads read this http://www.ibm.com/developerworks/li...ix1/index.html

bunny85 11-20-2012 05:46 PM

thanks for the reply. i would like to know how linux handles user threads..
and r user threads given low priority in linux?

tekhead2 11-20-2012 05:55 PM

There is a clear distinction between kernel and user in Linux , so by definition a user thread would be given a lower priority say over a kernel thread, this is to keep the core of the OS intact so no one user process could bring a system to it's knees. I think you should take some time and read this from the Linux Documentation Project, this site has TONS of resources for new users and you sound like your a programmer, this may be able to better explain what your wanting to know than I can http://www.tldp.org/FAQ/Threads-FAQ/index.html and all of their documentation can be found at http://www.tldp.org

teckk 11-21-2012 08:54 AM

http://www.ibm.com/developerworks/li...lpic1-v3-103-6


All times are GMT -5. The time now is 06:29 PM.