进程调度之进程切换

对于switch_to的理解:

push+jmp相当于call指令。差别是call将下一条指令自动压栈。但是进程调度结束时需要执行的下一条指令并不一定是是call的下一条指令。所以需要用push和jmp细分。

struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next))

FASTCALL代表寄存器传递函数参数

 

参考文章:

Linux进程调度——schedule()函数分析
https://blog.csdn.net/lsl180236/article/details/51155373

Linux内核下进程切换 (总结和其他博客都很好)
https://blog.csdn.net/xiaoxiaomuyu2010/article/details/11935393

linux 进程调度switch_to宏浅析+系统执行过程总结
https://blog.csdn.net/titer1/article/details/45289159

运行队列函数入队操作分析enqueue_task_fair
http://blog.chinaunix.net/uid-20729583-id-1884623.html

enqueue_task和dequeue_task源码分析
https://blog.csdn.net/conansonic/article/details/78203405

linux调度器(四)——主调度器与CFS
https://blog.csdn.net/wh8_2011/article/details/48311319

进程内核栈、用户栈
https://blog.csdn.net/bailyzheng/article/details/8015618

linux 内核的 switch_to原理
https://www.cnblogs.com/kkshaq/p/4433351.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值