A thread can do anything a process can do. But since a process can consist of multiple threads, a thread could be considered a ‘lightweight’ process. So the essential difference between a thread and a process is the work that each one is used to accomplish. Threads are used for small tasks, whereas processes are used for more ‘heavyweight’ tasks – basically the execution of applications.
Both processes and threads are independent sequences of execution. The difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces. This allows threads to read from and write to the same data structures and variables, and also facilitates communication between threads. Communication between processes – also known as IPC, or inter-process communication – is quite difficult and resource-intensive
[amazon_link asins=’B01BDQK5A4,1590599551,1590593197,B00GX9HM5S,B074RJT99M,1590594398,B0787CKSF9,B0014DBI4O,1430210338|0672337886,1590594398,B0787CKSF9,1785881256,1590599551,1590593197,1849697647,1453605754,161729201X’ template=’ProductGrid’ store=’desibanjara22-21|desibanjaraco-21′ marketplace=’IN|UK’ link_id=’1be2663b-9357-11e8-b624-db735f35d31f’]