O'Reilly logo

C++ Multithreading Cookbook by Milos Ljumovic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing threads in user space

There are two ways to implement a thread's package: in the user space and in the kernel. The choice is moderately controversial and a hybrid implementation, where it is also possible to use a combination of user and kernel thread.

We will now describe these methods, along with their advantages and disadvantages. The first method is to put the threads package entirely in the user space. The kernel knows nothing about them. As far as the kernel is concerned, it is managing ordinary, single-threaded processes. The first and most obvious advantage is that a user-level threads package can be implemented on an operating system that does not support threads.

Traditional operating systems used to fall into this category, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required