[Coco] Feralcore: An Internet Protocol Based on the 6809

Adam Young ay235 at yahoo.com
Thu Jun 24 21:19:32 EDT 2010


All,

Based on the responses of Brett, Aaron, Sean, and
Andrew regarding Darwin, Corewar, and Network Tierra,
it seems like there might be some interest in
Feralcore (thanks for your feedback guys). Moti and I
(along with other contributors) are actively researching
Feralcore and welcome experimentation and feedback. It
is written in C++ and is POSIX compatible for the most
part. Below is a blurb on what it is.

A Feralcore network is a network consisting of n nodes.
Each node in the network has a unique personal identity
(R. Pandya. Emerging mobile and personal communication systems.
IEEE Communications Magazine, vol. 33, pages 44-52,
June 1995). Every node can send a message to every other
node. So, the network forms the complete graph on n vertices.

Feralcore was inspired in part by the computer game Darwin
(Aleph-Null. Computer Recreations. Software: Practice and
Experience, vol. 2, pages 93-96, 1972). Core war was also
inspired by Darwin. Each player submits a set of programs,
called a species, to the game. An umpire program
oversees the execution of the programs in memory. Programs
can clobber one another since they run in the same address
space. The last species standing wins. We adopt the term
feralcore kernel to describe the program that
oversees program execution.

In feralcore each node has 256 memory cores.
Each memory core consists of 65536 bytes. The kernel can
run up to 256 processes at once spread out across the 256
cores. Each process has a set of private registers that
includes the program counter. Each process also has an
associated integer corresponding to which core the process
is in. The program counter points to the next instruction
to be executed in this core. The privacy of the registers
is not ensured, since one process can indirectly read
or write the registers of another.

At any given time, m processes are running in a node.
The kernel implements a time sharing strategy to
execute them. They are not executed in parallel (at least
when viewed at the C++ source code level). For the purposes
of illustration, suppose the processes are labeled from
1 to m. Let c be an m-sided coin having sides labeled from
1 to m. The kernel flips c to get a result r. The kernel lets
process r execute a single instruction. The kernel flips
c to get a result r. The kernel lets process r execute
a single instruction, and so on. If one process dies
then a coin having m - 1 sides is used, etc.

This randomized strategy is clearly fair, especially when
you consider the issue of which process gets to execute
first. This design was chosen over a deterministic
round-robin scheduler since it simplifies the
implementation of break-points in the feralcore
debugger.

The kernel implements a virtual machine based on the
feralcore instruction set. This instruction set is
similar to the Motorola 6809 instruction set.
So, processes execute 6809 instructions.
However, 6809 instructions relating to hardware interrupts
are not part of the feralcore instruction set. Also,
an instruction using opcode 0x02 is included in
the feralcore instruction set. The opcode 0x02 is
not a valid instruction for the 6809. The 0x02
instruction implements the feralcore API call.
It is 0x02 followed by a 16-bit API vector.

The API calls supplement the 6809 instructions by
providing some very powerful functionality. There
is an API call that lets a process spawn another
feralcore process. There is an API call that
lets a feralcore process move itself to another
core within the same node. There is also an API
call that lets a process move itself to another
feralcore node in the network instantly.

The kernel terminates a process when that process
executes an invalid instruction. Executing an
invalid instruction is the normal way for a process
to terminate itself. Process A can clobber process B
by writing an invalid instruction at the memory
location pointed to by the program counter in
process B.

There are other situations that can cause a process
to be terminated. When the 256th process is created,
a random process is terminated. A node that is
spammed with incoming feralcore programs may drop
some incoming programs.

Feralcore is an experiment. The documentation is
currently available at:

http://www.feralcore.com/download/tfcdocuments/feralcore.pdf

A video of the 6809 program slowhopper is available
at: www.feralcore.com

slowhopper hops randomly around the feralcore network.

Please let us know if you are interested in learning
more or experimenting with it. It is not ready for
general distribution due to unresolved bandwidth issues.

I view feralcore in many different ways. The CoCo nut
in me likes it since it is a new way to bring the 6809
to life. I am wondering if any of you will feel the
same way.

regards,

Adam



      



More information about the Coco mailing list