Token timing question

Matthew Dillon dillon at apollo.backplane.com
Thu May 27 11:06:48 PDT 2004


:I have a question about tokens and time-slicing. Clearly when working with
:tokens you need to be aware that operations might block and perform a sanity
:check with the data upon returning from a might-block operation. However,
:what about time-slicing. When can a process be interrupted by the end of
:it's time-slice? How does a process know that this is happening? If someone
:could explain or at least point me to the right rtfm url, it would be greatly
:appreciated.
:
:Thanks,
:   Kyle.

    Code running in the kernel cannot be preempted except by an interrupt
    thread, so normal time slicing does not occur while running in the kernel.

    When a kernel thread is preempted by an interrupt, the tokens it holds
    remain held (the interrupt thread cannot release or reuse them).

    So what this means, generally, is that as long as a kernel thread does
    not specifically block, the tokens it holds will remain atomic.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list