dispatch9952%python.module
fault.kernel

Executive processors containing a primitive execution unit.

os
import

types0
import

collections0
import

functools0
import

typing0
import

errno0
import

signal0
import

heapq0
import

core0
import

weak0
import

execution0
import

Call0
class

A single callable represented as a Processor. Used as an abstraction for explicit enqueues, and to trigger faults in Sectors.

This should be rarely used in practice.

Callc_execution0
method

c_execution(self)

Callpartial0
classmethod

partial(Class, call, *args, **kw)

Create a call applying the arguments to the callable upon actuation. The positional arguments will follow the Sector instance passed as the first argument.

Call__init__0
method

__init__(self, call)

The partial application to the callable to perform. Usually, instantiating from partial is preferrable; however, given the presence of a functools.partial instance, direct initialization is better.

Call__init__Parameters

self

Undocumented.

call

The callable to enqueue during actuation of the Processor.

Callactuate0
method

actuate(self)

Callstructure10%
method

structure(self)

Callterminate10%
method

terminate(self)

Coroutine0
class

Processor for coroutines.

Manages the generator state in order to signal the containing Sector of its exit. Generator coroutines are the common method for serializing the dispatch of work to relevant Sector instances.

Coroutine__init__10%
method

__init__(self, coroutine)

Coroutinestate10%
property

Coroutine_co_complete20%
method

_co_complete(self)

Coroutinecontainer60%
method

container(self)

Container for the coroutine's execution in order to map completion to processor exit.

Coroutineactuate40%
method

actuate(self)

Start the coroutine.

Coroutineterminate30%
method

terminate(self)

Force the coroutine to close.

Coroutineinterrupt10%
method

interrupt(self)

Thread0
class

A Processor that runs a callable in a dedicated thread.

Thread__init__10%
method

__init__(self, callable)

Threadtrap60%
method

trap(self)

Threadactuate20%
method

actuate(self)

Create the thread and execute the target.

Exceptions raised by the thread will cause the processor to fault.

Subprocess0
class

A set of running system processes. Terminates when all members of the set has exited and all subtransactions have completed.

SubprocessProperties

sp_reaper

The callable used to collect the process status using the system process identifier.

sp_exit_status

A mapping of process identifiers to their corresponding exit status returned by sp_reaper after an exit event was received.

sp_processes

A mapping of process identifiers to user-defined objects used to identify all the processes associated with the instance.

SubprocessEngineering

While POSIX systems are the target platform, it's still preferrable to abstract the concepts. Everything here dealing with signals should be accessed through the system context.

Subprocess__init__0
method

__init__(self, reap, invocations)

Subprocesssp_report0
method

sp_report(self)

Join the System process identifier, invocation object, and exit status.

Subprocessfrom_invocation100%
classmethod

from_invocation(Class, invocation, stdout, stdin, stderr)

Instantiation from an invocation executed with invocation.spawn. The process' standard I/O must be explicitly designated using the stdin, stdout, and stderr parameters. Process will be reaped with fault.system.execution.reap.

Subprocessfrom_invocationParameters

Class

Undocumented.

invocation

The fault.system.execution.KInvocation instance to spawn.

stdout

The file descriptor to map as standard output.

stdin

The file descriptor to map as standard input.

stderr

The file descriptor to map as standard error.

Subprocessxact_void0
method

xact_void(self, last)

Subprocesssp_exit180%
method

sp_exit(self, pid)

Subprocessterminate40%
method

terminate(self)

If the process set isn't terminating, issue SIGTERM to all of the currently running processes.

Subprocessstructure20%
method

structure(self)

Subprocessactuate0
method

actuate(self)

Initialize the system event callbacks for receiving process exit events.

Subprocessinterrupt340%
method

interrupt(self)

Interrupt the running processes by issuing a SIGKILL signal to all active processes. Exit status will be reaped, but not reported to self.

Subprocesssp_only0
property

The exit event of the only process in the set. None if no exit has occurred or the number of processes exceeds one.

Subprocesssp_waiting0
property
typing.Set[int]

Return the set of process identifiers that have yet to exit.

Subprocesssp_reaped0
property
bool

Whether all the processes have been reaped.

Subprocesssp_signal30%
method

sp_signal(self, signo)

Send the given signal number (os.kill) to the active processes being managed by the instance.

Subprocesssp_signal_group30%
method

sp_signal_group(self, signo)

Send the given signal number (os.kill) to the active processes being managed by the instance.

Subprocesssp_abort30%
method

sp_abort(self)

Interrupt the running processes by issuing a SIGQUIT signal.

Coprocess0
class

A local parallel process whose termination is connected to an instance.

Coprocess__init__20%
method

__init__(self, identifier, application)

Coprocesscp_process_exit30%
method

cp_process_exit(self)

Coprocesscp_enqueue10%
method

cp_enqueue(self, task)

Coprocessstructure20%
method

structure(self)

Coprocessactuate20%
method

actuate(self)

Initialize the system event callbacks for receiving process exit events.

Coprocessinterrupt40%
method

interrupt(self)

Interrupt the running processes by issuing a SIGKILL signal to all active processes. Exit status will be reaped, but not reported to self.

Coprocessterminate50%
method

terminate(self)

Interrupt the running processes by issuing a SIGQUIT signal.

Recurrence0
class

Timer maintenance for recurring tasks.

Usually used for short term recurrences such as animations and status updates. Recurrences work by deferring the execution of the configured target after each occurrence. This overhead means that Recurrence is not well suited for high frequency executions, but useful in cases where it is important to avoid overlapping calls.

Recurrence__init__30%
method

__init__(self, target, frequency)

Recurrenceactuate30%
method

actuate(self)

Enqueue the initial execution of the recurrence.

Recurrenceoccur20%
method

occur(self)

Invoke a recurrence and use its return to schedule its next iteration.

Recurrenceterminate20%
method

terminate(self)

Recurrenceinterrupt20%
method

interrupt(self)

Scheduler0
class

Timestamp based transaction scheduling using the system's Real Time clock.

Scheduler__init__0
method

__init__(self)

Scheduleractuate150%
method

actuate(self)

Schedulerstructure30%
method

structure(self)

Scheduler_terminal10%
method

_terminal(self)

Schedulerterminate0
method

terminate(self)

Schedulerxact_void0
method

xact_void(self, final)

Schedulerinterrupt0
method

interrupt(self)

Scheduleroccur0
method

occur(self)

Execute the next task given that the period has elapsed. If the period has not elapsed, reschedule transition in order to achieve finer granularity.

Schedulersched_cancel30%
method

sched_cancel(self, pit, *xacts)

Cancel the given transactions that were scheduled for execution at the given pit.

Aside from the time and transaction, Scheduler has no index for identifying scheduled events. When such a feature is necessary, an index must be managed independently or a subclass must be created.

Schedulersched_insert0
method

sched_insert(self, pit, *xacts)

Schedule the xacts to be executed at the specified Point In Time, pit.

Schedulersched_update275%
method

sched_update(self, items)

Scheduler_sched_period0
method

_sched_period(self, current)

Scheduler_sched_put0
method
int

_sched_put(self, pit, xacts)

Scheduler_sched_get0
method

_sched_get(self, current)