It was thus said that the Great Richard Erlacher once stated:
You may find that your multitasking effort works better if you don't accept
a time-slice when it's offered unless you're ready for it. Many times
(particularly with the rather slow disk I/O, etc) you are I/O bound or
waiting for another process to complete, it's better all around if you give
back the time-slice if you can't use it. If the time slice is small (e.g.
1/60 sec or so) it won't matter so much, but if it's long, i.e. 1/10 sec, or
so, you may want to avoid wasting it.
Generally in a multitasking system with timeslicing, there are two queues
(or lists)---one for processes that are running, and another one for
processes that are waiting for something (usually I/O to complete). The
code that manages the tasks take the next task on the run queue and
dispatch it.
When an event one of the processes on the wait queue has happened, it is
then moved from the wait queue to the run queue. When a process makes a
request that may take awhile, it is then moved from the run queue to the
wait queue. There is no need for the process to give up its slice if its
waiting for something---all that happens in the system.
-spc (Have compiler, will program)