The Scheduler Service will look for an XML file in /etc/scheduler_config.xml containing the configuration to be used. This DTD descibes the structure of the scheduler configuration file:
<!ELEMENT SchedulerConfiguration (Resource*, Activity*)> <!ELEMENT Resource EMPTY> <!ATTLIST Resource id ID #REQUIRED total CDATA #REQUIRED> <!ELEMENT Activity (Consume*)> <!ATTLIST Activity name CDATA #REQUIRED> <!ELEMENT Consume EMPTY> <!ATTLIST Consume id IDREF #REQUIRED amount CDATA #REQUIRED>
Consider the following example scheduler configuration file:
<?xml version="1.0"?> <!DOCTYPE SchedulerConfiguration SYSTEM "scheduler.dtd"> <SchedulerConfiguration> <Resource id="cpu" total="5"/> <Resource id="tuner" total="2"/> <Activity name="record_sd_from_ip"> <Consume id="cpu" amount="2"/> </Activity> <Activity name="record_hd_from_ip"> <Consume id="cpu" amount="3"/> </Activity> <Activity name="record_sd_from_tuner"> <Consume id="cpu" amount="2"/> <Consume id="tuner" amount="1"/> </Activity> <Activity name="record_hd_from_tuner"> <Consume id="cpu" amount="3"/> <Consume id="tuner" amount="1"/> </Activity> <!-- Does not consume any resources --> <Activity name="notification"/> </SchedulerConfiguration>
This configuration will cause the scheduler service to enforce the following limitations: