linux 内核抢占和调度,linux26进程调度器和内核抢占(Linux26 process scheduler and kernel preemption).doc...

linux26进程调度器和内核抢占(Linux26 process scheduler and kernel preemption)

linux26进程调度器和内核抢占(Linux26 process scheduler and kernel preemption)

Linux26 process scheduler and kernel preemption

New scheduler

The 2.6 version of the Linux kernel used by the new scheduler algorithm developed by IngoMolnar, called O (1) algorithm, it performs extremely well under high load, and when there are many processors can scale well.

In the 2.4 scheduler, after the timeslice recalculation algorithm requires that all processes exhaust their time, their new timeslices can be re calculated. So in a lot of processors in the system, when the process time slice to run out of them after waiting for retry (in order to get the new time slices), resulting in most of the processor is in the idle state; it will affect the efficiency of SMP. In addition, when the idle processor begins execution of that time has yet to be exhausted in a wait state process (if their own processor is busy), causes the process began to jump between the processor "". When a high priority process or interactive process jumps, the performance of the overall system is affected.

A new method to solve the problem of the scheduler is based on the CPU distribution to each time slice, and the abolition of the global synchronization and retry cycle. The scheduler uses two priority arrays, active arrays and expired arrays, which can be accessed by pointers. The active array contains all the tasks that are mapped to a CPU and the time slice is not exhausted. The out of date array contains an ordered list of all the tasks that a time slice has run out of. If the time slice all activities have been exhausted, then the pointer to the two array swap, the expired array (including ready tasks) becomes the active array, and an array of activities to become the new empty array contains the overdue task. The index of an array is stored in a 64 bit bitmap, and it is easy to find the highest priority task.

The new scheduler no longer has a big runqueue_lock. It maintains a running queue / lock mechanism for each

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值