mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-09-07 00:09:59 +00:00
scheduling: Create a secondary sandbox scheduling domain
This updates the kernel configs to setup two domains instead of one, and also defines a bare-bones domain scheduler that simply round- robins through the domains. Bug: 238811077 Change-Id: Ibb49f10265c38dc26235fc246f6147b306055bcb GitOrigin-RevId: 6b17211d8866bec9207f78dc61c4840c6da9537d
This commit is contained in:
committed by
Sam Leffler
parent
ce1543c466
commit
be8c32c874
22
kernel/round_robin_domain.c
Normal file
22
kernel/round_robin_domain.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <model/statedata.h>
|
||||
#include <object/structures.h>
|
||||
|
||||
/* Dual-domain schedule for Kata to isolate third party applications from system
|
||||
* applications.
|
||||
*
|
||||
* Note that this doesn't actually implement the schedule -- that's hardwired in
|
||||
* seL4's kernel source. See also kata/kernel/src/kernel/thread.c, in the
|
||||
* nextDomain function around line 302 and the timerTick function around 630.
|
||||
*
|
||||
* Effectively this is a round-robin scheduler, so half of the CPU time is given
|
||||
* to system applications, while third party applications are allocated the
|
||||
* other half. Note that even if there's nothing to run in the third-party
|
||||
* application domain, the scheduler will schedule an idle thread to ensure that
|
||||
* domain gets it's allocated share of time.
|
||||
*/
|
||||
const dschedule_t ksDomSchedule[] = {
|
||||
{.domain = 0, .length = 1}, // System domain
|
||||
{.domain = 1, .length = 1}, // Third party application domain
|
||||
};
|
||||
|
||||
const word_t ksDomScheduleLength = sizeof(ksDomSchedule) / sizeof(dschedule_t);
|
Reference in New Issue
Block a user