https://iattendance.co -
Simple and easy way to manage staff or visitor attendance, inventory...
https://neonplatform.com -
One platform for all IoT devices.
Tuesday, May 1, 2012
Comparing the real time scheduling policies of the Linux kernel and an RTOS
Good job in comparing Linux scheduling policies. I just have a few feed backs on some of the statements you mentioned in the article.
"In the RTOS scheduler, Thread1, with higher priority, always runs. Thread2 with lower priority never has a chance to run"
If you use rate-monotonic scheduling and if all your task loads never push the CPU to 100% then thread2 will eventually run. A thread in an RTOS while it is being the highest priority, it will generally run until completion then it switch out the context, thread stack, and CPU time to the lower priority thread. The rate-monotonic scheduling ensure that there will be CPU time allocated to other lower priority threads.
Checkout page 36, slide 2-8 in this document. http://read.pudn.com/downloads91/doc/fileformat/351051/StudentGuide.pdf
Good job in comparing Linux scheduling policies. I just have a few feed backs on some of the statements you mentioned in the article.
ReplyDelete"In the RTOS scheduler, Thread1, with higher priority, always runs. Thread2 with lower priority never has a chance to run"
If you use rate-monotonic scheduling and if all your task loads never push the CPU to 100% then thread2 will eventually run. A thread in an RTOS while it is being the highest priority, it will generally run until completion then it switch out the context, thread stack, and CPU time to the lower priority thread. The rate-monotonic scheduling ensure that there will be CPU time allocated to other lower priority threads.
Checkout page 36, slide 2-8 in this document.
http://read.pudn.com/downloads91/doc/fileformat/351051/StudentGuide.pdf
Keep up the good work with your blogs.
Regards,
Sy Tran
Thanks for your comments.
ReplyDeleteUnless highest priority task gives up controlling CPU ( wait for event, for example...), then there is no chance to it moving out off the context.
A task usually is designed to run on an endless loop, so there is no "completion" concept except you intend to do it but it is unusual design.
Regards