Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #28476
| From | upsidedown@downunder.com |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: How to avoid a task not executed in a real-time OS? |
| Message-ID | <pkbd4epoqn12gd2p5113gpuagp43jca8ia@4ax.com> (permalink) |
| References | <f2f8fe2e-e554-4a13-b28c-b918604405fd@googlegroups.com> <wRn1E.103457$Q95.22562@fx41.iad> |
| Date | 2019-01-22 08:05 +0200 |
| Organization | Elisa Customer |
On Mon, 21 Jan 2019 13:05:15 -0500, Richard Damon <Richard@Damon-Family.org> wrote: >On 1/21/19 7:40 AM, Robert Willy wrote: >> Hi, >> I was asked the question in the title some time ago. I had some real-time >> embedded system experience but with RTOS. A watch-dog can avoid a task not >> called in a real-time system. But in a RTOS, what is the right answer for it? >> I knew task priority, a timer triggered event all can influence a task execution. >> But they didn't look like the correct answer. What is the right answer do you >> think? >> >> Best Regards, >> > >If you question is how to make sure that every task gets the time it >needs within it required time limits, in general this is impossible, as >if you mis-design your system, you may end up with 110 units of work to >do in 100 units of time, which is fundamentally unsolvable. > >Different RTOSes have different scheduling methods, mostly in a few >standard technologies. > >If you have an RTOS with strict execution priorities, then the only >thing that can keep a current task from getting the CPU to try and meet >its deadlines are task with higher priorities (or there is a case where >lower priority tasks might hold resources needed). If you can >characterize and limit the time that those higher priority tasks might >consume, then you can come up with some gaurentees for execution of that >task. There are some simple rules of thumb that I have used successfully for decades. 1.) Analyze your task and find out which priorities can be _lowered_ without harming the total system performance. In this way, the few higher priority tasks should have plenty of execution time, without constantly fighting with low priority tasks for CPU time. 2.) The higher the priority, the shorter the execution time should be. Treat the highest priority tasks like "pseudo interrupts". Move any non-hard-RT functions into the null task, which can consume all CPU time after all high priority tasks have ben served. 3.) If some task takes too long to execute for its priority, consider splitting the functionality into two task, less time critical things to a lower priority task (or even null task) and the essential things into a small high priority task. 4.) Avoid uncontrolled resource locking. If some resource needs to be locked, use a dedicated high priority transaction handler task with well defined execution time to handle the transaction from beginning to end. > >Another method sets priorities based on how close the task is to its >deadline, which as long as no other tasks have fallen behind their >deadline (if past deadline is given priority) should get some time as >the deadline approaches. > >You can also create ad-hoc solutions where some high priority task >periodically adjusts priorities to try and make sure a given task gets >the time it needs (normally an indication that something wasn't designed >right the first time).
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to avoid a task not executed in a real-time OS? Robert Willy <rxjwg98@gmail.com> - 2019-01-21 04:40 -0800
Re: How to avoid a task not executed in a real-time OS? John Speth <johnspeth@yahoo.com> - 2019-01-21 06:27 -0800
Re: How to avoid a task not executed in a real-time OS? Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-01-21 17:55 +0100
Re: How to avoid a task not executed in a real-time OS? Richard Damon <Richard@Damon-Family.org> - 2019-01-21 13:05 -0500
Re: How to avoid a task not executed in a real-time OS? upsidedown@downunder.com - 2019-01-22 08:05 +0200
Re: How to avoid a task not executed in a real-time OS? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2019-01-21 22:44 +0100
Re: How to avoid a task not executed in a real-time OS? David Brown <david.brown@hesbynett.no> - 2019-01-22 09:19 +0100
Re: How to avoid a task not executed in a real-time OS? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2019-01-22 22:10 +0100
Re: How to avoid a task not executed in a real-time OS? Dave Nadler <drn@nadler.com> - 2019-01-22 13:28 -0800
Re: How to avoid a task not executed in a real-time OS? David Brown <david.brown@hesbynett.no> - 2019-01-23 08:57 +0100
Re: How to avoid a task not executed in a real-time OS? Paul Rubin <no.email@nospam.invalid> - 2019-01-23 13:13 -0800
Re: How to avoid a task not executed in a real-time OS? David Brown <david.brown@hesbynett.no> - 2019-01-24 08:31 +0100
Re: How to avoid a task not executed in a real-time OS? George Neuner <gneuner2@comcast.net> - 2019-01-22 05:01 -0500
Re: How to avoid a task not executed in a real-time OS? StateMachineCOM <statemachineguru@gmail.com> - 2019-01-28 07:17 -0800
Re: How to avoid a task not executed in a real-time OS? "A.P.Richelieu" <aprichelieu@gmail.com> - 2019-01-28 20:15 +0100
Re: How to avoid a task not executed in a real-time OS? StateMachineCOM <statemachineguru@gmail.com> - 2019-01-28 12:31 -0800
Re: How to avoid a task not executed in a real-time OS? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-01-28 16:22 -0500
Re: How to avoid a task not executed in a real-time OS? Clifford Heath <no.spam@please.net> - 2019-01-29 10:17 +1100
Re: How to avoid a task not executed in a real-time OS? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-01-29 10:08 -0500
Re: How to avoid a task not executed in a real-time OS? StateMachineCOM <statemachineguru@gmail.com> - 2019-01-29 09:30 -0800
Re: How to avoid a task not executed in a real-time OS? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-01-29 18:22 +0000
Re: How to avoid a task not executed in a real-time OS? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-01-29 13:50 -0500
Re: How to avoid a task not executed in a real-time OS? Clifford Heath <no.spam@please.net> - 2019-01-30 09:45 +1100
Re: How to avoid a task not executed in a real-time OS? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-01-30 00:56 +0000
Re: How to avoid a task not executed in a real-time OS? Reinhardt Behm <rbehm@hushmail.com> - 2019-01-30 13:32 +0800
Re: How to avoid a task not executed in a real-time OS? "A.P.Richelieu" <aprichelieu@gmail.com> - 2019-01-30 19:07 +0100
Re: How to avoid a task not executed in a real-time OS? StateMachineCOM <statemachineguru@gmail.com> - 2019-01-30 12:31 -0800
Re: How to avoid a task not executed in a real-time OS? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-01-30 16:23 -0500
Re: How to avoid a task not executed in a real-time OS? "A.P.Richelieu" <aprichelieu@gmail.com> - 2019-01-31 06:05 +0100
Re: How to avoid a task not executed in a real-time OS? kegs@provalid.com (Kent Dickey) - 2019-02-02 10:44 -0600
Re: How to avoid a task not executed in a real-time OS? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-02-02 12:19 -0500
csiph-web