Skip to content

Commit

Permalink
Plan 9 from Bell Labs 2003-03-19
Browse files Browse the repository at this point in the history
  • Loading branch information
0intro committed Mar 19, 2003
1 parent adad83c commit eeff709
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions port/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ rebalance(void)
continue;
if(p->priority == p->basepri)
continue;

/* this comparison is too arbitrary - need a better one */
/* presotto */
if(m->ticks - p->readytime < quanta[p->priority]/4)
continue;
splhi();
Expand Down Expand Up @@ -362,6 +365,8 @@ runproc(void)
if ((p = edf->edfrunproc()) != nil)
return p;

/* 10 is completely arbitrary - it interacts with the comparison in rebalance */
/* presotto */
if(m->fairness++ == 10){
m->fairness = 0;
rebalance();
Expand Down

0 comments on commit eeff709

Please sign in to comment.