LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Master/Slave vs Producer/Consumer?

Solved!
Go to solution

Hello,

 

Can any one of point out the Difference between Master/Slave vs Producer/Consumer?

 

Is producer consumer also a master slave?

 

Hemant

0 Kudos
Message 1 of 5
(6,446 Views)
Solution
Accepted by topic author LV_COder

Perhaps overly simplified, but:

 

Master/Slave: 1 master loop, N slave loops

Producer/Consumer: N producer sources, 1 consumer loop

 

Master/Slave is usually used for parallel operations to be executed in arbitrary order where Producer/Consumer is used when operations might be requested simultaneously but need to execute in a serial order.

 

You can see that they are equivalent if and only if N = 1.

0 Kudos
Message 2 of 5
(6,434 Views)

Producer consumer, means only one consumer? I am little confuse.

 

0 Kudos
Message 3 of 5
(6,422 Views)

Producer/Consumer - all elements are processed, therefore Queue

Master/Slave - only the latest command is processed, therefore Notifier

 

A Master/Slave is actually closer to a Queued Message Handler, but that is another thread...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(6,396 Views)