摘要
进程调度是多任务操作系统的核心。Linux中的每个进程用task_struct结构来描述,进程调度的依据是task_struct结构中的policy、priority、counter和rt_priority。Linux根据policy将进程划分为实时和普通两类,普通进程采用动态优先调度,实时进程采用基于优先级的FIFO调度和多级反馈轮转调度。函数schedule()是实现进程调度的函数,它通过调用函数goodness()来选择最值得运行的进程获得CPU。2.6内核的0(1)调度算法及其他快速响应策略更加适合实时环境。
The process schedule is very important to the multi-task operating systems. The Linux scheduling policy is based on four fields, including policy, priority, counter and rt_priority, of a task_struct type structure, which plays the role of a single process descriptor. There are two kinds of processes determined by the field policy, the real-time processes to which a First-In, First-Out or A Round Robin scheduling is applied, and the non real-time processes, to which a dynamic priority scheduling is applied. The schedule( ) function implements the scheduler by invoking the goodness( ) function to identify the best candidate among all processes in the runqueue list, The O( 1 ) scheduling algorithm and the improvement on response time in the 2.6 kenel can be used in the real-time environment.
出处
《中国西部科技》
2007年第3期1-3,共3页
Science and Technology of West China