Task

Struct Task 

Source
pub struct Task {
    pub offset: TimeUnit,
    pub demand: TimeUnit,
    pub interval: TimeUnit,
}
Expand description

The Task type based on the Modeling described in the second paragraph of Chapter 3. in the paper

Fields§

§offset: TimeUnit

The offset of the tasks, O index i in the paper

§demand: TimeUnit

The demand induced by the task called the worst-case execution time (WCET) C index i in the paper

§interval: TimeUnit

The interval of the task, called Period P index i in the paper

Implementations§

Source§

impl Task

Source

pub fn new<I: Into<TimeUnit>>(demand: I, interval: I, offset: I) -> Self

Create a new Task with the corresponding parameters

§Panics

If the interval is shorter than the demand

Source

pub fn higher_priority_task_demand_iter( tasks: &[Self], index: usize, ) -> impl CurveIterator<CurveKind = HigherPriorityTaskDemand> + Clone + '_

calculate the Higher Priority task Demand for the task with priority index as defined in Definition 14. (1) in the paper, for a set of tasks indexed by their priority (lower index <=> higher priority) and up to the specified limit

Source

pub fn available_execution_curve_impl<'a, HPTD, ASEC>( constrained_server_execution_curve: ASEC, higher_priority_task_demand: HPTD, ) -> impl CurveIterator<CurveKind = AvailableTaskExecution> + Clone + 'a
where HPTD: CurveIterator<CurveKind = HigherPriorityTaskDemand> + Clone + 'a, ASEC: CurveIterator<CurveKind = ActualServerExecution> + Clone + 'a,

Calculate the available execution Curve for the task with priority task_index of the server with priority server_index up to the specified limit.

Based on Definition 14. (2) of the paper

Source

pub fn original_actual_execution_curve_iter<'a>( system: &'a System<'_>, server_index: usize, task_index: usize, ) -> impl CurveIterator<CurveKind = ActualTaskExecution> + Clone + 'a

Calculate the actual execution Curve for the Task with priority task_index of the Server with priority server_index up to the specified limit.

Based on Definition 14. (3) of the paper

Source

pub fn fixed_actual_execution_curve_iter<'a>( system: &'a System<'_>, server_index: usize, task_index: usize, ) -> impl CurveIterator<CurveKind = ActualTaskExecution> + Clone + 'a

Source

pub fn original_worst_case_response_time( system: &System<'_>, server_index: usize, task_index: usize, arrival_before: TimeUnit, ) -> TimeUnit

Calculate the WCRT for the task with priority task_index for the Server with priority server_index

See definition 15. of the paper for reference

Takes the system of servers that the task which worst case execution time shall be calculated is part of the priority/index of the server the Task belongs to and the tasks priority/index in that server as well as the time till which jobs that arrive prior shall be considered for the analysis

§Panics

When sanity checks fail

Source

pub fn fixed_worst_case_response_time( system: &System<'_>, server_index: usize, task_index: usize, arrival_before: TimeUnit, ) -> TimeUnit

Source

pub fn time_to_provide( actual_execution_time: &Curve<ActualTaskExecution>, t: TimeUnit, ) -> TimeUnit

Calculate the time till the execution curve has served t Units of Demand Implementing Algorithm 5. form the paper

§Panics

When the capacity of the curve is less than t or t is TimeUnit::ZERO

Source

pub fn job_arrival(&self, job_index: UnitNumber) -> TimeUnit

Calculate the arrival for the job_index+1-th job

Note: The paper uses 1-index for jobs while this uses 0-index

Trait Implementations§

Source§

impl Clone for Task

Source§

fn clone(&self) -> Task

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Task

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IntoIterator for Task

Source§

fn into_iter(self) -> Self::IntoIter

Generate the Demand Curve for the Task

Based on Definition 9. and 10. of the paper

Source§

type Item = Window<Demand>

The type of the elements being iterated over.
Source§

type IntoIter = TaskDemandIterator

Which kind of iterator are we turning this into?
Source§

impl Copy for Task

Auto Trait Implementations§

§

impl Freeze for Task

§

impl RefUnwindSafe for Task

§

impl Send for Task

§

impl Sync for Task

§

impl Unpin for Task

§

impl UnwindSafe for Task

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.