> Must it be so complicated? I hope that something sensible will be
> possible with rules that are simple and easy to understand...

:-) sorry for posting the suggestion before reducing it to its full
simplicity. But as I mentioned, the implementation (or semantic
rules) should be a lot simpler than the textual description, which
included motivation and justification. Let's see:

1. A thread is either resource-aware or abstracts away the details
    and difficulties of resource management.
2. If resource availablity is high, both kinds of threads can allocate
    (in case of memory: implicitly, as usual in functional programs).
3. If resource availability is low,
    - resource-aware threads receive an asynchronous exception, 
       but may then proceed to allocate as before 
       (until the resource is actually exhausted)
    - resource-unaware threads block on allocation attempts

That's it! Not that complicated, is it? Now, whether this is 
something sensible, that's another question..

Claus

PS The rationale can be simplified, too:
    - resource-unaware threads use simplified code, assuming
       infinite resources, so they don't know what to do near
       resource limits. 
        ==> get them out of harm's way
   - resource-aware threads use simplified code, too, but they
      know how to handle resource shortages, via exception
      handlers. 
        ==> warn them at the soft limit, but let them proceed
   - resource-aware threads may be able to get the system 
      out of the critical state, so resource-unaware threads
      need not be terminated. 
        ==> block them until everything is back to normal



Reply via email to