0% found this document useful (0 votes)
49 views6 pages

Multiprocess

multiprocess

Uploaded by

rohittestuser255
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)
49 views6 pages

Multiprocess

multiprocess

Uploaded by

rohittestuser255
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
You are on page 1/ 6

8/6/24, 3:10 PM Multiprocessing in Python | Set 1 (Introduction) - GeeksforGeeks

Python Basics Interview Questions Python Quiz Popular Packages Python Projects Practice Python AI Wit

Multiprocessing in Python | Set 1 (Introduction)


Last Updated : 15 Sep, 2023
This article is a brief yet concise introduction to multiprocessing in Python
programming language.

What is multiprocessing?

Multiprocessing refers to the ability of a system to support more than one


processor at the same time. Applications in a multiprocessing system are
broken to smaller routines that run independently. The operating system
allocates these threads to the processors improving performance of the
system.

Why multiprocessing?

Consider a computer system with a single processor. If it is assigned several


processes at the same time, it will have to interrupt each task and switch
briefly to another, to keep all of the processes going.
This situation is just like a chef working in a kitchen alone. He has to do several
tasks like baking, stirring, kneading dough, etc.

So the gist is that: The more tasks you must do at once, the more difficult it
gets to keep track of them all, and keeping the timing right becomes more of a
challenge.
This is where the concept of multiprocessing arises!
A multiprocessing system can have:

multiprocessor, i.e. a computer with more than one central processor.


multi-core processor, i.e. a single computing component with two or more
independent actual processing units (called “cores”).

Here, the CPU can easily executes several tasks at once, with each task using
its own processor.

https://www.geeksforgeeks.org/multiprocessing-python-set-1/ 1/6
8/6/24, 3:10 PM Multiprocessing in Python | Set 1 (Introduction) - GeeksforGeeks

It is just like the chef in last situation being assisted by his assistants. Now,
they can divide the tasks among themselves and chef doesn’t need to switch
between his tasks.

Read More

Similar Reads
Python multiprocessing.Queue vs multiprocessing.manager().Queue()
In Python, the multiprocessing module allows for the creation of separate
processes that can run concurrently on different cores of a computer. One of the…
10 min read

Multiprocessing in Python | Set 2 (Communication between processes)


Multiprocessing in Python | Set 1 These articles discusses the concept of data
sharing and message passing between processes while using multiprocessing…
9 min read

Difference Between Multithreading vs Multiprocessing in Python


In this article, we will learn the what, why, and how of multithreading and
multiprocessing in Python. Before we dive into the code, let us understand what…
8 min read

Running Queries in Python Using Multiprocessing


Before diving into running queries using multiprocessing let’s understand what
multiprocessing is in Python. Multiprocessing enables the computer to utilize…
3 min read

Multithreading or Multiprocessing with Python and Selenium


Multithreading and multiprocessing are two popular approaches for improving
the performance of a program by allowing it to run tasks in parallel. These…
11 min read

Understanding ‘fork’ and ‘spawn’ in Python Multiprocessing


Python’s multiprocessing library provides a powerful way to leverage multiple
processor cores for concurrent execution, enhancing the performance of…
https://www.geeksforgeeks.org/multiprocessing-python-set-1/ 2/6
8/6/24, 3:10 PM Multiprocessing in Python | Set 1 (Introduction) - GeeksforGeeks
6 min read

Python Database Optimization with Psycopg2 and Multiprocessing


This article will provide a succinct overview of the fundamental utilization of the
Psycopg2 module and the Multiprocessing module in Python. It will cover how…
6 min read

Multiprocessing with NumPy Arrays


Multiprocessing is a powerful tool that enables a computer to perform multiple
tasks at the same time, improving overall performance and speed. In this article,…
5 min read

Multiprocessing in FastAPI
In this article, we are going to see what is multiprocessing, and how
multiprocessing can utilize the system resources efficiently and can reduce the…
5 min read

Array in Python | Set 1 (Introduction and Functions)


Other than some generic containers like lists, Python in its definition can also
handle containers with specified data types. The array can be handled in Python…
7 min read

Article Tags : Python

Practice Tags : python

https://www.geeksforgeeks.org/multiprocessing-python-set-1/ 3/6
8/6/24, 3:10 PM Multiprocessing in Python | Set 1 (Introduction) - GeeksforGeeks

Corporate & Communications Address:- A-


143, 9th Floor, Sovereign Corporate Tower,
Sector- 136, Noida, Uttar Pradesh (201305)
| Registered Address:- K 061, Tower K,
Gulshan Vivante Apartment, Sector 137,
Noida, Gautam Buddh Nagar, Uttar
Pradesh, 201305

Company Explore
About Us Job-A-Thon Hiring Challenge
Legal Hack-A-Thon
Careers GfG Weekly Contest
In Media Offline Classes (Delhi/NCR)
Contact Us DSA in JAVA/C++
Advertise with us Master System Design
GFG Corporate Solution Master CP
Placement Training Program GeeksforGeeks Videos
Geeks Community

Languages DSA
Python Data Structures
Java Algorithms
C++ DSA for Beginners
PHP Basic DSA Problems
GoLang DSA Roadmap
SQL DSA Interview Questions
R Language Competitive Programming
Android Tutorial

Data Science & ML Web Technologies


Data Science With Python HTML
Data Science For Beginner CSS
Machine Learning Tutorial JavaScript
ML Maths TypeScript
Data Visualisation Tutorial ReactJS
Pandas Tutorial NextJS
NumPy Tutorial NodeJs
https://www.geeksforgeeks.org/multiprocessing-python-set-1/ 4/6
8/6/24, 3:10 PM Multiprocessing in Python | Set 1 (Introduction) - GeeksforGeeks
NLP Tutorial Bootstrap
Deep Learning Tutorial Tailwind CSS

Python Tutorial Computer Science


Python Programming Examples GATE CS Notes
Django Tutorial Operating Systems
Python Projects Computer Network
Python Tkinter Database Management System
Web Scraping Software Engineering
OpenCV Tutorial Digital Logic Design
Python Interview Question Engineering Maths

DevOps System Design


Git High Level Design
AWS Low Level Design
Docker UML Diagrams
Kubernetes Interview Guide
Azure Design Patterns
GCP OOAD
DevOps Roadmap System Design Bootcamp
Interview Questions

School Subjects Commerce


Mathematics Accountancy
Physics Business Studies
Chemistry Economics
Biology Management
Social Science HR Management
English Grammar Finance
Income Tax

https://www.geeksforgeeks.org/multiprocessing-python-set-1/ 5/6
8/6/24, 3:10 PM Multiprocessing in Python | Set 1 (Introduction) - GeeksforGeeks

Databases Preparation Corner


SQL Company-Wise Recruitment Process
MYSQL Resume Templates
PostgreSQL Aptitude Preparation
PL/SQL Puzzles
MongoDB Company-Wise Preparation
Companies
Colleges

Competitive Exams More Tutorials


JEE Advanced Software Development
UGC NET Software Testing
UPSC Product Management
SSC CGL Project Management
SBI PO Linux
SBI Clerk Excel
IBPS PO All Cheat Sheets
IBPS Clerk Recent Articles

Free Online Tools Write & Earn


Typing Test Write an Article
Image Editor Improve an Article
Code Formatters Pick Topics to Write
Code Converters Share your Experiences
Currency Converter Internships
Random Number Generator
Random Password Generator

@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved

https://www.geeksforgeeks.org/multiprocessing-python-set-1/ 6/6

You might also like