Clarify that scheduler data updates are synchronous with the timer.
[pintos-anon] / doc / 44bsd.texi
index b99f3ca897691fc0e9892ebf278cb3b51117c624..612aa1c74c51921168a319c2866e2a6b622b5466 100644 (file)
@@ -52,6 +52,12 @@ time, the scheduler chooses a thread from the highest-priority non-empty
 queue.  If the highest-priority queue contains multiple threads, then
 they run in ``round robin'' order.
 
+Multiple facets of the scheduler require data to be updated after a
+certain number of timer ticks.  In every case, these updates should
+occur before any ordinary kernel thread has a chance to run, so that
+there is no chance that a kernel thread could see @func{timer_ticks}
+increased but these old values for these data.
+
 @menu
 * Thread Niceness::             
 * Calculating Priority::        
@@ -314,7 +320,7 @@ q}:
 @tab @code{n * f}
 
 @item Convert @code{x} to integer (rounding down):
-@tab @code{x * f}
+@tab @code{x / f}
 
 @item Convert @code{x} to integer (rounding to nearest):
 @tab @code{(x + f / 2) / f}