标签(空格分隔): linux子系统 时间子系统
http://cloudtech.iteye.com/blog/1712676
http://blog.csdn.net/lijzheng/article/details/23001783
http://blog.csdn.net/droidphone/article/details/7975694
纠正:
mslee会受到HZ配置的影响,即msleep(1)不一定是1ms也有可能是10mas,详细见内核节拍的说明
看看sleep的实现:
static inline void sleep(unsigned sec)
{
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(sec * HZ);
}
sleep实际是schedule_timeout HZ 时长,单位是HZ,所以HZ的时间决定了sleep的基本睡眠单位
linux kernel将timer类型的硬件抽象成两个组件,一是free running的counter,另外一个是指定的counter值上产生中断的能力
tick device可以工作在两种模式下,一种是周期性tick模式,另外一种是one shot模式。one shot模式主要和tickless系统以及高精度timer有关