Multiprocessing with Python

preview_player
Показать описание

Multiprocessing with Python presented by Pinku Surana.
Python is restricted to a single OS thread; therefore, it cannot make use of the multiple cores and processors available on modern hardware. Instead, Python programmers can use the multiprocessing library to easily create and coordinate multiple Python processes. Each one is scheduled independently on the CPU by the OS. In fact, this programming model is easier than parallelism with threads because it limits the complexity of concurrent synchronization. For applications that need more CPU power, multiprocessing is an invaluable library.

Рекомендации по теме
Комментарии
Автор

i think im in love.. with pinku. thanks a lot man, i was a little intimidated by knowing id have to multi-thread my code but not any more, thank you!! great!

holographicsol
Автор

Good explanation - thanks. Found it a very nice introduction

ianwebb
Автор

what a great talk about multiprocessing, thank you for this (Y)

dhanababu
Автор

how can we implement shortest job first scheduling algorithm in python

rabiashahid
Автор

Can we set the pool value as variable 'x' ... My goal is to create a 3d rendering farm code that connects multiple PC clients from around the world together and render the same or different 3d files with the help of multiple connected processors ...?

s.v.arulshiju
Автор

is it possible or sensful to use this library for some sort of image processing?

amrosik
Автор

Help friend when I use pool.map with 2 workers in the process list I see 20 subprocesos and the memory is fullfilled and memory error usted getting.

vitoc
Автор

That's why I tell don't do webinar when ur Indian Mom is cooking chicken curry!!

FirstNameLastName-fveu
Автор

guys i realy need help over here.I am copying the exact code from the video at 15:42 and the result from my python shell is this:
Traceback (most recent call last):
File "C:/Users/admin/Desktop/py3.py", line 10, in <module>
with Pool(processes=5) as p:
AttributeError: __exit__
i am using python 2.7.10 if i am not mistaken and windows(i dont have a macbook)....can anyone tell me what is the problem?? i really need help...immediatly!

babispatatoukos
Автор

hello i need to know the difference between (Queue/Pipe) and shared memory, Tanks a lot

tahahissami
Автор

It won'y only "use one core", it may use many, but the process won't run in parallel even if 2 threads are at the same time in the processor. One of them will block and/or trash. So, it's even worst than beeing on single core.

twistedsim