Re: How does timeslice affect kernel threads?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Therefore, here is my question. Does timeslice have any effice on
> kernel threads? and how?

not at all really...

(well technically if you enable kernel preemption it can, assuming you
don't take locks or disable preemption inside your thread)

so 
1) don't do busy wait 
2) don't do busy wait
3) if you do long loops anyway, put in a cond_resched() in key places to
voluntarily give up the cpu when needed



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux