• Advertisement
Sign in to follow this  

Difference between multiprocessing and multiprocessor

This topic is 1407 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Multiprocessing means using 2 or more CPU to run different parts of the same program. <-Meaning one program.

 

Source: http://www.britannica.com/EBchecked/topic/397249/multiprocessing

 

But this the link above said multiprocessing involves 2 or more CPU to run multiple programs at the same time. <-But the source below says multiple programs.

 

http://www.webopedia.com/TERM/M/multiprocessing.html

Multiprocessor is a computer system having two or more CPUs each sharing main memory and peripherals in order to process programs at the same time

 

http://en.wikipedia.org/wiki/Multiprocessing <-But wikipedia uses the definition of multiprocessing (2nd paragraph of the post) to define multiprocessing.

 

Which internet source is saying the right thing or does multiprocessing can apply to one or more programs?

Edited by warnexus

Share this post


Link to post
Share on other sites
Advertisement

The definition from britannica.com seems bogus to me. In particular, it requires the parts of the code to be different. What if all the CPUs run the same part of the program?

 

In any case, unless you are writing an article for publication or something like that, I wouldn't worry about the precise definition: In context the meaning is usually clear.

Share this post


Link to post
Share on other sites

Multiprocessing is to processing as multiprocessor is to processor. I agree with Alvaro, the term is pretty broad so it should be clear from context what you're saying.

Share this post


Link to post
Share on other sites

In any case, unless you are writing an article for publication or something like that, I wouldn't worry about the precise definition: In context the meaning is usually clear.

 

There is another important word, "concurrent", that comes into play.

 

Consider things like threading. Does using threads mean multiprocessing?  

 

