[−][src]Enum dpdk_unix::scheduling::Scheduler
A Linux scheduler.
Variants
Idle
For running very low priority background jobs.
Lower priority than Idle
.
The process' nice
value is ignored.
This policy is intended for running jobs at extremely low priority (lower even than a +1
9 nice value with the Other
or Batch
policies).
Batch(Nice)
For 'batch' style execution of processes.
Slightly lower priority than Other
, higher than Idle
.
Since Linux 2.6.16.
This policy is similar to Other
in that it schedules the process according to its dynamic priority (based on the nice value).
The difference is that this policy will cause the scheduler to always assume that the process is CPU-intensive.
Consequently, the scheduler will apply a small scheduling penalty with respect to wakeup behaviour, so that this process is mildly disfavored in scheduling decisions.
This policy is useful for workloads that are noninteractive, but do not want to lower their nice value, and for workloads that want a deterministic scheduling policy without interactivity causing extra preemptions (between the workload's tasks).
Other(Nice)
The standard (and default) round-robin time-sharing scheduler.
The process to run is chosen from the static priority 0 list based on a dynamic priority that is determined only inside this list.
The dynamic priority is based on the nice value (set by setpriority()
) and increased for each time quantum the process is ready to run, but denied to run by the scheduler.
This ensures fair progress among all Other
processes.
RealTimeFirstInFirstOut(RealTimeSchedulerPriority)
A first-in, first-out real time scheduler.
When a RealTimeFirstInFirstOut
processes becomes runnable, it will always immediately preempt any currently running Other
, Batch
or Idle
process.
A RealTimeFirstInFirstOut
process that has been preempted by another process of higher priority will stay at the head of the list for its priority and will resume execution as soon as all processes of higher priority are blocked again.
When a RealTimeFirstInFirstOut
process becomes runnable, it will be inserted at the end of the list for its priority.
A RealTimeFirstInFirstOut
process runs until either it is blocked by an I/O request, it is preempted by a higher priority process, or it calls sched_yield()
.
RealTimeRoundRobin(RealTimeSchedulerPriority)
A round-robin real time scheduler.
Everything described above for RealTimeFirstInFirstOut
also applies to RealTimeRoundRobin
, except that each process is only allowed to run for a maximum time quantum.
If a RealTimeRoundRobin
process has been running for a time period equal to or longer than the time quantum, it will be put at the end of the list for its priority.
A RealTimeRoundRobin
process that has been preempted by a higher priority process and subsequently resumes execution as a running process will complete the unexpired portion of its round-robin time quantum.
The length of the time quantum can be retrieved using sched_rr_get_interval()
.
Deadline
A real time scheduler that takes precedence over all other schedulers.
Also known as "Earliest-Deadline-First" (EDF).
Since Linux 3.14.
Using a Deadline scheduler is impossible if a thread has an affinity to less than the total CPUs on the system (or in the current cgroup).
Fields of Deadline
Methods
impl Scheduler
[src]
pub fn set_for_current_thread(&self) -> Result<(), &'static str>
[src]
Returns an error if permission was denied or a deadline scheduler could not be brought into use.
Trait Implementations
impl Eq for Scheduler
[src]
impl Clone for Scheduler
[src]
fn clone(&self) -> Scheduler
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Scheduler
[src]
impl PartialOrd<Scheduler> for Scheduler
[src]
fn partial_cmp(&self, other: &Scheduler) -> Option<Ordering>
[src]
fn lt(&self, other: &Scheduler) -> bool
[src]
fn le(&self, other: &Scheduler) -> bool
[src]
fn gt(&self, other: &Scheduler) -> bool
[src]
fn ge(&self, other: &Scheduler) -> bool
[src]
impl PartialEq<Scheduler> for Scheduler
[src]
impl Default for Scheduler
[src]
impl Ord for Scheduler
[src]
fn cmp(&self, other: &Scheduler) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for Scheduler
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Scheduler
[src]
impl<'de> Deserialize<'de> for Scheduler
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,