Lumiera  0.pre.03
»edit your freedom«
scheduler-invocation.hpp File Reference

Go to the source code of this file.

Description

Layer-1 of the Scheduler: queueing and prioritisation of activities.

This is the lower layer of the implementation and provides the data structures necessary to implement low-level scheduling functionality. The Scheduler operates on Activity records maintained elsewhere, in the BlockFlow allocation scheme. Layer-2 adds the ability to perform these Render Activities, constituting a low-level execution language. Since the services of the Scheduler are used in a multi-threaded context, new entries will be passed in through an lock-free Instruction Queue. The actual time based prioritisation is achieved by the use of a Priority Queue — which however must be concurrency protected. The Layer-2 thus assures that mutating operations are performed exclusively from a special »grooming mode« (management mode).

Data maintained in Queue Entries
  • the Activity itself is allocated externally an only referred by pointer; however, this pointer must not be dereferenced after the deadline passed.
  • an entry can be scheduled after reaching the start time
  • the deadline marks latest point in time where starting is still allowed
  • entries can be tagged with a distinctive »manifestation ID«, which allows to filter out complete families of already planned entries
  • as a safety measure, an entry can be marked as compulsory. In regular operation, this has no effect, but an emergency state is triggered in the SchedulerService, should such an entry miss it's deadline
See also
SchedulerCommutator::findWork()
SchedulerCommutator::postChain()
SchedulerInvocation_test
SchedulerUsage_test integrated usage

Definition in file scheduler-invocation.hpp.

#include "vault/common.hpp"
#include "lib/nocopy.hpp"
#include "vault/gear/activity.hpp"
#include "lib/time/timevalue.hpp"
#include "lib/util.hpp"
#include <queue>
#include <boost/lockfree/queue.hpp>
#include <unordered_set>
#include <utility>

Classes

struct  ActivationEvent
 
class  SchedulerInvocation
 Scheduler Layer-1 : time based dispatch. More...
 

Variables

const size_t INITIAL_CAPACITY = 128
 

Namespaces

 vault
 Vault-Layer implementation namespace root.
 
 vault::gear
 Active working gear and plumbing.