This post gives the brief of two schedulers present in Xen.
- Credit scheduler has three states:
- OVER – gone over the credit allocation
- UNDER – credits remaining
- BOOST – to achieve low I/O response latency
- When sum of the credits for all of the domains go negative all domains are given new credits.
- Domains in UNDER are always run before in the OVER state.
- A domain over its credit allocation is only executed if there are no domains in the UNDER state that are ready to run.
- Considers only whether it is in OVER / UNDER state, the absolute number of credits that a domain has remaining is irrelevant.
- Domains in same state are run in first-in, first-out manner.
- Each domain is allocated processing resources according to 3 parameters: domains Period and slice; and a Boolean flag indicating whether domain is eligible to receive extra CPU time.
- For each domain there is also a deadline, the time at which the domains current period ends and the amount of processing time that the domain is due before the deadline passes.
- Domains are ordered in Queue according to deadlines.
- Domain with Earliest deadline is executed first.
- Deadlines move forward in time as domains consume processing time.
Note: Official website and documentation can be referred for more.