From: Ben Pfaff Date: Fri, 14 Jan 2005 07:59:41 +0000 (+0000) Subject: Priority change clarification (problem 1-3). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29f8918b7dd6764dd6ddb17098e9a4ecaeeea37e;p=pintos-anon Priority change clarification (problem 1-3). --- diff --git a/doc/threads.texi b/doc/threads.texi index dae47bb..7d7526c 100644 --- a/doc/threads.texi +++ b/doc/threads.texi @@ -527,7 +527,9 @@ than the currently running thread, the current thread should immediately yield the processor to the new thread. Similarly, when threads are waiting for a lock, semaphore or condition variable, the highest priority waiting thread should be woken up first. A thread -may set its priority at any time. +may raise or lower its own priority at any time, but lowering its +priority such that it no longer has the highest priority must cause it +to immediately yield the CPU. One issue with priority scheduling is ``priority inversion'': if a high priority thread needs to wait for a low priority thread (for