What is a thread?
A thread or else called a lightweight process (LWP) is a basic unit of CPU utilization, it comprises of a thread id, a program counter, a register set and a stack. It shares with other threads belonging to the similar process its code section, data section, and operating system resources like open files and signals.