printk("Scheduling in interrupt\n"); www.51kaifa.com
/*是的话则打印错误提示,退出调度器*/
BUG();
}
release_kernel_lock(prev, this_cpu); /*释放全局内核锁和全局中断锁*/
sched_data=&aligned_data[this_cpu].schedule_data;
if (unlikely(prev->policy == SCHED_RR))
if (!prev->counter) {
1/2 12下一页尾页
prev->counter= NICE_TO_TICKS(prev->nice);
move_last_runqueue(prev);
}
switch (prev->state) {
case TASK_INTERRUPTIBLE:
/*此状态表明进程可以被信号中断*/
if (signal_pending(prev)) {
/*如果该进程有未处理的信号*/
prev->state= TASK_RUNNING; break;
}
default:
del_from_runqueue(prev);
case TASK_RUNNING:;
}
prev->need_resched = 0;
repeat_schedule: /*缺省选择空闲进程*/
next = idle_task(this_cpu);
c = -1000;
list_for_each(tmp, &runqueue_head) {
p = list_entry(tmp, struct task_struct, run_list);
if (can_schedule(p, this_cpu)) {
/*寻找优先级最高的那个进程*/
int weight=
goodness(p, this_cpu, prev->active_mm);
if (weight > c)
c = weight, next = p;
}
}
if (unlikely(!c)) {
/*若处于运行队列中的进程没有可调度的,那么得重新分配时间片*/
struct task_struct *p;
for_each_task(p)
p->counter = (p->counter >> 1) + NICE_TO_TICKS(p->nice);
goto repeat_schedule;
}
sched_data->curr = next;
task_set_cpu(next, this_cpu); www.51kaifa.com
if (unlikely(prev == next)){
/*如果选中的进程和原来运行的进程是同一个*/
prev->policy &= ~SCHED_YIELD;
goto same_process;
}
kstat.context_swtch++;
/*全局统计进程上下文切换次数*/
prepare_to_switch();
/*准备进行进程切换*/扁平线圈电感制造厂
关于N沟道MOSFET做双电源切换方案有没有人做过使用N沟道MOS管做开关,实现的功能:电池和适配器两路电源供电,一般使用适配器供电,在户外时使用电池供电,两种电源都有时选择适配器供电,使用N沟道mosfet作为开关,要求m
电网调度自动化系统安全运维管理探讨 电网调度自动化系统安全运维管理探讨来源:朱国庆发布时间:2015-01-23分类:[杂志期刊] 关键词:调度自动化;安全生产;隐患排查;运维管理一、电网调度自动化系统的作用随着微电子技术、计算机技术和通信技术的发展,电网生产运行管理进入到新的层次,对电网调度自动化系统的安全运维管理也提出了更高要求
请问这个恒流源电路的确定基准电压后,怎么选取采
先设定好IC1-1正端输入的电压基准,再反算R7就可以了;或者先设定R7,根据流过R7的电流,可以计算出R7上的电压,再反推正向端的基准电压。
431的基準點是2.5V, 假設你VR1打到最大