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:
Tomas Hruby
2010-09-19 15:52:12 +00:00
parent 3306687363
commit a665ae3de1
10 changed files with 146 additions and 9 deletions
+3 -1
View File
@@ -49,7 +49,7 @@ _PROTOTYPE( int do_ipc, (reg_t r1, reg_t r2, reg_t r3) );
_PROTOTYPE( void proc_init, (void) );
_PROTOTYPE( int mini_notify, (const struct proc *src, endpoint_t dst) );
_PROTOTYPE( void enqueue, (struct proc *rp) );
_PROTOTYPE( void dequeue, (const struct proc *rp) );
_PROTOTYPE( void dequeue, (struct proc *rp) );
_PROTOTYPE( void switch_to_user, (void) );
_PROTOTYPE( struct proc * arch_finish_switch_to_user, (void) );
_PROTOTYPE( struct proc *endpoint_lookup, (endpoint_t ep) );
@@ -61,6 +61,8 @@ _PROTOTYPE( int isokendpt_f, (endpoint_t e, int *p, int f) );
#define isokendpt_d(e, p, f) isokendpt_f((e), (p), (f))
#endif
_PROTOTYPE( void proc_no_time, (struct proc *p));
_PROTOTYPE( void reset_proc_accounting, (struct proc *p));
_PROTOTYPE( void flag_account, (struct proc *p, int flag));
/* start.c */
_PROTOTYPE( void cstart, (u16_t cs, u16_t ds, u16_t mds,