statclock vs softclock

Bob Hall rjhjr0 at
Thu Jan 20 05:25:06 UTC 2011

I hope this is the correct forum. I'm reading The Design &
Implementation of the FreeBSD OS by McKusick & Neville-Neil, & I'm a
little confused about statclock( ) and softclock( ). According to the
book, statclock( ) ticks 128 times per second, and recalculates the
priority of the current process every four ticks. If the recalculated
priority is less than the current priority, it reschedules the process.

However, on the same page, the book says that softclock( ) recalculates
priorities once per second, and also reschedules processes.

I must not be understanding something, because it seems to me that the
book is saying that there are two routines doing the same thing and
getting in each other's way. Can someone straighten me out?

Thanks in advance.

More information about the freebsd-questions mailing list