Skip to content

Bug: sporadic scheduling does not work for multiple threads #2935

Description

@JanStaschulat

Hi,

I am using NuttX for micro-ROS on STM32 microcontroller on Olimex board. Link to example

which is a very simple extension of the NuttX example for sporadic scheduling in testing/ostest

Test setup:

Observation:

  • When I configure the application with one sporadic thread and one FIFO thread (with lower priority and 100% CPU utilization), budget enforcement works well.
  • When I configure the application with two sporadic threads and one FIFO thread (with lower priority and 100% CPU utilization) budget enforcement does not work any more. I tested the sporadic scheduling with different budget/period configurations: 10ms/100ms and 1second/10seconds (the internal tick - conversion was correct).
  • I saw also somewhere the requirement that the buget shall be at most half of the period, so I configured the budget always smaller then half of the period for all individual threads:
    • thread 1: 20ms/100ms
    • thread 2: 10ms/100ms

Problem description
I came to the conclusion, that budget enforcement of the NuttX sporadic scheduling only works for one sporadic thread.
For real applications, I would like to use multiple threads with sporadic scheduling.

Could you please check the implementation and give support?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions