Scheduling Policy

自闭症网瘾萝莉.ら 提交于 2019-12-12 02:47:41

问题


While working on an embedded project; during changing of the scheduling policy from SCHED_OTHER to SCHED_RR I am getting timer issues and stream loading delays. Some issues are not coming during SCHED_OTHER but arriving at SCHED_RR(round robin).

What effect will occur while changing the scheduling policies. What do I need to take care of when implementing kernel module in embedded projects during policy changes?


回答1:


SCHED_RR is with a time slice so if the process completes the time slice the next process will be on turn. If you your time slice is big enough the short IO Processes will get a disadvantage over the Cpu, because the cpu task blocks the CPU for the complete time slice. But care if you reduce the time slice you will get more context switches and so less performance for this higher responsibility. I also provides Priorities.

SCHED_OTHER is not like RR and so don't provide static priorities. It has one dynamic priority which will increase if the process is ready to run but in the waiting queue. Its will be reset to 0 if the process becomes active. You also can scale the dynamic value with nice from -20 to 19 (on 19 the process is nice and waits more often)

I mostly used SCHED_OTHER and SCHED_FIFO in embedded systems

best regards Kenny



来源:https://stackoverflow.com/questions/9324593/scheduling-policy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!