[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic Priority



Summary
~~~~~~~
I am not sure if the dust has yet settled, but perhaps there is some sort
of case for the following:-

1) SAT
~~~~~~

Vague as yet, but a way to qualify statements(processes?) taking a list of
predicates. Perhaps something along the lines

PAR SAT (DELAY(c) < clock(5))

where c is a CHANnel and clock is a TIMER: no event on channel c
will be delayed by more than 4 ticks of clock.

This seems a little futuristic, but we may be able to identify a small set
of predicates current compiler technology can handle. 

Eventually we need a sub-language to express these predicates. Rather than 
invent our own, can we use existing technology? 

Of course, the trouble with SAT is that we now need CAT and MAT :-)

2) URGENT events
~~~~~~~~~~~~~~~~

Until we have SAT, and maybe after, we allow CHANnels to be marked
URGENT. So things like

URGENT CHAN OF INT x:
URGENT [3]CHAN OF BYTE stepper_sensor:
PAR
  P0
  P1
  ...

where the URGENcy is syntactically ordered. And can be dynamically changed
as in 4) below.

Because the URGENT declarations above are "outside" the PAR, I wonder whether
the equivalent

PAR
  URGENT
    CHAN OF INT x:
    [3]CHAN OF BYTE stepper_sensor:
  P0
  P1
  ...
is not easier to read, and possibly easier for the compiler?
Not quite sure how to write an ordered array of channels...

4) Dynamic control of priority
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Allow both PRI PAR and PAR to accept an optional channel for priority
control.

PRI PAR(CHAN OF type dynamic_priority)

just shuffles the components around as previously discussed.

And 

PAR(CHAN OF type dynamic_priority)

similary shuffles any URGENT channels with respect to the syntactical order.

Oh dear: what about SAT? I suppose we could have a table of PREDicates,
and switch between them. Ho hum.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laws
~~~~
Perhaps 

PRI PAR                PAR SAT ( priority(P0)  > priority(P1) ) 
  P0              =      P0
  P1                     P1

and so on. So PRI PAR and URGENT would just be abbreviations for SAT
clauses. So we might be able to apply occam's razor there.

Adrian



-- 
A E Lawrence, MA., DPhil.  	adrian.lawrence@xxxxxxxxxxxxxx
MicroProcessor Unit, 13, Banbury Road, Oxford. OX2 6NN. UK.                
Voice: (+44)-1865-273274,  Fax: (+44)-1865-273275