NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Sched_DEADLINE

Solved!
Go to solution

Hi, does anyone know if the current version of NI Linux RTOS has SCHED_DEADLINE available for RT scheduling?.. I'm currently using a cRIO-9068 with the 2014 version of everything and I only have the options for FIFO, RR and OTHER.

If not, is there any movement towards incorporating it into future releases???

Thanks!

Message 1 of 9
(5,340 Views)

Yeah ..Iam also looking for the same...Do we have a scheduler to schedule our loops in RT target?.

0 Kudos
Message 2 of 9
(3,902 Views)
Solution
Accepted by topic author rock_2828

@rock_2828: Yep we're quite interested in this scheduler option too. It should be available in targets that have kernel 3.14 or later, which would include the cRIO-9068 as of LVRT 2015. I just ran quick tests with the rt-app utility and the "minimal main" referenced at https://www.kernel.org/doc/Documentation/scheduler/sched-deadline.txt and it appears to have worked, although I didn't investigate to confirm it actually did the right thing, just that it ran without errors on my cRIO-9030 with the 2015 stack.

0 Kudos
Message 3 of 9
(3,902 Views)

@Rameshs: there are of course several other schedulers available as well. When you ask "do we have a scheduler to scheduler our loops in RT target", there are a lot of ways to answer that question! Are you working within LabVIEW RT, or using your own program in another language? In LVRT there are a couple of different schedulers available, depending whether you code in timed structure or not. Outside of LVRT, as rock_2828 mentioned, there are 3 scheduling policies available prior to kernel 3.14, and a 4th policy as of 3.14 or later, as seen in the link referenced in my post above.

0 Kudos
Message 4 of 9
(3,902 Views)

Thanks @ScotSalmin... As I'm still new-ish to the RT Linux environment, what do I need to do to acquire this functionality?.. Do I need to just update LV, LVRT and and LVFPGA to 2015 and i'll have what I need, or do I actually need to update the NI Linux RTOS running on the target itself? (via the Update Firmware option in MAX, or some other way?)

Thanks again

0 Kudos
Message 5 of 9
(3,902 Views)

The OS itself is part of what we call the Base package. Base gets updated automatically when you update LVRT to a newer version using MAX's Add/Remove Software on your remote system. (LVRT and Base go together 1:1 if you use a Recommended Software Set. If you use a custom install, you always get the newest available Base, so LVRT can be older than Base, but not newer.)

Message 6 of 9
(3,902 Views)

Hey @ScotSalmon, so I've updated everything to 2015 and have LVRT2015 running on my cRIO-9068 but now I cannot figure out how to get (I think) the proper toolchain to get the updated includes that have deadline as an option..

I'm programming my FPGA in LV and using the C API generator to get the header files to do my RT code in C/C++. All that works perfectly fine, but when I create a new project in Eclipse (LUNA) and select CrossGCC, i put in "arm-nilrt-linux-gnueabi-" as my prefix and send the path to the proper folder "..\armv7a-vfp-neon-nilrt-linux-gnueabi" (I KNOW THIS IS FOR THE 2014 STACK, I CAN'T FIND AN EQUIVALENT ONLINE FOR THE 2015 STACK, this step taken from http://www.ni.com/tutorial/14625/en/)  and I'm basically back to where I was before. How do I get the new includes which have a sched.h that has SCHED_DEADLINE as a defined option?! Is there a 2015 version of the toolchain that I cant find? Am I somehow thinking about this wrong???

Thanks a bunch

0 Kudos
Message 7 of 9
(3,902 Views)

Hey rock_2828,

We did not create a toolchain to accompany the 2015 LVRT OS release. The 2014 C/C++ Development Tools and standalone toolchains (gcc 4.7.2 based) are supported on both the 2014 and 2015 NI Linux Real-Time OSs. Refer to the Description section on this page for more details on supported versions.

http://www.ni.com/download/labview-real-time-module-2014/4846/en/

The getting started document you reference which defines the path and prefix isn't super clear on this. I'll will update it to make things more clear.

Tim A.
0 Kudos
Message 8 of 9
(3,902 Views)

SCHED_DEADLINE is #define'd to 6, so if we don't have a sched.h where it's defined in the toolchain, you could just define it. Another option: internally, I often just use the on-target toolchain (easier for some use cases) and that one does have SCHED_DEADLINE in sched.h, if you opkg install linux-libc-headers-dev:

admin@scot-9068:~# grep DEAD /usr/include/linux/sched.h

#define SCHED_DEADLINE          6

0 Kudos
Message 9 of 9
(3,902 Views)