serge@imag.imag.fr (Serge Rouveyrol) (06/19/89)
On Xinu it is impossible to use the value of the priority in an application
( if (getprio() < value) { ......} or if(resume (...) < value) {...})
because the premption of the process can reach and a chprio() can be
executed by the new process.
This problem can be resolved with two new system_call with the next
specification:
enter_region()
exit_region()
- A process after the execution of the system_call enter_region()
is not preemptible until the execution of the system call exit_region().
- In a region all the system call who can give a waiting state are forbidden.
- After the execution of enter_region the process with the biggest priority
is executed.
- When a process is in a no_premptible state only the interruption
routine can interrupt the process => chprio () must never used in a
interrupt routine.
Then we can write :
enter_region()
if (getprio() < value) {........}
exit_region()
ps) Monsieur Comer quand trouvera-t-on vos livres traduit en Fancais ?
--
"Les jours de pluie ... etc ... "
serge@imag.imag.fr serge@imag.UUCP uunet.uu.net!imag!serge
Rouveyrol Serge,Laboratoire L.G.I,BP 53,38041 Grenoble , CEDEX , FRANCE