Gil -

Thanks.

> It's not clear what your objective is -- apparentlly you have some
recurrent event and an 
> indeterminate number of tasks each of which must execute exactly once for
each occurrence of that event

I have z/OS tasks of all stripes driving a z/OS system exit. I have a finite
supply of a resource that each task needs in the exit. Sometimes the
resources are exhausted and will not be replenished for a while. What if we
come through the exit and are out of the resources? It would be nice if all
of the tasks in such a situation could wait until the resource was
replenished, without each task having to do a GETMAIN or CPOOL GET, chaining
it to the previous (not a trivial thing in a totally asynchronous multi-CPU
situation), WAITing, and then unchaining the block and freeing it. It might
be nice if there were a single control block on which all of the tasks could
(effectively) "wait."

I think it ain't gonna happen. I hear the ENQ solutions -- and yes, I asked
for possibly an ENQ solution -- but I think the complexity exceeds the
benefit at this point.

I do have a design alternative to "waiting." The finite resource is a CPOOL
in CSA. An alternative is to let it expand.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf
Of Paul Gilmartin
Sent: Sunday, May 06, 2012 2:04 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Multiple waiting tasks, one control block?

On Sun, 6 May 2012 09:27:22 -0700, Charles Mills wrote:
>
>I am kicking the ENQ idea around. ENQ is certainly promising. There are 
>some interlock issues with re-establishing the exclusive ENQ after 
>relinquishing it, and what do the intended waiting tasks do in the 
>meantime, but it has promise.
> 
Two tasks, A and B alternately ENQing EXC.  (Synchronize with WAIT/POST.  B
issues ENQ EXC, then A DEQs.  All tasks with ENQ SHR are now free to run.
There will always be at least one, sometimes two ENQ EXC outstanding.

It's not clear what your objective is -- apparentlly you have some recurrent
event and an indeterminate number of tasks each of which must execute
exactly once for each occurrence of that event

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to