home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / isis / 354 < prev    next >
Encoding:
Text File  |  1993-01-03  |  11.6 KB  |  225 lines

  1. Newsgroups: comp.sys.isis
  2. Path: sparky!uunet!wupost!micro-heart-of-gold.mit.edu!uw-beaver!cornell!ken
  3. From: ken@cs.cornell.edu (Ken Birman)
  4. Subject: Re: More about Causality
  5. Message-ID: <1993Jan3.161232.14265@cs.cornell.edu>
  6. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  7. References: <1992Dec27.124442.18404@dec8.ncku.edu.tw>
  8. Date: Sun, 3 Jan 1993 16:12:32 GMT
  9. Lines: 214
  10.  
  11. Warning: this discussion is rated PG-13... (for non-US readers, this
  12. is a reference to the US film rating system... "mature readers only")
  13.  
  14. What follows is a highly technical discussion of Isis internals.
  15. Many Isis uses employ the "news" system and for them, all of this is
  16. automatic and not an issue.  Even those users who do use the toolkit
  17. directly don't "need" to know about this very detailed layer of the
  18. system to make effective use of the system...
  19.  
  20. In article <1992Dec27.124442.18404@dec8.ncku.edu.tw> jsw@eembox.ncku.edu.tw (Master Jyh-Shi Wu (82.9)) writes:
  21. >   1) As I know, isis v2.1 multicast ordering is arranged in the unit of UNIX
  22. >      processes (i.e. heavyweight), Is lightweight mulitcast ordering (i.e.
  23. >      in the unit of "tasks") implemented in v2.2.7 ?
  24.  
  25. This question is one we often get from people with a SmallTalk or Lisp
  26. background, where a "task" is a very costly thing and where multitasking
  27. is used the way that UNIX uses processes.
  28.  
  29. In Isis, we assume that tasks are very cheap and very common.  For this
  30. reason, there is little benefit to ordering at the level of tasks and
  31. we don't plan to introduce task-level ordering at any point in the future.
  32.  
  33. This can be awkward because on languages like Smalltalk and Lisp, it makes
  34. the MSG_ENQUEUE/msg_rcv mechanism much more cost-effective than the
  35. normal isis_entry scheme for receiving messages -- and, as you probably
  36. realize, msg_rcv can "lose" ordering that your application normally
  37. would benefit from having.  
  38.  
  39. In C++ or C or other languages where tasks are cheap, one logical activity
  40. can have many tasks associated with it, and it makes more sense to order
  41. at the process level and assume that since processes can share memory
  42. under UNIX, a process is the "level of encapsulation" at which ordering
  43. makes sense.
  44.  
  45. For the future, we do plan to move to a port-oriented ordering model, though.
  46. In this, each process will own one or more ports and ordering will be done
  47. at the level of ports, not processes (actually, causal domains, with each
  48. port belonging to exactly one domain).  When we do this in the "Horus" system,
  49. you could have a lightweight form of ordering within a single address space.
  50.  
  51. The Horus papers are included in the Isis publications list.  Email to
  52. reen@cs.cornell.edu for a copy.  I'll ask her to post a recent copy to this
  53. group.  Look for papers with Robbert van Renesse as a co-author: he is the
  54. main architect of Horus (along with me, Brad Glade, Mike Reiter, Robert
  55. Cooper and Aleta Ricciardi).
  56.  
  57. >   2) There are still little documents in bypass modes of isis [a|g|c]bcast(
  58. >      "B",...) . It's very glad to know that causal abcast is implemented
  59. >      in bypass mode. But, what's the difference in the bypass mode of 
  60. >      abcast, cbcast and gbcast? 
  61. >      what's the essence of "bypass mode" (more than speedup in delivery,
  62. >      what I concerned is ordering)
  63.  
  64. I think you may have missed the ACM TOCS paper -- August 1991.  This is
  65. the main reference and the best place to get answers to your technical
  66. questions.
  67.  
  68. Briefly: there is a bypass abcast and cbcast, but gbcast is still done
  69. via "protos".  The essense of the protocol is covered in the paper.  The
  70. concept is discussed in the current version of the manual (V3.0.5 or 6 or 7)
  71. in a chapter discussing the overall architecture of Isis.
  72.  
  73. For new readers, "bypass" communication occurs when Isis can send messages
  74. directly to their destinations, rather than indirectly through the "protos"
  75. server.  This gives a 10-fold performance improvement for many applications.
  76. To get bypass communication, you need to know that the sender and destinations
  77. are related in one of a small set of ways, e.g. both member of the same group,
  78. one is member of a group and the other has used pg_client on that group, etc.
  79. Isis will use bypass communication if it can, and if not sends the message
  80. down to the protos server, via RPC, which delivers the message up to the
  81. right destinations, also via RPC.
  82.  
  83. The protos server uses a decentralized protocol discussed in an ACM TOCS
  84. paper in 1987.  The direct communication uses this other, more recent, set
  85. of protocols.
  86.  
  87. The abcast protocols are sort of incompatible: if you use abcast in bypass mode,
  88. it is totally ordered relative to other bypass-mode abcasts, but not to other
  89. non-bypass abcasts, and vice versa.  Cbcast, however, is ordered no matter
  90. how you send it, so this is only a concern for abcast.  You can force abcast
  91. to go via a non-bypass route using "X" as an option in the long-form.
  92.  
  93. >      if the bypass mode of abcast is done by cbcasts, then, is "bypassed
  94. >      abcast" can show causality when used in conjugated with cbcasts?
  95.  
  96. Yes, if all the abcasts are done in bypass mode.  No, if there is a mix of
  97. bypass and non-bypass abcasts.
  98.  
  99. >      If abcast & gbcast are causal within a group, what's the difference
  100. >      in abcast and "bypass abcast" when used within a group?, and bypass
  101. >      cbcast & ordinary cbcast, gbcast...?
  102.  
  103. I think I covered this above -- hope so, at least.  The only ordering issue
  104. is that bypass and non-bypass abcasts are unordered w.r.t. each other.
  105. All other Isis ordering properties apply for abcast, cbcast and gbcast
  106. regardless of whether things go via bypass mode or not.
  107.  
  108. We would prefer not to have two flavors of abcast, and in HORUS this will
  109. go away and we will only have the bypass flavor.  For now, though, we
  110. made this compromise to maximize performance.
  111.  
  112. >      I think, when specifying "Bypass" mode in [a|c|g]bcast(), isis would
  113. >      perform bypass mode if situations allows that ( example: multicast
  114. >      within a group), if don't specify bypass mode, isis would "sure to"
  115. >      use the old protocol. Is there any possibility that isis "automatically"
  116. >      turns to bypass mode when user don't specify that?
  117.  
  118. Isis automatically turns to bypass mode if it can find any possible way to
  119. do it, but it won't automatically join you to a group or make you a client
  120. of a group.  Using "B" and "X" you can be sure that you will at least get
  121. warned if a surprise occurs but the actual algorithm is based on looking
  122. at the destination of the message.
  123.  
  124. >
  125. >   3) A causality case:
  126. >      consider 3 proesses (p1, p2, p3), first, p1 send msg A to p2, then
  127. >      send msg B to p3 after A is sent, and, after p2 receives A, p2 send
  128. >      msg C to p3. All three processes start from initial state (i.e. start
  129. >      from vector time [0,0,0])
  130. >
  131. >      obviously C and B would be delayed in cbcast queue of p3, but, what would
  132. >      be the correct sequence if they are finally delivered?
  133.  
  134. I think you are slightly confused about how the scheme works.  For
  135. point-to-point messages (in your example, all of the message are point
  136. to point), we use an RPC and don't increment the counter at all.  So,
  137. in your scenario, the VT remains at 0,0,0 in all processes.  Secondly,
  138. in your example, message B and C are sent concurrently.  So, there is
  139. no ordering constraint on cbcast and no guarantee of what order the
  140. messages will be seen in.
  141.  
  142. Causal ordering matters when some form of "cycle" causes a message to
  143. get back to a destination of a prior message, or when multicasts are
  144. used -- say, if A,B and C were multicasts to the group of {p1,p2,p3} and
  145. your example looked at reception of A, B and C in p3.  Then, VT's would
  146. change value ([1,0,0] for A; [2,0,0] for B; [1,1,0] for C) and hence
  147. we would know that B and C are delivered after A at process p3.  We
  148. would still not be guaranteed any particular order between B and C,
  149. unless of course C had been received by p1 before it sent B, or B had
  150. been received by p2 before it sent C.  Then, there would be a causal
  151. order between A,B and C and this would determine the order seen by p3.
  152.  
  153. I hope this is clear... (personally, I find these examples with lots
  154. of letters and numbers confusing.  A picture helps a lot).
  155.  
  156. >
  157. >      if, considering "causality" as the extension of FIFO, B should be
  158. >      delivered before C. (just consider "p1 and p3" pair) 
  159. >      if, comparing the vector timestamp of B & C by cbcast protocol, B
  160. >      should precede C too.
  161.  
  162. No.  B and C are sent by different processes "concurrenty".  There is
  163. no reason that ordering should be constrained in this example.
  164.  
  165. >
  166. >      But, if we check the "happened before" chain, we would see A -> B
  167. >      and A -> C, then, a question arises: it's hard to decide the "happ-
  168. >      ened before" relation between B and C, then, how can we say B should
  169. >      be delivered before C? what's the correct answer of the causal delivery
  170. >      of B & C?  
  171.  
  172. Right, because they are concurrent!  The problem is that you used time
  173. in your example "then p1 sends B, and then p2 sends C" but this use of
  174. time was not a meaningful one, since it seems to presume that the schedulers
  175. that decide when p1 will run and when p2 will run are somehow coordinated
  176. over multiple machines in the network.
  177.  
  178. Say that p1 spends a few seconds thinking before it sends B.  Meanwhile,
  179. C could easily be sent by p2.  This illustrates how a scheduler could
  180. change the ordering very easily, just by delaying one process a little
  181. in a perfectly plausible way.
  182.  
  183. Leslie Lamport wrote extensively on time and its meaning in distributed
  184. systems -- see any of my papers for references.  The two papers appeared
  185. in CACM in 1978 and, I think, 1981.  Lamport (and Isis) use the happens
  186. before relation to define ordering -- not any sort of intuitive notion
  187. based on realtime.  As your example makes clear, realtime can be confusing
  188. and can lead to conclusions that look plausible but have subtle hidden
  189. issues.  In Isis, it is best to say "X happens, then Y" if you mean that
  190. Y could have learned that X happened because X happened in the same process
  191. as Y, and happened first, or there is some chain of messages between
  192. when X occurs and when Y occurs.  In your example, there is no chain of
  193. this sort that relates B and C -- unless you make them multicasts in
  194. a group, and one is sent, say C, only after the other, B, was received by 
  195. process that will send C.  That makes a chain from A -> B and from B -> C,
  196. and only then would some third party be sure to see A, B and then C in that
  197. order.
  198.  
  199. >
  200. >Next time I would ask some technical , programming questions. If there's any
  201. >programming template of spooling (as checkpoints) please post it (that may
  202. >reduce my qty of problems in next posting) Thanks!
  203. >
  204.  
  205. I think you should definitely have a look at those ACM TOCS papers,
  206. but at this level of a system like Isis, things do get pretty complex.
  207. Fortunately, not many users are aware of these issues, because the
  208. toolkit as a whole, and systems like News, hide them from the
  209. programmer.
  210.  
  211. There is also a paper I wrote with Barry Gleeson and Robert Cooper, available
  212. as a technical report from Cornell, which you might find interesting (the
  213. one on "Process Group Semantics")
  214.  
  215. As for spooling and checkpoints: the only documentation is the chapter
  216. in the manual.  Tim Clark is our expert on the spooler (tclark@cs.cornell.edu)
  217. and as noted in a different posting, has just done some work on it
  218. to enhance performance.  I am sure he would be happy to answer questions
  219. about checkpointing, but only when he returns from vacation on January 15.
  220. Meanwhile, I can answer simple questions...  
  221. -- 
  222. Kenneth P. Birman                              E-mail:  ken@cs.cornell.edu
  223. 4105 Upson Hall, Dept. of Computer Science     TEL:     607 255-9199 (office)
  224. Cornell University Ithaca, NY 14853 (USA)      FAX:     607 255-4428
  225.