From eeff7096b89ebae832bff8f5d0fc8a436b4802a7 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 19 Mar 2003 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2003-03-19 --- port/proc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/port/proc.c b/port/proc.c index 8a3ad8d3693147d07f82f119874cf9362b17d35a..9c78e28345610aecd79a9f751cb98457d266642d 100644 --- a/port/proc.c +++ b/port/proc.c @@ -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(); @@ -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();