<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:large"><span style="font-family:arial,sans-serif;font-size:small">2015-02-26 21:53 GMT+08:00 Marco van de Voort </span><span dir="ltr" style="font-family:arial,sans-serif;font-size:small"><<a href="mailto:marcov@stack.nl" target="_blank">marcov@stack.nl</a>></span><span style="font-family:arial,sans-serif;font-size:small">:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
</span>No, basically a sleeping thread is marked in the scheduler as "do not schedule for nn<br>
ticks". The thread doesn't run to evaluate if it should contiue. That is the<br>
scheduler/kernel's task.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large;display:inline">That's even better. And the key point is, after nn ticks, it is **AUTOMATICALLY** re-scheduled,</div></div><div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large;display:inline">without the need of knowledge of other threads/processes running on the system!</div></div><div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:monospace,monospace;font-size:large">This is the effect of a thread voluntarily gives up its cpu share, but not let other thread to control its "fate". </div><br></div></div></div></div>