Operating Systems

The difference between a program and a process

So far we have been using the term "program" when explaining how a high-level program is executed by the CPU. While this is useful as a simplified explanation, a more technically accurate statement is that the CPU executes instructions belonging to a process.

The difference between a program and a process is that a program is a passive set of instructions stored on secondary storage, also referred to as a "passive entity". Whereas a process is an active instance of a program being executed, also referred to as an "active entity". A passive entity is something that exists but is not currently executing or changing state by itself. A program is a passive entity because it is essentially a collection of instructions and data stored on secondary storage. A program isn't doing anything simply because it exists on your SSD. It is just information that can be executed. An active entity is something that is currently participating in execution and has a changing state. A process is an active entity because it represents an executing instance of a program.

Being an active entity doesn't necessarily mean "currently executing on the CPU." A process in the Ready or Blocked state is still considered an active entity. "Active" here means it represents an ongoing execution with state, not that it must currently be in the Running state.