• No se han encontrado resultados

Análisis de los argumentos psicológicos

CONCLUSIONES Y DISCUSIÓN

A. Análisis de los argumentos psicológicos

actor root actor WRITE node actor a l l other node actors

i n t r i n s i c p r l o r I t y

“ "ultra"

1.0 top ( i s e x p l i c i t l y set by c re a to r) 0.0 zero (d e f a u l t , meaning ¡ » N 'T EXECUTE) The actor's actual priority fluctuates with its message passing state, in detail:

a c t u a l _ p r i o r i t y ; *

IF x r e q u e s t <> READY THEM u l t r a - p r i o r i t y

ELSE IF ( some a c t o r s a r e hung t r y i n g to send

t o t h i s one, o r to r e c e i v e f ro m i t )

THEM ( sum o f t h e i r s h s rsd o u t a c t u a l p r i o r i t i e s ) ELSE i n t r i n s i c - p r i o r i t y ;

The scheduler has (at least) t w o queues fo r actors: the ultra quaua of actors with

ultra priority and the normal quauo for all remaining actors with actual priority not zero. Actors in the normal queue are executed only if the ultra queue is empty.

" F i r s t c o r n s f i r s t s s r v s " and "round robin" apply inside each queue Actors in the ultra queue are executed to exhaustion, i.e. control is taken from them only as late as possible. If not in ultra priority, an actor is treated as normal. The normal actors ■hare the computing resources (mainly: the t i m s spent in execution) in proportion to

IV . 80 their a ctu a l priority** An actor is suspended from execution while hung waiting for message passing, of course.

By "sharing out" we mean: if an actor is hung trying to [SEND! to, or to I RECEIVE! from, a set of actors, it shares its own actual priority out in equal parts among the actors it wants to communicate with. However, I ultra! divided b y any number is still

lultral, and I ultra! plus anything is lultral.

When determining the actual priority of node actor Z we may have to form the

sum of some shared out priorities. In this sum, we must exclude any contribution

which is due to Z its *If (indirectly). — Such a "priority sum" needs to be formed only if Z is a IcopyI node actor: without this exclusion rule, cycles could "hype up” their own priority. The scheduler should even issue a ¡NULLIFY! request to the ¡COFYI inport actor whenever the actual priority of the I COPY] falls to zero. The scheduler introduces thus a measure of global control, which would be impossible to achieve by the request protocol alone (we will touch a similar point at the end of 6.3)

Equivalent to the if—then-else rule above, an actor’s actual priority can be calculated as the maximum of:

(1) Its intrinsic priority,

(2) |ultra! priority while its ¡«request! <> 3EADY1.

(3) the sum of the sharsd out actual priorities of all actors which are currently hung up watting for communication with the actor in question ( iSENDl to it or [RECEIVa!: from it).

The following can be deduced from the scheduling rule

— The actual priority of a 'C03V' inport actor is the sum of the actual priorities of its waiting outports (though not forgetting the exclusion rule)

— An inferior will not be executed unless its superior gets hung up.

IV»B1

4.7.3 Discussion of Scheduling Rule

The scheduling rule contains nothing to prevent an actor from live lock in g (t 2 8). A livelocking actor with Iultra! priority would be total disaster since it would never surrender its execution right. Our design of the individual acts, however, makes sure that only/tntts computations are e v er undertaken in ¡ultra! priority. The I ultra! priority has actually been invented exclusively for urgent administration and for nullification of unwanted evaluations.

Also by design, there are very few instances where an actor has more than one actor trying to communicate with it (semaphores, and arrival of concurrently evaluated datons are obvious instances). The FCFS strategy and, if necessary, random sequence are sufficient to ensure correct behaviour. (Easy evaluations will usually succeed before elaborate ones, this is important for concurrent [o§j etc. Our scheduling rule executes concurrent operations in the "breadth f i r s t " strategy.)

The design of the UDF actors is particularly tuned for this priority mechanism. UDF actors have an intrinsic priority of zero, and this makes sure that execution of the l!DF pauses before the subnet creation (= expansion) The expansion is carried out once the L'DF gets its first request; this is l a t y expansion. In effect, the subnet actors are created as late as possible. Initial |ADVANCE! or i ADVANCE! i nalindexi requests needed special treatment; this ensures that only short administration is ever undertaken in ¡ultra! priority (but not proper computation, or even subnet creation).

Our scheduling rule is open to much criticism For example, we assumed that the subcomputations of one computation are equivalent, which can be easily disproved by counter examples However, our rule is reasonable and cheap Indeed,

a better rule can not be provided if nothing is known about internals of the actors (e g. if it unknown how important a particular computation is). — We have already

stated that the priority concept provides only an Incomplete answer for multiprocessor implementations

I V - 82