This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4378: Non-interruptable function

Part Number: AM4378


Tool/software: Linux

Dear sir,

What I want to do is to create two functions. 'A' function is running at every 1 msec period of time and 'B' function is running at 8 msec period of time.

The execution time for both functions, of course, will be much less than the expected time.

The condition for 'A' function is non-interruptable by any other event, such as keyboard, ethernet, or any thread.... The 'B' function is interruptable by previously stated events .

Is there any way to implement the above goal in linux system ?  

Your response will be highly appreciated, Thank you.

Best regards,

Rechard 

  • Hi,

    This is a broad question concerning RT Linux applications development. The only answer I can give answer is a maybe, the above goal you mentioned "should be" achievable. You will need to do some research on perform some experiments on the RT version of the TI Linux SDK to verify what you want to do.

    The condition of uninterruptible for function A will depend on how it is implemented in terms of thread scheduling policy and priority. But you will be able to "schedule" the threads on a time basis. Please note that scheduling on a time basis is not a guarantee of an exact time of execution start. The kernel will schedule the time based thread but system loading at the timer expiration will always add latency from the time was scheduled to run and the actual running of the thread. This overall system latency may or may not impact the requirements of Function A. So the question to consider is if the worst case measured system latency for the use case is 100uS, will function A still be within requirements if it starts in a worst case scenario 100uS after it was scheduled to run.

    I would recommend the following research areas if you are unfamiliar with RT Linux:

    - Writing applications for RT Linux, here you will looking at creating threads, thread scheduling techniques and scheduling policies priorities. You will want to look for thread examples using SCHED_FIFO .

    - Researching SCHED_FIFO threads running "above the kernel", this could help with the function A requirement

    - Reviewing POSIX APIs

    - Using cyclictest to understand the system loading for a particular system use-case

    - Look at the source code for cyclictest

    Best Regards,
    Schuyler