Thread vs Process

Thread is a light weight process runs with in an application or a process to perform or execute desired set of instructions. A process can contain N number of threads to perform a unique operation , this unique operation will be divided into sub operations and assigned to threads to complete.

Process may or not may not communicate with other process but in case of threads needs communication with other threads for best practice but there is no compulsion as such.

Major differences or similarities from process to threads

S.No Threads Process
1 Light weight Process May or may not be a light weight process
2 Performs sub operations with in a process Performs a Unique operation
3 Needs to communicate with other threads for its existence May or may note require to communicate with other process
4 Shared resources should be handled carefully Shared resources may or may not require to be handled carefully
5 CPU cycles properly utilized. CPU cycles may not be properly utilized.
6 High Performance Performance will be less as compared to threads.
6 Better user interaction in UI based application less or no user interaction in UI.