Implementation of threads || Process and Thread Management || Bcis Notes

Implementation of threads || Process and Thread Management || Bcis Notes

Implementation of threads

Implementation of threads are listed below, they are:-

  • user implementation of threads
  • kernel implementation of threads

User implementation of threads

Implement the entire threads package in userspace without the kernel knowing about them. When one thread gets blocked by a system call, all user-level threads get blocked. As far as the kernel is concerned, it is managing ordinary, single-threaded processes. User-level threads do not require modification to operating systems. A user-level threads package can be implemented on an operating system that does not support threads. The threads run on top of a run-time system, which is a collection of procedures that manage threads. When threads are managed in user space, each process needs its own private thread table
to keep track of the threads in that process. This table is analogous to the kernel’s process table, except that it keeps tracks only of the per-thread properties, such as each thread’s program counter, stack pointer, registers, state, and so forth. The thread table is managed by the run-time system. When a thread is moved to ready state or blocked state, the information needed to restart it is stored
in the thread table

Kernel implementation of threads

The kernel’s thread table holds each thread registration, state, and other information. The information is the same as with the user-level threads, but now kept in the kernel instead of the user space (inside the run-time system). This information is the subset of information that
traditional kernels maintain about their single-threaded process, that is, the process state. Kernel-level threads are especially good for applications that frequently block.In addition, the kernel also maintains the traditional process table to keep track of processes.

so these are the implementation in process and thread management of the operating system.

you may also like Types of Threads

 

Be the first to comment

Leave a Reply

Your email address will not be published.


*