computer science - Searching for a distributed algorithm to distribute some objects -
i'm searching algorithm solve following problem:
there n
software components able communicate on multicast. there pool m
objects. every sw component knows pool contains. objects have different values. depending on value want distribute objects sw components. means: objects greater value have preferred, objects lower value have neglected (for example when sw components can't take more objects).
it important, no object distributed more once. when 1 object assigned sw component must not assigned sw component.
furthermore want implement whole thing distributed algorithm, means without central unit executes distribution.
any ideas?
- one solution implement mutual exclusion algorithm (a simple 1 bakery algorithm) , each sw takes highest object when it's turn comes. (this mutual exclusion writing files)
- another 1 involve lot of communication between nodes. let's suppose general case n>=m. suppose each sw takes n/m components takes highest value , multicasts rest of x components x sw , additional value max of components *casted. receiving sw see if value bigger received , exchange , delete value list insert it;s old value. cast components max calculated same x sw components. idea set x of sw communicate each other until every node has different value. have few of x sets. of course algorithm must refined every sw has different value , prove happed can sure.
but wanted , idea gave 2. hope helps. implementation of algorithm in openmpi (with c or c++). @ least implemented distributed algorithms in openmpi (and lam mpi it's obsolete).
Comments
Post a Comment