guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

smarter cooperative scheduler (maybe fiber related)


From: amirouche
Subject: smarter cooperative scheduler (maybe fiber related)
Date: Wed, 21 Mar 2018 01:14:56 +0100

What I want is that my CPUs to be always busy with the most important work. I don't know how CPU intensive or whether they block on system calls in advance.
There is different kind of them. Some do IO, some do CPU.

I have a system where I submit a problem to a system with multiple agents. Each agent will concurrently have a try at the problem creating theories.

The agent are coded using some greedy lazy algorithm. That is they don't
compute the whole solution and try to stream the result invocation after
invocation. So that, if a new theory is added by an agent, it might delock another agent or make it's computation faster. That is agents don't block
for a long time.

Similarly when the user input some fact in the database, it might simplify the problem and the agents must re-evalute their strategy, maybe thrashing
old theories.

The problem is complete, when all agents have no more theory to add to the
problem.

Another problem, is that there is some backgound tasks that must always be
executed when the whole system is idle.

Another feature, is that if the program crash for some reason, the agents
must restart from where they left. agents are idempotent that is there
is no problem in running them twice in a row or after a crash. But, does
this mean I need to keep some kind of running tasks journal, to
be able to restart them?

I read, they are some event loops, that implements some kind of priority
system. In particular, the priority of each thread/fiber might change over
time. How can this be achieved in guile? fibers?



I understand my explanation is not very good. I will try to improve tomorrow.


Thanks in advance!


Amirouche ~ amz3 ~ http://hyperdev.fr




reply via email to

[Prev in Thread] Current Thread [Next in Thread]