Infosys Interview Question

Can you explain the difference between a process and a thread in an operating system?

Interview Answer

Anonymous

Apr 3, 2025

A process is an independent program in execution, with its own memory space, resources, and execution context. It is managed by the operating system and runs in isolation from other processes. In contrast, a thread is a lightweight unit of execution within a process. Multiple threads within the same process share the same memory and resources but execute independently. Threads enable faster execution and efficient resource utilization since they do not require separate memory allocation like processes. However, managing multiple threads requires synchronization to avoid race conditions and data inconsistency.