Process: An Independent Program Instance
What You'll Learn
You'll understand what a process is in the context of the operating system and how it relates to running Java applications.
The Core Idea
A process is an independent, isolated instance of a running program. When you launch a Java application, the operating system creates a process for it—a self-contained environment with its own memory space, system resources, and execution context.
Think of a process like a separate house: each house (process) has its own rooms (memory), utilities (resources), and inhabitants (threads). The neighbors can't walk through your walls or use your electricity—that's isolation.
Key Characteristics of Processes
Memory Isolation
Each process operates in its own private memory space. One process cannot directly access or corrupt another process's memory. This provides stability and security—if one Java application crashes, it won't take down other running programs.
System Resources
Processes have their own file handles, environment variables, and resource allocations. When you run multiple instances of a Java program, each is a separate process with independent resource management.
Independence
Processes don't share state by default. If you launch the same JAR twice, you get two completely separate executions. Changes in one don't affect the other unless they explicitly communicate through mechanisms like files, network sockets, or inter-process communication (IPC).
The Operating System Boundary
The OS schedules and manages processes independently. Each process appears to have the entire machine to itself, though the OS multiplexes access to CPU and hardware.
Key Takeaway: A process is an isolated, independent instance of a running program with its own protected memory space and system resources—the fundamental unit of program execution managed by the operating system.