Q1. What is the difference between a process and a thread in Linux?
- A process is an independent program with its own memory space and resources.
- A thread is a lightweight execution unit inside a process that shares memory and resources with other threads in the same process.
- Processes are isolated; threads are faster to communicate but need synchronization to avoid race conditions.