810 likes | 948 Vues
Concurrent Counting is harder than Queuing. Costas Busch Rensselaer Polytechnic Intitute Srikanta Tirthapura Iowa State University. Arbitrary graph. Distributed Counting. count. count. count. count. Some processors request a counter value. Distributed Counting. Final state.
E N D
Concurrent Counting is harder than Queuing Costas Busch Rensselaer Polytechnic Intitute Srikanta Tirthapura Iowa State University
Distributed Counting count count count count Some processors request a counter value
Distributed Counting Final state
Distributed Queuing Enq(B) Enq(A) A B Enq(C) C Enq(D) D Some processors perform enqueue operations
Distributed Queuing Previous=D Previous=nil A B Previous=A C D Previous=B A D B C Tail head
Applications Counting:- parallel scientific applications - load balancing (counting networks) Queuing:- distributed directories for mobile objects- distributed mutual exclusion
Ordered Multicast Multicast with the condition:all messages received at all nodes in the same order Either Queuing or Counting will do Which is more efficient?
Queuing vs Counting? • Total orders • Queuing = finding predecessor • Needs local knowledge • Counting = finding rank • Needs global knowledge
Problem • Is there a formal sense in which Counting is harder problem than Queuing? • Reductions don’t seem to help
Our Result • Concurrent Countingis harder thanConcurrent Queuing • on a variety of graphs including: • many common interconnection topologies • complete graph, • mesh • hypercube • perfect binary trees
Model • Synchronous system G=(V,E) - edges of unit delay • Congestion: Each node can process only one message in a single time step • Concurrent one-shot scenario: • a set R subset V of nodes issue queuing (or counting) operations at time zero • No more operations added later
Cost Model • : delay till v gets back queuing result • Cost of algorithm A on request set R is • Queuing Complexity = • Define Counting Complexity Similarly
Lower Bounds on Counting For arbitrary graphs: Counting Cost = For graphs with diameter : Counting Cost =
Theorem: For graphs with diameter : Counting Cost = Proof: Consider some arbitrary algorithm for counting
Graph Take shortest path of length
Graph 6 2 7 1 5 3 8 4 make these nodes to count
Node of count decides after at least time steps k Needs to be aware of other processors k-1
Counting Cost: End of Proof
Theorem: For arbitrary graphs: Counting Cost = Proof: Consider some arbitrary algorithm for counting
Prove it for a complete graph with nodes: any algorithm on any graph with nodes can be simulated on the complete graph
The initial state affects the outcome Red: count Blue: don’t count Initial State
Red: count Blue: don’t count 1 Final state 3 2 4 5
Red: count Blue: don’t count Initial state
Red: count Blue: don’t count 2 Final state 3 5 4 1 8 7 6
Let be the set of nodes whose input may affect the decision of
Suppose that there is an initial state for which decides Then:
If , then would decide less than Thus,
Suppose that decides at time We show: times
Cost of node : If nodes wish to count: Counting Cost =
Nodes that affect up to time Nodes that affects up to time
Eligible to send message at time There is an initial state such that that sends a message to
Eligible to send message at time Suppose that Then, there is an initial state such that both send message to
Eligible to send message at time However, can receive one message at a time
Eligible to send message at time Therefore:
Thus: We can also show: Which give: times End of Proof
Upper Bound on Queuing For graphs with spanning trees of constant degree: Queuing Cost = For graphs whose spanning trees are lists or perfect binary trees: Queuing Cost =
Distributed Queue A Previous = Nil Tail A Tail Head
B enq(B) Previous = ? A Previous = Nil Tail A Tail Head
B Previous = ? enq(B) A Previous = Nil Tail A Tail Head
B Previous = ? enq(B) A Previous = Nil Tail A Tail Head