You are on page 1of 26

Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

Paulo Moiss Vidica Gina Maira Barbosa de Oliveira


Universidade Federal de Uberlndia

Cellular Automata (CA)


Cellular Automata are discrete dynamic systems formed by simple and identical components (called cells) with local connectivity. The simplest CA is the one-dimensional binary formed by a line of cells (the lattice) where each cell can assume states 0 or 1. A cellular automaton is characterized by a transition rule, that determines which will be the next state of the lattice, from the current state of the CA. For each cell i, a neighborhood of radius r is defined.

Cellular Automata (CA)


Transition Rule:

Space-time diagram

Areas of Research

CA Dynamics Modeling Computation Artificial Life This work

Dynamic behavior

Ability: capacity to perform computations.

Computation in CAs

Parallel Structures (cells) with an extremely simple logic: an option for decentralized architectures of computers Understanding of how computations are performed is still vague. Approaches for make feasible its programming are being studied. A successful approach: use of Genetic Algorithms (GAs) on search of CAs with a desired computational ability. Example of computational tasks: Task of Density Classification Synchronization Task Cryptography Scheduling

Multiprocessor Scheduling
Architecture: 2 processors (P0 and P1) Parallel program: program graph. Ex.: Gauss18

Multiprocessor Scheduling
Scheduling: distribute the tasks among the processors in a such way that the precedence constraints are preserved and the total execution time (T) is minimized.

T = f(allocation, scheduling policy) Attributes of each task k (static or dynamic):


Level: the longest path from a node k to an exit node Co-level: the longest path from the starting node to node k Scheduling policy: the task with the highest dynamic level is performed first

CA-Based Scheduling
- Lattice: cell associated with each task - Configuration: allocation of tasks in P0 and P1
1 t=0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

1 : :

Aplly rule
1
10

0 t = 50
0

1
1

0
2

0
3

0
4

1
5

0
6

1
7

0
8

0
9

0
11

1
12

0
13

0
14

0
15

0
16

0
17

Problem: to find a CA rule able to converge, after some time steps


(temporal evolution), to an allocation of tasks which minimizes T starting from any initial allocation (Tmin)

CA Neighborhood Model
(Seredinsky, 2001)
- Neighborhoods studied in the literature: linear (standard CA) and nonlinear (Selected and Full with Totalistic Rules). - Nonlinear models: successors, predecessors and brothers - Example: Task 8 of Gauss18 Predecessors(8)={3,6} Successors(8)={11,12} Brothers(8)={7,9,10,11}

Selected Neighborhood
qk q Pk qBk qSk Neighborhood: (qk,qPk,qBk,qSk) current state of cell k state associated with the predecessors of k state associated with the brothers of k state associated with the successors of k

For each set (P, B e S) is associated an attribute of graph. The attributes selected for each set may be different. Attribute used for P, B and S: dynamic level. Only two representative tasks are selected of each set: maximal (max_v) and minimal (min_v) value for the chosen attribute. Irregular structure of program graph: If P (B or S) do not exist for a given task then max_v = min_v = special value.

Selected Neighborhood
If only one P (B or S) exists for a given task Then max_v = min_v = state of cell corresponding to the existing task.

If the number of P (B or S) is greater than 2 and all of them have the same value of an attribute then max_v = state of cell with smallest order number and min_v = state of cell with the largest order number.
The value of qPk (similar to qBk e qSk) is defined as: 0, if max_v = min_v = 0 (both tasks are in the processor P0) 1, if max_v = 0 and min_v = 1 (the first is in the processor P0 and the second is in the processor P1) 2, if max_v = 1 and min_v = 0 (the first is in the processor P1 and the second is in the processor P0) 3, if max_v = min_v = 1 (both tasks are in the processor P1) 4, if max_v = min_v = special value (there are no predecessors)

Selected Neighborhood

The transistion rule must define all the mappings: (qk,qPk,qBk,qSk) qk The rule length: 250 bits The total number of rules: 2250

Genetic Search

