Processes: Basics, Characteristics, and Applications

December 31, 2024

Processes: Basics, Characteristics, and Applications

A process is a program that is being executed by the CPU. It is the instance of a program that has been loaded into memory and is performing tasks.

Characteristics of Processes:

Process Control Block (PCB): The OS keeps track of each process using a PCB, which stores information such as:

Process ID (PID)

Program counter (indicates the next instruction to be executed)

CPU registers (temporary data storage for the process)

Memory management information (addresses used by the process)

I/O status (the state of any devices used by the process)

States of a Process: A process can be in one of several states during its lifecycle:

New: When the process is created.

Ready: When the process is ready to run but waiting for CPU time.

Running: When the process is currently being executed by the CPU.

Waiting (Blocked): When the process is waiting for an event (like I/O completion).

Terminated: When the process has finished execution.

Process Scheduling: The OS uses scheduling algorithms to determine which process runs next. Common scheduling algorithms include First-Come-First-Serve (FCFS), Round Robin, and Shortest Job First (SJF).

Applications of Processes:

  • Multitasking: The OS runs multiple processes at once by quickly switching between them (time-sharing). For example, you can browse the web while listening to music and working on a document, all of which run as separate processes.
  • Background Services: Processes can run in the background to handle tasks like updates, network connections, or system monitoring.

 

 

 

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,