The Linux Scheduler And How It Handles More Cores

Sometimes you read an article headline and you find yourself re-reading it a few times before diving into the article. This was definitely the case for a recent blog post by [The HFT Guy], where the claim was made that the Linux kernel has for fifteen years now been hardlocked into not scheduling for more than 8 cores. Obviously this caused a lot of double-checking and context discovery on both Hacker News and the Level 1 Techs forum. So what is going on exactly? Did the Linux developers make an egregious error more than a decade ago that has crippled Linux performance to this day? Continue reading “The Linux Scheduler And How It Handles More Cores”

MSP430 Scheduler

Multitasking On The MSP430F5529 LaunchPad

What exactly is multitasking, scheduling, and context switching? This is a great question for those interested in understanding how operating systems work, even small real-time operating systems (RTOS). [Jeffrey] had the same question, so he built a multitasking scheduler for the MSP430F5529 LaunchPad.

These topics are some of the most difficult to wrap your head around in the embedded world. Choosing a project that helps you understand tough topics is a great way to learn, plus it can be very rewarding. In his post, [Jeffrey] goes over the basics of how all of these things work, and how they can be implemented on the MSP430. Overall, it is a great read and very informative. For more information on RTOS, check out a few sections in the FreeRTOS book. Be sure to see his code in action after the break.

[Jeffery] was nice enough to release all of his code as open source, so be sure to check out his repository on GitHub. “Feel free to use it and learn more. I have made the code self explanatory. Enjoy!”

via [43oh.com]

Continue reading “Multitasking On The MSP430F5529 LaunchPad”

Task Scheduler For Arduino

For their recent high altitude balloon project LVL1 member [Brad] programmed a pretty complicated brain based on an Arduino. It was responsible for collecting data from all of the sensors, and reporting back in a few different ways. One of the things he did to simplify the project was develop a task scheduler for the Arduino board. It lets you add functions to a queue of jobs, along with data about when they should be run.

The task scheduler does make coding a bit easier, but where it really shines is in situations like this where you don’t have access to the hardware if there’s a problem. In his description of the scheduler [Brad] mentions the possibility that one of the sensors could fail as the cold of the upper atmosphere takes its toll. This could leave the whole system stuck in a subroutine, and therefore it will stop sending reports back to the team on the ground. Since he was using the task scheduler it was a snap to add watchdog timer servicing to the mix. Now if program execution gets stuck the watchdog will reset the chip and all is not lost.

[Thanks  JAC_101]