Skip to content

Commit 12e153a

Browse files
committed
docs: add documentation for domain scheduling
Signed-off-by: James Archer <j.archer@unsw.edu.au>
1 parent 3913202 commit 12e153a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/manual.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ This document attempts to clearly describe all of these terms, however as the co
102102
* [notification](#notification)
103103
* [interrupt](#irq)
104104
* [fault](#fault)
105+
* [domain scheduling](#domain)
105106

106107
## System {#system}
107108

@@ -173,6 +174,10 @@ Runnable PDs of the same priority are scheduled in a round-robin manner.
173174

174175
The **passive** determines whether the PD is passive. A passive PD will have its scheduling context revoked after initialisation and then bound instead to the PD's notification object. This means the PD will be scheduled on receiving a notification, whereby it will run on the notification's scheduling context. When the PD receives a *protected procedure* by another PD or a *fault* caused by a child PD, the passive PD will run on the scheduling context of the callee.
175176

177+
#### Domain scheduling (experimental)
178+
179+
If the SDK is built with experimental domain support, the PD can be assigned to a scheduling **domain** in the system description. If a PD is assigned to a domain, then the PD will only be allowed to execute when that domain is active. Which domain is active at any given point in time is determined by the [domain schedule](#domain).
180+
176181
## Virtual Machine {#vm}
177182

178183
A *virtual machine* (VM) is a runtime abstraction for running guest operating systems in Microkit. It is similar
@@ -308,6 +313,10 @@ protection domain. The same applies for a virtual machine.
308313
This means that whenever a fault is caused by a child, it will be delivered to the parent PD instead of the system fault
309314
handler via the `fault` entry point. It is then up to the parent to decide how the fault is handled.
310315

316+
## Domain scheduling (experimental) {#domain}
317+
318+
Microkit can be built with experimental support for a method of temporally isolating different groups of PDs called domain scheduling. On a Microkit system, only one domain is active at a time, and the kernel alternates between domains according to a round-robin schedule. A domain schedule consists of an ordered list of domains, each with an associated length of time to run. The kernel will then activate a domain for the specified length of time; after that time has passed, it will deactivate that domain and activate the next domain for its length of time, and so on, proceeding through the list until it wraps back to the first domain. PDs are assigned to domains, such that when a certain domain is active, only PDs belonging to that domain will be scheduled to run.
319+
311320
# SDK {#sdk}
312321

313322
Microkit is distributed as a software development kit (SDK).
@@ -575,6 +584,7 @@ Within the `system` root element the following child elements are supported:
575584
* `protection_domain`
576585
* `memory_region`
577586
* `channel`
587+
* `domain_schedule` (if SDK is built with domain scheduling support)
578588

579589
## `protection_domain`
580590

@@ -588,6 +598,7 @@ It supports the following attributes:
588598
* `budget`: (optional) The PD's budget in microseconds; defaults to 1,000.
589599
* `period`: (optional) The PD's period in microseconds; must not be smaller than the budget; defaults to the budget.
590600
* `passive`: (optional) Indicates that the protection domain will be passive and thus have its scheduling context removed after initialisation; defaults to false.
601+
* `domain`: (optional, experimental) Specifies the name of the scheduling domain the PD belongs to.
591602

592603
Additionally, it supports the following child elements:
593604

@@ -674,6 +685,19 @@ The `end` element has the following attributes:
674685
The `id` is passed to the PD in the `notified` and `protected` entry points.
675686
The `id` should be passed to the `microkit_notify` and `microkit_ppcall` functions.
676687

688+
## `domain_schedule` (experimental)
689+
690+
The `domain_schedule` element has has a list of `domain` child elements. Each child specifies information about a particular domain, and the order of the child elements specifies the order in which the domains will be scheduled.
691+
692+
The `domain` element has the following attributes:
693+
694+
* `name`: Name of the domain.
695+
* `length`: Length of time the domain will run each time it is active, in microseconds.
696+
697+
The `name` attribute of each `domain` element can be referenced in the `domain` attribute of a `protection_domain` element.
698+
699+
The `domain_schedule` element is only valid if the SDK is built with the `--experimental-domain-support` flag.
700+
677701
# Board Support Packages {#bsps}
678702

679703
This chapter describes the board support packages that are available in the SDK.

0 commit comments

Comments
 (0)