Native posix thread library nptl for linux an

This preview shows page 32 - 33 out of 33 pages.

Native POSIX Thread Library (NPTL) for Linux, an implementation of the POSIX Threads (pthreads) standard Apple Multiprocessing Services version 2.0 and later, uses the built-in nanokernel in Mac OS 8.6 and later which was modified to support it. Microsoft Windows from Windows NT and later versions. User-level implementation examples GNU Portable Threads Solaris Green Thread Netscape Portable Runtime (includes a user-space fibers implementation) Hybrid implementation examples Scheduler activations used by the NetBSD native POSIX threads library implementation (an M:N model as opposed to a 1:1 kernel or userspace implementation model) The OS for the Tera/Cray MTA Microsoft Windows 7 (????? Because of fibers support??) Fiber implementation examples Fibers can be implemented without operating system support, although some operating systems or libraries provide explicit support for them. Win32 supplies a fiber API (Windows NT 3.51 SP3 and later) Ruby as Green threads 6. Summary on user threads vs. kernel threads User-level threads o created and managed by a threads library that runs in the user space of a process o a mode switch is not required to switch from one thread to another o only a single user-level thread within a process can execute at a time o if one thread blocks, the entire process is blocked Kernel-level threads o threads within a process that are maintained by the kernel o a mode switch is required to switch from one thread to another o multiple threads within the same process can execute in parallel on a multiprocessor o blocking of a thread does not block the entire process Process/related to resource ownership Thread/related to program execution
Image of page 32

Subscribe to view the full document.

33 Some operating systems distinguish the concepts of process and thread, the former related to resource ownership and the latter related to program execution. This approach may lead to improved efficiency and coding convenience. In a multithreaded system, multiple concurrent threads may be defined within a single process. This may be done using either user-level threads or kernel-level threads. User-level threads are unknown to the OS and are created and managed by a threads library that runs in the user space of a process. User-level threads are very efficient because a mode switch is not required to switch from one thread to another. However, only a single user-level thread within a process can execute at a time, and if one thread blocks, the entire process is blocked. Kernel-level threads are threads within a process that are maintained by the kernel. Because they are recognized by the kernel, multiple threads within the same process can execute in parallel on a multiprocessor and the blocking of a thread does not block the entire process. However, a mode switch is required to switch from one thread to another.
Image of page 33
You've reached the end of this preview.
  • Spring '12
  • GwangS.Jung

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern