What is a Program?

A program is a file that resides on your hard disk. It represents code written in high-level programming languages that has been processed for execution.

Program Development Stages:

  1. Source Code: Written in high-level languages like C++
  2. Compilation: Use a compiler to convert source code to binary format
  3. Binary File: The compiled executable file stored on disk

The binary program remains a static file on your storage device until it's executed.


What is a Process?

A process is defined as a program in execution. The transformation occurs when:

Key Transformation:

Program (static file on disk)Process (active execution in memory)


Process Memory Structure

When a program becomes a process, it's organized in memory with four main sections:

image.png

1. Data Section