Architecture of CA-based scheduler (Seredinsky, 2001)


Two phases: -Learning: GA is used in the search of CA rules able to schedule a specific program graph. Ex: GAUSS18

The best discovered rules by the GA are stored in a repository of rules.


-Operating: The rules found are used to schedule different program graphs (the program graph used in the learning phase and others).

(Seredinsky, 2001)

GA Environment
Population: P CA transition rules Random initial population Fitness: each CA rule is applied to C initial configurations (ICs), each one corresponding to an initial allocation of a program graph in the processors, for M time steps. A fitness value for the rule is the sum of found values of total execution time T corresponding to each final configuration of CA (C Tfinal). The smaller is the fitness the better is the rule. Elite: E best rules are copied without modification to the next generation Selection: randomly formed pairs using the elite Crossover and Mutation: (P - E) new rules formed by single-point crossover and mutation (flipping bits at random) Stop condition: G generations P = 100, E = 10, pc = 90%, pm = 1.2%, G = 100, C = 25 e M = 50

Analise of Published Results


The CA-based scheduler was able to discover rules that can successfully schedule several program graphs previously studied in literature (learning phase). But when the discovered rules evolved for a specific graph were applied to other graphs, the rules did not present a good generalization ability. The published works are promising but have not presented the desired performance yet.

Generalization Ability
Crucial to the CA-based scheduling. The huge computational effort necessary in the discovery of the CA rules is justified only if these rules are able to be reused in new problems. Otherwise, a GA can be directly used in the search for optimal configurations of each graph independently, without the need to involve the CA in the model. The idea behind using CA rules is the possibility of these rules being reused in new problems, without the need for a new process of evolutionary learning.

Generalization Ability
A little information about this generalization ability was shown and just a few examples of the reusing of rules were indeed verified. We realized initial experiments applying the evolved rules for Gauss18, in the learning phase, to graphs totally different from it and we concluded that reasonable results were found only in graphs where an optimal solution was easy to reach. Central question: a rule evolved based on a specific program graph should return at least reasonable results (near to the optimal) when applied to new graphs that are small variations of the original.

New Approach: JOINT EVOLUTION


Simple Evolution: In the learning phase, the GA is used in the search of CA rules able to schedule based on only a specific program graph (approach proposed by Seredinsky and collaborators). Joint Evolution: In the learning phase, the GA is used in the search of CA rules able to schedule a program graph and some of its variations. In both approach, in the operating phase, this rules are applied to the original graph and also applied to its variations. We expect that in the Joint Evolution approach the evolved rules will be more general than the rules evolved based only one graph.

Example of Gauss18 Variation

Experiments
1. Random allocation: 10.000 random initial allocation were generated, for each program graph analised. 2. Simple GA: a GA was implemented to schedule the tasks, for each program graph analised. 3. Simple Evolution: Learning phase based only on Gauss18. 4. Joint Evolution: Learning phase performed with Gauss18 and more 5 of its variations. The evaluation was made calculating T for 15 variations of Gauss18 (10 different + 5 of the Joint Evolution) Each variation of Gauss18 was evaluated in 100 ICs (Tmed). Experiments with GA: 30 runs (results presented for the best rule). CA model: Sequential mode operation.

Results
Learning phase (Simple Evolution)

Tmin=44

Learning phase (Joint Evolution)

Tmin=282

Results

Confidence Interval and Null Hypotheses:


Simple Evol.: 95% confident that Tmed is in 54,42 and 56,54 Joint Evol. : 95% confident that Tmed is in 47,52 and 48,15: 95% confident this improvement lies between 6,51 and 8,73

Conclusions
The rules evolved by Joint Evolution have presented a better
generalization ability than Simple Evolution (Seredynski, 2001), which guarantees them power to schedule new program graphs. This generalization ability is essential to the CA-based scheduler model The rules discovered with Joint Evolution have an intrinsic scheduling strategy in such a way that when they are applied to a new program graphs, optimal or suboptimal allocations are returned without the need for a new evolution.

You might also like