You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the last piece for the policy-free kernel: allow userspace programs to decide how tasks are scheduled. The following design is based on MINIX3.
Implement a multi-priority round-robin scheduling:
The task with the highest priority runs forever until it spends its quantum.
If there're multiple tasks with the same priority, the kernel runs each task in a preemptive context switching with the hard-coded time slice in a round-robin fashion.
If a task spends the allocated quantum, the kernel refills it with reset. If reset is -1, it sends an exception message to its pager task.
If CPU affinity is set for a task, only specified CPUs are allowed to run the task.
Add sched system call.
error_t sys_sched(task_t task, int priority, int quantum, int reset, unsigned affinity);
sys_spawn: Add TASK_SCHED flag not to start the new task until sys_sched is invoked.
If it's not given, the task will be started with the lowest priority and the default quantum.
The text was updated successfully, but these errors were encountered:
Finally, Resea Kernel become *policy-free* kernel. Currently this feature
is not yet used in the userspace, but it'll be a good example for educational
purposes.
This is the last piece for the policy-free kernel: allow userspace programs to decide how tasks are scheduled. The following design is based on MINIX3.
reset
. Ifreset
is -1, it sends an exception message to its pager task.sched
system call.error_t sys_sched(task_t task, int priority, int quantum, int reset, unsigned affinity);
sys_spawn
: AddTASK_SCHED
flag not to start the new task untilsys_sched
is invoked.The text was updated successfully, but these errors were encountered: