Threads is a single sequential flow of execution of the tasks of process. A thread is light weight process and the smallest unit of CPU utilization. Thread is like mini process. A thread undergoes different states such as new, ready, running, waiting and terminated similar to that of process. A thread is not a program as it can not on its own. It runs within a program.
Three types of threads:
- Kernel Level Threads :-Threads of processes defined by operating system itself are called Kernel Threads.
- User Level Threads :- Threads of user application process are call User Threads.
- Hybrid :- In hybrid both kernel level and user level thread are implemented.