← Back to team overview

opencog-dev team mailing list archive

Re: Locking atoms

 

Hi,

  - if an agent should use all the available CPU, then it just never
    sleeps; the kernel will preempt it as it does any other thread
    (the agent should probably lower its priority though).

While this may be useful in some scenarios, it's not desirable in OpenCog Prime. It's not a bad idea to support it, as long as people know they shouldn't build such agents. MindAgents have to act in small, incremental steps, otherwise the concept of a cycle is compromised.

Nothing is set in stone, of course, and I'd be glad to hear about any
other important requirements. Keep in mind though that nothing prevents us from refining the proposed design and add additional functionality in
the future. What I'm mostly concerned right now is to have something
that's simple (and extensible) so that we may have it up and running
relativelly soon.

This is a sensible approach.

Mutual exclusivity would be handle by locking the proper atoms. Sequence dependence could be handled by creating/removing atoms as well, but I'm
not sure this is the best approach. However, the current scheduler
doesn't support anything like this (nor does the older Novamente
scheduler, IIRC).

There are no sequence constraints among agents, and mutual exclusivity only exists because there's no locking in the Novamente codebase (and its scheduler does support exclusivity). It goes away naturally with locking, but this creates a very important design guideline: any locks need to be short lived.

Cassio



References