how high-priority thread allow other thread
What must a high-priority thread do when it needs to perform a critical operation once every five seconds, but which still allows other threads to get CPU time?
Reduce its priority using the setPriority() method.
Use the Thread.sleep() method to relinquish control of the CPU.
Add all the other threads into its own ThreadGroup.
Use the notifyAll() method to increase priority of other threads.
Put its critical code in a Timer object.