distributed execution
play

Distributed Execution William Cook and Jayadev Misra f cook,misra g - PowerPoint PPT Presentation

D EPARTMENT OF C OMPUTER S CIENCES Distributed Execution William Cook and Jayadev Misra f cook,misra g @cs.utexas.edu Department of Computer Science University of Texas at Austin Email: web: http://www.cs.utexas.edu/users/psp U NIVERSITY OF T


  1. D EPARTMENT OF C OMPUTER S CIENCES Distributed Execution William Cook and Jayadev Misra f cook,misra g @cs.utexas.edu Department of Computer Science University of Texas at Austin Email: web: http://www.cs.utexas.edu/users/psp U NIVERSITY OF T EXAS AT A USTIN 0

  2. D EPARTMENT OF C OMPUTER S CIENCES Centralized Execution Model � semantics (and execution) described for one machine. � Then, � We develop a theory to permit distributed execution. – immediate sites respond instantaneously. – Rtimer is exact. U NIVERSITY OF T EXAS AT A USTIN 1

  3. D EPARTMENT OF C OMPUTER S CIENCES � Assign subexpressions to different machines. Distributed Execution Model � Execution starts on a goal machine. � A machine requests another machine to start evaluation. � The calling machine supplies the context and values of variables as � The calling machine orders all tokens to be killed, and asks for ack. � All messages among these machines are delivered after arbitrary but they become defined. finite delay. U NIVERSITY OF T EXAS AT A USTIN 2

  4. D EPARTMENT OF C OMPUTER S CIENCES � R timer (1) � l et (0) j R timer (2) � l et (1) When can we distribute? � P ( ; e ) � :g et > x > Compute ( x ) > y > e:put ( y ) � P ( ; e ) N � P ( ; e ) j P ( d; e ) Neither branch can be executed on another machine. :g et and e:put are on different machines. P ( ; e ) and P ( d; e ) can be evaluated on different machines. � R timer (1) � M j R timer (2) � N The two branches can be executed on different machines. The theory identifies subexpressions which can be distributed. U NIVERSITY OF T EXAS AT A USTIN 3

  5. D EPARTMENT OF C OMPUTER S CIENCES Distributed Execution has to be faithful � A distributed execution is valid if it mimics a centralized execution. � The sites can not distinguish between the two execution styles. U NIVERSITY OF T EXAS AT A USTIN 4

  6. D EPARTMENT OF C OMPUTER S CIENCES An example � Site k ey boar d responds at arbitrary times, or never. � Site s r een responds immediately and displays a message. � � � k ey boar d � s r een � � � Its response is received immediately. can not be distributed. Video-game: A human responds sometime on the keyboard. Expects to see an echo immediately. U NIVERSITY OF T EXAS AT A USTIN 5

  7. D EPARTMENT OF C OMPUTER S CIENCES � A site is punctual if communication delay with it is zero. Punctual Site � A site is unpunctual if communication delay with it is arbitrary. � Simplification: Assume all sites are either punctual or unpunctual. � A punctual site has to be implemented on the caller’s machine. � An unpunctual site may be implemented on a remote machine. R timer , l et , if , � � � , all immediate sites, � � � , k ey boar d , s r een 0 , CNN , PostWeb , � � � M Punctual: Unpunctual: Generic symbol U NIVERSITY OF T EXAS AT A USTIN 6

  8. D EPARTMENT OF C OMPUTER S CIENCES Punctual Expression � Any delay in starting it or processing its response can be detected. � Some timing information for site calls or publications is known. � A punctual expression has to be implemented on the caller’s machine. � An unpunctual expression may be implemented on another machine. � A punctual expression may have unpunctual subexpressions. The subexpression may be implemented on another machine. U NIVERSITY OF T EXAS AT A USTIN 7

  9. D EPARTMENT OF C OMPUTER S CIENCES Definition of Punctual Expression � S ( x ) : S is punctual, A punctual expression is of the form � f j g : either f or g is punctual, � f > x > g : both f and g are punctual, � f where x : 2 g : both f and g are punctual, or f n x is punctual. f n x from f : x by 0 . Obtain Replace all site calls which have parameter U NIVERSITY OF T EXAS AT A USTIN 8

  10. D EPARTMENT OF C OMPUTER S CIENCES Examples: Punctual Expressions l et ( x ) l et is punctual (immediate) l et ( x ) > x > R timer ( x ) R timer (1) where x : 2 g f n x = R timer (1) is punctual l et ( x ) where x : 2 R timer (1) l et ( x ) and R timer (1) are both punctual both sites are punctual R timer (1) j h where x : 2 g f n x = R timer (1) j h n x is punctual l et ( x ) > x > R timer (1) l et ( x ) > x > R timer (1) and R timer (1) where x : 2 R timer (1) are both punctual U NIVERSITY OF T EXAS AT A USTIN 9

  11. D EPARTMENT OF C OMPUTER S CIENCES M � R timer (1) Examples: Unpunctual Expressions R timer (1) � M N ( x ) > x > R timer ( x ) R timer ( x ) where x : 2 M N ( x ) where x : 2 R timer (1) l et ( x ) where x : 2 M U NIVERSITY OF T EXAS AT A USTIN 10

  12. D EPARTMENT OF C OMPUTER S CIENCES k ey boar d � s r een j JoySti k � ( M j N ) , where punctual within unpunctual, and vice versa k ey boar d , s r een , JoySti k are punctual M and N are unpunctual. k ey boar d � s r een j JoySti k � ( M j N ) | {z } | {z } | {z } pun tual pun tual unpun tual | {z } unpun tual | {z } pun tual U NIVERSITY OF T EXAS AT A USTIN 11

  13. D EPARTMENT OF C OMPUTER S CIENCES k ey boar d � s r een j JoySti k � ( M j N ) Example: Distributed Execution | {z } | {z } pun tual unpun tual � k ey boar d � s r een j f f � JoySti k � ( M j N ) | {z } unpun tual � k ey boar d � s r een j f f � JoySti k � g g � M j N U NIVERSITY OF T EXAS AT A USTIN 12

  14. D EPARTMENT OF C OMPUTER S CIENCES � If all sites in an expression are punctual, the expression is punctual. Some properties � If all sites in an expression are unpunctual, the expression is � Monotonicity: An unpunctual expression remains unpunctual if you unpunctual. M punctual, f ( M ) unpunctual, N unpunctual ) f ( N ) unpunctual. replace any site by an unpunctual site. M v N ) f ( M ) v f ( N ) , < unpunctual where punctual Proofs by structural induction. U NIVERSITY OF T EXAS AT A USTIN 13

  15. D EPARTMENT OF C OMPUTER S CIENCES � l et ( true ) > b > ( if ( b ) � g � g Punctuality is conservative j if ( : b ) � R timer (1) ) � R andom > x > R timer ( x ) R andom publishes a random natural number within some bounds. Though the execution can be distributed, the expression is punctual. � Nat > x > R timer ( x ) N at publishes any natural number. The expression is punctual, and it can not be distributed. Though the execution can be distributed, the expression is punctual. U NIVERSITY OF T EXAS AT A USTIN 14

  16. D EPARTMENT OF C OMPUTER S CIENCES M etr onome � S ig nal j R timer (1) � M etr onome , i.e. Recursively defined Expressions Metr onome � if ( true ) j R timer (1) � Metr onome S ig nal is punctual, so the rhs is punctual. Metr onome is punctual. Met � S ig nal j M � Met | {z } unpun tual Met is punctual. Its subexpression M � Met may be distributed. S ig nal j M � Met � S ig nal j f f � M � Met U NIVERSITY OF T EXAS AT A USTIN 15

  17. D EPARTMENT OF C OMPUTER S CIENCES f � M j R timer (1) � f Least fixed point f punctual. f � M j R timer (1) � f |{z} |{z} | {z } unpun tual pun tual pun tual | {z } pun tual | {z } Assume pun tual f unpunctual. j f � M R timer (1) � f |{z} |{z} | {z } unpun tual pun tual pun tual | {z } unpun tual | {z } Assume unpun tual f is punctual. punctual < unpunctual. The least fixed point is U NIVERSITY OF T EXAS AT A USTIN 16

  18. D EPARTMENT OF C OMPUTER S CIENCES f . Existence of least fixed point f is punctual. � definition of f is punctual: f is punctual. Least fixed point exists for any defined expression Assume � definition of f is unpunctual: f is unpunctual. f unpunctual, definition of f is unpunctual. Monotonicity: assuming U NIVERSITY OF T EXAS AT A USTIN 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend