top of page
fondo banner oscuro

Tech Glossary

Multi-processing

Multi-processing is a computing technique that involves the simultaneous execution of multiple processes using two or more processors (or cores) within a single computer system. Unlike multi-threading, which involves multiple threads within a single process sharing memory space, multi-processing runs independent processes, each with its own memory space and system resources, allowing true parallelism.

In a multi-processing environment, the operating system can assign different tasks to separate CPUs or cores, enabling programs to run concurrently and handle CPU-intensive workloads more efficiently. This is especially useful in scientific computing, big data processing, machine learning training, and applications that require high performance or must handle large volumes of data in parallel.

There are two main types of multi-processing architectures:
* Symmetric Multi-Processing (SMP): All processors share a single operating system and memory. Common in modern multi-core CPUs.
* Asymmetric Multi-Processing (AMP): Each processor is assigned a specific task, often with a dedicated OS. Common in embedded systems.

The advantages of multi-processing include better CPU utilization, improved throughput, and increased fault isolation, as a crash in one process typically doesn’t affect others. It also allows for true parallel execution, unlike multi-threading, which can be limited by Python's Global Interpreter Lock (GIL) or similar runtime constraints in other languages.

However, multi-processing comes with higher memory consumption, since each process maintains its own address space. It also involves more complex inter-process communication (IPC) using techniques like sockets, pipes, or shared memory—making coordination more challenging compared to threads.

Many programming languages provide built-in support for multi-processing:

Python: multiprocessing module
Java: via multiple ProcessBuilder instances or external JVMs
C/C++: using fork(), POSIX processes, or libraries like MPI for distributed computing

Multi-processing primarily operates at the operating system level, interacting directly with the CPU scheduling and memory management subsystems, and is often used in parallel computing architectures for maximum performance.

Learn more about Multi-processing

bottom of page