[pre][scheduler - version: 1.0]
class drivers
{
cpu: 80%
capability: GID 0x0012
quantum_min: 1 TS
quantum_max: 3 TS
}
class groups
{
cpu: 20%
}
class groups::profs
{
cpu: 50%
capability: GID 0x2340
quantum_min: 2 TS
quantum_max: 6 TS
}
class groups::students
{
cpu: 50%
capability: GID 0x0000
quantum_min: 2 TS
quantum_max: 6 TS
}[/pre]
[*]The script says that 80% of the CPU time may be used by drivers which are identified by their GID. If they don't make use of all the time (they normally won't..) the rest is of course given to the groups.
[*]Groups are allowed to run for at least 20% of the time, but normally they'll get more as the drivers aren't that buisy
[*]The class "groups" is just a place holder and can't be used to schedule a task as it doesn't define any capablities
[*]The system supports two groups that can be used by the apps to start a task. "Profs" can only be used by authorized persons (dean, profs) and the apps running in this group get 50% of whatever the drivers left over. The other group ("students") is open for all and gets the other half of the remaining time.
[*]The dean can now claim that the system is perfectly fair, but as there are much more students than profs their programms will execute somewhat slower
[pre]
Some scenarios with this script file:
1) drivers very busy:
drv: 80%, groups: 20% -> profs: 10% + students: 10%
2) all drivers waiting for data:
drivers: 0%, groups: 100% -> profs: 50% + students: 50%
3) drivers idle, 1 prof runs 4 tasks, 10 students run 20 tasks:
drivers: 0%, prof: 4*12.5%, students: 20*2.5%
4) drivers idle, no profs
drivers: 0%, profs: 0%, students: 100%
[/pre]
IIRC "upcall" simply means that the kernel switches to a user-space app to give it the chance to react to some event (eg: revocation of pages, end of timeslice)Colonel Kernel wrote:My usual sources come up short when looking into "upcalls" and "scheduler activations".
regards,
gaf