Windows, Linux & others utility tools Tips & Tricks

User-Level Threads implementation in user-level libraries

User-Level Threads

user_level



User-level threads are implemented in user-level libraries, rather than via systems calls, so thread switching does not need to call operating system and to cause interruption to the kernel. In fact, the kernel knows nothing about user-level threads and manages them as if they were single-threaded processes.

Advantages:

The most obvious advantage of this technique is that a user-level threads package can be implemented on an Operating System that does not support threads. Some other advantages are

•User-level threads do not require modification to operating systems.

•Simple Representation:
Each thread is represented simply by a PC, registers, stack and a small control block, all stored in the user process address space.

•Simple Management:

This simply means that creating a thread, switching between threads and synchronization between threads can all be done without intervention of the kernel.

•Fast and Efficient:

Thread switching is not much more expensive than a procedure call.

Disadvantages:


•There is a lack of coordination between threads and operating system kernel. Therefore, process as whole gets one time slice irrespect of whether process has one thread or 1000 threads within. It is up to each thread to relinquish control to other threads.

•User-level threads requires non-blocking systems call i.e., a multithreaded kernel. Otherwise, entire process will blocked in the kernel, even if there are runable threads left in the processes. For example, if one thread causes a page fault, the process blocks
User-Level Threads implementation in user-level libraries User-Level Threads implementation in user-level libraries Reviewed by Parveen Kumar on May 31, 2010 Rating: 5

No comments:

In the digital age, privacy concerns are more pressing than ever.  A tutorial titled "How to hide folders" seems to provide many u...

Powered by Blogger.