On Mon, 21 Jan 2008 13:56:37 -0500, Craddock, Chris wrote:

>> But, and this is what was so hard for me to get.  Mother can pass
>> Daughter an ECB for the Daughter task to use.  Daughter does some
>stuff
>> and then WAITs.  Mother goes about her business until she needs
>Daughter
>> do so something.  <this is still fuzzy> Mother clears the ECB and
>POSTs
>> it freeing Daughter from her slumber. "Get to work, you."  Daughter
>does
>> her thing and then WAITs for further instruction.
>
>NO!!!! Mother does not clear the ECB. Mother just issues POST against
>the ECB and the system does the rest. Clearing the ECB would cause the
>POST to fail.
>
One little glitch remains.  The mother needs to know when the daugnter
is ready to accept more work.  Either of the following works:

o The daughter can simply clear the ECB to zeroes and the mother
  can use this as an indication that the daughter is ready to be
  POSTed.  But in some cases, the mother might end up spinning
  until the daughter clears the second ECB.  So, better:

o Introduce a second ECB.  When the daughter has accepted the
  work item or is ready for more work, it clears the first ECB,
  POSTs the second, and WAITs on the first.  When the mother
  needs the daughter's assistance, it WAITs on the second ECB,
  clears it, and POSTS the first.  If there's a communication
  area, neither task should POST until it has completed reading
  or updating that communication area; effectively POSTing
  transfers ownership of the communication area (and the POSTed
  ECB) to the other task.  The mother must clear both ECBs before
  ATTACH.  The daughter must POST the second ECB as part of
  initialization after it has been ATTACHed.

  This is the reason that "a pair of ECBs" has been mentioned
  earlier in this thread.  (I believe I'm "close as in horseshoes"
  here.)

>> ECB's are used all over the place it seems, and are not just a control
>> block used with ATTACH.  I missed that, hence my confusion.
>> Am I even close?  This kept me up till 4:30 this morning.
>
>As in horshoes? Yes. The ECB is one of the most widely used "tools" in
>the system. As a serialization primitive it is just awful, but there's
>no getting away from it now.
>
>CC
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
>Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to