top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Multiprocessing and Multithreading

+1 vote
610 views

Please share your idea about Multiprocessing and Multithreading specially in context of python.

posted Oct 8, 2013 by Jai Prakash

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Multiprocessing is about more than one process and multithreading is about more than one thread. If you want Python specifics you can check at http://docs.python.org/3/library/multiprocessing.html or here
http://docs.python.org/3/library/threading.html, both of which may have been found by using your favourite search engine.

answer Oct 8, 2013 by Sumit Pokharna
Just an additional info
Threads share all memory and global variabls. They can communicate with each other through global variables.

Processes are completely isolated from each other and much communicate with each other through mechanisms provided by the OS (e.g. sockets, mailboxes, pipes, files).
Similar Questions
+2 votes

Please explain in detail, I know the answer but may not be proper?

+2 votes

Please share some thoughts of Global Variable In multiprocessing with examples for python.
Do we have some best practices of multiprocessing.

0 votes

I need a command that will make threads created by "multiprocessing.Process()" wait for each other to complete. For instance, I want to do something like this:

job1 = multiprocessing.Process(CMD1())
job2 = multiprocessing.Process(CMD2())

jobs1.start(); jobs2.start()

PY_FUNC()

The command "PY_FUNC()" depends on the end result of the actions of CMD1() and CMD2(). I need some kind of wait command for the two threads that will not let the script continue until job1 and job2 are complete. Is this possible in Python3?

+5 votes

In the below figure through shared l2 cache what type of data (I mean is it global variables ?) is shared .

l2 cache

+1 vote

I was searching the differences in normal C-lang multithread program and a multicore programming. Can any one clarify the difference and how the "parallelism" OR "execution-speed" is achieved form multicore programming.

Using the thread attribute we can set the affinity(in which core he has to run) to the thread, not not getting the exact usage of multicore programming.

One more question how to access the common(global data) memory in multicore programming, will synchronization adds delay in execution? If yes then what is the use of multicore programming

...