You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "patacongo (via GitHub)" <gi...@apache.org> on 2023/07/06 02:26:54 UTC

[GitHub] [nuttx] patacongo commented on issue #9712: Help wanted for testing and improving real time performance :)

patacongo commented on issue #9712:
URL: https://github.com/apache/nuttx/issues/9712#issuecomment-1622860331

   >
   > Is there any document describing the design of real time mechanism in detail? I could search the key word `real time` from source code but these words seem scattered.
   >
   > I`d like to test the real time performance and try to improve it (I`ll try my best). I`ve learned from some papers that stress-ng could be the load to the system. Cyclictest and TACLe suits are usually used. Do i need to port these programs? Or are there already some test suits which could measure the real time performance?
   
   Nuttx was designed initially to support rate monotonic scheduling (RMS).  The system is relatively easy to add other real time schedulers, but no new real time schedulers have been added to the system.
   
   Rate monotonic scheduling refers primarily to how you prioritize you real time tasks, rather than to a type of scheduler.  In fact it assumes strict priority scheduling (SCHED_FIFO).  If you Google for "Rate Monotonic Scheduling" you can find lots of information about the algorithm so no additional documentation should be required.
   
   The responsibility of the RTOS for RMS are to support the underlying assumptions of RMS.  These _idealized_ assumptions are (https://en.wikipedia.org/wiki/Rate-monotonic_scheduling):
   
   - No resource sharing (processes do not share resources, e.g. a hardware resource, a queue, or any kind of semaphore blocking or non-blocking (busy-waits))
   - Deterministic deadlines are exactly equal to periods
   - Static priorities (the task with the highest static priority that is runnable immediately preempts all other tasks)
   - Static priorities assigned according to the rate monotonic conventions (tasks with shorter periods/deadlines are given higher priorities)
   - Context switch times and other thread operations are free and have no impact on the model
   
   These are all ideal and no real time system can meet all of the assumptions.  The biggest risk is the proliferation of locks, mutexes, and semaphores which destroy real time performance.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org