You can have multiple threads on a single-CPU device, it means the scheduler pauses one thread and resumes another. Nothing is concurrent. You can also have multiple threads on a multi-CPU device, it can mean (but doesn't guarantee) that threads are running concurrently on another processors.

 

 

The best example I remember from years ago was a shopping analogy. You can have lots of customers (=processes) waiting in lines behind lots of checkstands. You can have a single checker (=processor) that works at one checkstand for a few moments, then stops and moves to the next checkstand, then stops and moves to the next checkstand, cycling through them all. This means the customers with the least work get processed quickly and they don't need to wait behind the customers with a lot of work, so it feels faster. But it also means the customers requiring a lot of work take much more time, so it feels slower. According to the actual clock, it takes more time for the checker to accomplish all the work because of the time spent jumping from checkstand to checkstand. But if you can get additional checkers to the checkstands the work can be done more quickly. It feels faster because the customers with a small amount of work are addressed more frequently, and two workers are nearly as fast as one worker, but again the actual time being spent combined to accomplish all the work is roughly the same.

 

 

If you were writing a book, I would define 'multiprocessing' in terms of concurrency. Threading by itself, or breaking the work into multiple independently compatible pieces, is not multiprocessing. Threading can be useful to achieve multiprocessing, but is not the only way. Multiprocessing (again, in my book) would be anything where you are actually performing multiple independent computing tasks concurrently.

 

Further, there are many algorithms out there where you can exchange linear clock time with parallel space. That is, something takes one amount of time, you can sometimes split the work to achieve better results. For example, when searching you can break it up in to search zones. When sorting you can have everyone sort a portion, then work together to merge the results. Some tasks are easily done concurrently, other tasks cannot be done concurrently. The two most popular parallels are post-holes and babies. Many people can dig a construction site, only one person can dig a post hole; Many women can produce many babies, but each baby still stakes 9 months no matter how many women are assigned.

Edited by frob

Share this post


Link to post
Share on other sites

Multiprocessing is to processing as multiprocessor is to processor. I agree with Alvaro, the term is pretty broad so it should be clear from context what you're saying.

So the second and third sources are reliable?

Share this post


Link to post
Share on other sites


Multiprocessing (again, in my book) would be anything where you are actually performing multiple independent computing tasks concurrently.

 

As in executing different instructions of the same program or instructions from different programs at the same time?

Share this post


Link to post
Share on other sites

In any case, unless you are writing an article for publication or something like that, I wouldn't worry about the precise definition: In context the meaning is usually clear.

And if you are writing an article, define the terms you use yourself.

English is all in how you use it, with terminology invented by someone using it in a particular way. If two people use the same word to mean different things, that doesn't mean one of them is wrong, it means there word has two meanings. The important thing is to get your ideas across.

However I this case there might be something else confusing you: to run a single computation on a cluster requires each computer in the cluster to be running it's own program. The program's the same (usually) for each computer, but it has separate instances. However it's logically one task. This kind of cluster computer has been called multiprocessing, and would be the first kind of multiprocessing possible. Shared memory systems came later.

Share this post


Link to post
Share on other sites

 

Multiprocessing (again, in my book) would be anything where you are actually performing multiple independent computing tasks concurrently.

 
As in executing different instructions of the same program or instructions from different programs at the same time?

 

 
Either one or both, depending on the system you are talking about and how you defined the terms.
 
Just because an operating system takes advantage of multiple concurrent processors does not mean a specific application also uses concurrent processors.  The operating system might have four or six or eight processes running at the same time, but each of those programs might be written to only use a single processor.  Also if you are running programs across a network and two or ten or fifty computers all work on the problem together, that type of parallel processing might be considered multiprocessing by some definitions, it might not for other definitions.
 
When I look at your links, they clearly show that the terms are not fixed.  The articles refer to these differences while still trying to maintain an authoritative writing sytle: "sometimes used to refer to", "there are many others", providing definitions (1) and (2), and by listing differences in efforts by IBM, Microsoft and Apple. If there was only one single fixed definition they wouldn't need any of those things.

Living natural languages are just going to be that way. English does not have standardization committees where there is a single well-formed meaning where any non-conforming meaning is undefined. The meanings are whatever people say they are.

Share this post


Link to post
Share on other sites

Consider things like threading. Does using threads mean multiprocessing?

I'd say no. A "thread" is an abstraction layer above "multiprocessing", which is why we refer to it as being a threading model. Threads define sections of code that could be executed independently, that is, their execution order is allowed to be undefined, but it definitely does not imply multiprocessing.

 

As many have said, I would also define multiprocessing as performing independent computational tasks concurrently, and I'd define threads as an enforcement of rules upon sections of code allowing them to be executed independently, but not implying they will be - only that they can be.

Edited by TheComet

Share this post


Link to post
Share on other sites

This anecdotal information might shed light on things:

 

I wrote a an application that on Windows Vista ran multi threaded and was clearly using multiple processor cores on an i7 4 core machine. However running the same program on Windows NT and a multi processor, multi core Xeon machine, the same exact executable did not use multiple processors, neither mulitple cores and ran slower than on the single processor machine.

 

What gives?

Edited by jbadams
Restored post contents from history.

Share this post


Link to post
Share on other sites

I do not think that deifnition in britanica of word multiprocessing, as computing termine, is vague. There is a difference from multithreading and multiprocessing I believe. From OS definition, process is an object that encapsulates memory and CPU usage, memory between processes is exclusive. While on the other hand, process can hold a thread or more of them, having threads process shared memory by more cores if possible- multithreading. It is like for me that multithreading promisses a a paralel memory access over more cores in a single process,  while multiprocessing promisses parallel processing of processes.So if for example an OS that supports multithreading hold a multiprocessing CPU, it cannot create more than one thread for a process, but can distribute CPUs for those processes that can run parallel smoothly.

Share this post


Link to post
Share on other sites

This anecdotal information might shed light on things:

 

I wrote a an application that on Windows Vista ran multi threaded and was clearly using multiple processor cores on an i7 4 core machine. However running the same program on Windows NT and a multi processor, multi core Xeon machine, the same exact executable did not use multiple processors, neither mulitple cores and ran slower than on the single processor machine.

 

What gives?

 

spinningcube

Are you sure it was using multiple cores? Windows Vista will do better schedualing that often moves threads between cores, so a single theaded application will use multiple cores, but never two at once.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement