Linux thread model comparison-Linux threads and nptl

Source: Internet
Author: User
Linux thread and POSIX are incompatible, and in the kernel, a thread is actually a process (but these threads are generated by clone). Therefore, there are many disadvantages, for example, we can see a multi-threaded program in some old systems (such as the versions earlier than redhat9 and the rhel as2 series), under top or PS or/proc, we can see a lot of Process Information items. This is because these threads exist in the kernel as processes. For details, see the Linux thread restrictions section in this article.

Nptl is the native POSIX thread library and is compatible with POSIX. This is a good thread solution today. nptl is used for both redhat9 and RHEL as3 and 4. Therefore, our pthread_create can run very well. In the top table, there is only one multi-threaded program, because it only has one process. For the specific advantages, see the article.

A good table in the article lists the versions of thread libraries in some mainstream Linux operating systems. If you want to check what thread library is used in Linux, it is also very simple. Just execute this command:

Getconf gnu_libthread_version

/Files/super119/linuxandnptlthread_882.mht.zip

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.