next up previous contents
Next: Naming of Organisms Up: Preliminary Issues Previous: Spatial Structure

   
Time Slicing and the Top-Level Algorithm

The Cosmos operating system simulates the parallel execution of a large number of programs. As Cosmos is actually implemented on a serial machine, a form of time slicing is required to achieve this (i.e. at each time slice, a small number of instructions are executed for each program, one at a time). The top-level algorithm that implements this procedure is described in Section 4.7. At each time slice, it must be decided how many instructions are to be executed for each program. Possibly the most obvious strategy is to execute a fixed number of instructions for each program. However, from an evolutionary point of view, this would introduce selection pressure for small programs because, all else being equal, longer programs would take a larger number of time slices to reproduce. This may or may not be desirable. The decision of how many instructions to run for each program at each time slice is therefore governed by a couple of parameters which can be tuned by the user. Specifically, a program of length L bits is allowed to execute N instructions per time slice, determined by the formula:


N is rounded down to an integer value. This allows considerable flexibility: for example, if et_value_power is set to 0.0, then each program executes et_value_constant instructions per time slice, regardless of length; if et_value_power is set to 1.0, then the allocation is linearly proportional to program length, so evolutionary selection is size-neutral (all else being equal). Further details of time slicing are given in Section 4.3.5.


next up previous contents
Next: Naming of Organisms Up: Preliminary Issues Previous: Spatial Structure
Tim Taylor
1999-05-29