0% found this document useful (0 votes)
5 views2 pages

Understanding Operating System Processes

A process is an active program in execution, transitioning from a passive state when loaded into memory. Modern operating systems support multitasking and multiprocessing, allowing multiple processes to run concurrently, while threads within a process share memory. The document outlines the structure of processes in memory, differentiating between programs, processes, and threads based on their characteristics and execution.

Uploaded by

charudesnas347
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Understanding Operating System Processes

A process is an active program in execution, transitioning from a passive state when loaded into memory. Modern operating systems support multitasking and multiprocessing, allowing multiple processes to run concurrently, while threads within a process share memory. The document outlines the structure of processes in memory, differentiating between programs, processes, and threads based on their characteristics and execution.

Uploaded by

charudesnas347
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to Processes in Operating Systems

What is a Process?

- A process is a program in execution, an active entity with a program counter, stack, heap, and other

resources.

- A program is a passive set of instructions stored on disk; it becomes a process when loaded into memory

and executed.

Example: Double-clicking a .exe file turns it from a program into a process. Opening it multiple times creates

multiple processes.

Evolution of Process Management

Early Systems:

- Supported only one program at a time (no multitasking).

- No process-level abstraction or simultaneous execution.

Modern Systems:

- Allow multiple programs to run at once via multiprocessing or multitasking.

- Handle system and user processes simultaneously.

- Even on single-user OSs, background processes support main apps.

Process Structure in Memory

A process is divided into four sections:

1. Text - Contains program code and current execution state

2. Data - Global and static variables

3. Heap - Dynamically allocated memory

4. Stack - Function parameters, return addresses, local variables

Multitasking, Multiprocessing & Threads

Multitasking:

- General term for handling multiple tasks concurrently.


Introduction to Processes in Operating Systems

Multiprocessing:

- Multiple processes run concurrently.

- Each has its own memory space.

Example: One process handles printing, another reads input.

Multithreading:

- A single process with multiple threads.

- Threads share the same address space.

Example: A program displays time while accepting user input.

Key Difference:

- Threads share memory (lightweight)

- Processes do not (heavier, more isolated)

Formal Definitions of a Process

- A process is an instance of a program in execution.

- Other definitions include:

* Asynchronous activity

* Focus of control

* Dispatchable unit

* Managed by Process Control Block (PCB)

Summary Table: Program vs Process vs Thread

Feature | Program | Process | Thread

-------------- | -------------- | ---------------- | ------------------------

Type | Passive entity | Active entity | Lightweight part of a process

Memory | Stored on disk | Own memory space | Shares memory with process

Execution | Not executed | Runs independently| Runs within a process

Example | .cpp file | [Link] when run | Clock display inside app

You might also like