2.7 Time Slicing

Time slicing is a natural product when an RTK supports round robin multithreading and preemption. Time slicing typically relies on software events that occur periodically (such as timer interrupts) to provide a timing basis. When a simple logic detects that a thread has been `hogging' the processor for more than a certain amount of time, it invokes the preemption logic to take control from the `hogging' thread and let the next thread start/restart execution.

Time slicing ensures that even if threads do not voluntarily yield to others, processor resources will still be fairly distributed among threads of the same priority.



Copyright © 2008-10-25 by Tak Auyeung