X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2F44bsd.texi;h=b21c48780f0c5811688490e7bf7f45b3a16a8592;hb=5e68c020d57d0e8eab14f8cce9b8a1ce1ffddba5;hp=b99f3ca897691fc0e9892ebf278cb3b51117c624;hpb=c56ee34418c56190fe1cc2f2e22a5f8b34057cb7;p=pintos-anon diff --git a/doc/44bsd.texi b/doc/44bsd.texi index b99f3ca..b21c487 100644 --- a/doc/44bsd.texi +++ b/doc/44bsd.texi @@ -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 a newly increased +@func{timer_ticks} value but old scheduler data values. + @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}