Userspace scheduling - exporting stats
- contributed by Bjorn Swift - adds process accounting, for example counting the number of messages sent, how often the process was preemted and how much time it spent in the run queue. These statistics, along with the current cpu load, are sent back to the user-space scheduler in the Out Of Quantum message. - the user-space scheduler may choose to make use of these statistics when making scheduling decisions. For isntance the cpu load becomes especially useful when scheduling on multiple cores.
This commit is contained in:
@@ -158,6 +158,8 @@ PUBLIC int main(void)
|
||||
ip->endpoint = rp->p_endpoint; /* ipc endpoint */
|
||||
make_zero64(rp->p_cpu_time_left);
|
||||
strncpy(rp->p_name, ip->proc_name, P_NAME_LEN); /* set process name */
|
||||
|
||||
reset_proc_accounting(rp);
|
||||
|
||||
/* See if this process is immediately schedulable.
|
||||
* In that case, set its privileges now and allow it to run.
|
||||
|
||||
Reference in New Issue
Block a user