2. THREAD INTRODUCTION
▪ A flow of execution through process code
▪ Basic unit of CPU utilization
▪ Component of process
▪ Consists of a program counter, stack, set of registers,
and ID
▪ Can be single or multiple
2
3. USES OF THREAD
▪ To improve program performance
▪ To maximize CPU utilization
▪ Make good use of parallel processing
▪ To reduce resource usage
3
4. TYPES OF THREAD
▪ User Level Threads (ULT)
▪ Kernel Level Threads (KLT)
4
5. USER LEVEL THREAD
▪ Implemented in user level libraries
▪ Does not call OS for context switching
▪ Is not known to OS Kernel
▪ Platform independent
5
6. KERNEL LEVEL THREAD
▪ Created and managed by OS Kernel
▪ Is known to OS Kernel
▪ Can be multithreaded
▪ Runtime system is not needed
6
9. ADVANTAGES OF THREAD
▪ Faster context switching
▪ Minimizes resource usage by resource sharing
▪ Provides concurrency within a process
▪ Effectively utilizes multiprocessor system
▪ Makes communication between multiple threads easier
9
10. DISADVANTAGES OF THREAD
▪ May cause security issues
▪ Blocking of a parent thread will stop all the child threads
▪ CPU may remain idle during blocking period
10