Your buffer reading example is, I think a better example of soft real time. Typically the way this is done is not to trigger on "buffer full" but use a 70% threshold. My definition of "soft" means that it must be fast enough to get the work done but there is some room for when each part of the job needs to get done
"Hard" usesusaly has a numeric duration or rate requirement with a "small" tolerance. "Small is kind of imprecise and could be anything from milliseconds to nanoseconds. A good example of a hard real time requirement is closer to what we do here -- motion control. But also run a PID loop at 100 Hz or maybe to output analog signal at 48,000 samples per second to synthesize some waveform you need. What we have is the result of historic accident. EMC and machine control in general got its start when computers where EXPENSIVE. You design differently when you parts for five digit price tags than when you parts are nearly free. If computers cost $2 and two of them could fit on your thumbnail then you might just be inclined to use more of them. Off topic for a minute... (put I come back) A guy in Australia just posts the design files for a "cycloidic" reduction drive that is very simple to make even in a home shop, And at the same time electric motors from "drones" are so light and powerful, that if you place a propeller on the motor shaft the electric motor can lift 3X its own weigh hundreds of feet into the air. Motor like this come at every price pint starting at about $5, going up to about $60. These are very high performance motors for cheap. Combine the high-reduction cycloidic drive with a small low cost BLDC motor and you have a point for a robot arm (or leg) or a machine tool axis. Here is a model of one of these motor and all -- please try the "explode" button to see the insides of the drive. (The button turns the drawing into a parts diagram) https://a360.co/2KhamaI OK back to real-time... If these joints can be mades for not a huge amount of money then it is affordable to build a robot using 20 such joints. This would get is a basic quadruped animal, like a small dog. But now we have a 20 axis machine to control and it can't be pre-programed. I am looking at using one computer per joint -- that is 20 of them. Each one being small enough to fit INSIDE the joint housing. These computers are doing a very hard RT job. The MOSFET gates are driven by a pin from the processor and we commutate the BLDC motor in software. Switching coils on and off as the motor spins. Amazing what you can do when a 100 MHz 32-bit computer costs $2. and can fit inside a 25mm square aluminum tube. No plans to do this soon, the first step is to finish the CNC mini-mill conversion, then a single axis prototype. If it does not work out I will use the motors for a drone. There seem to be a number of people working on this On Sun, Jun 24, 2018 at 2:42 AM Nicklas Karlsson < nicklas.karlsso...@gmail.com> wrote: > On Sat, 23 Jun 2018 21:04:48 -0700 > "John Dammeyer" <jo...@autoartisans.com> wrote: > > > But we are still talking about a Multi-Tasking, Round Robin Priority > Driven > > OS right? Like 3 tasks with the same priority are time sliced with equal > > processing time? ... > > Ordinary real time scheduling with EDF as first choice which I never had > access to or rate rate-monotonic as second choice is what I prefer then > periodicity/priority is different and round robin for equal priority. > > I think an excellent example of a "hard" although not neccessary critical > real time process is to read data from some kind of serial receive buffer. > If dead line is set to buffer full and trigger then half full I think this > example will fit perfectly with the theory. In case hardware to trigger > real time process, usually an interrupt and pirority is available theory > will fit with practical implementation. > > > Inter task communication done with pipes. A task can > > suspend on a pipe until it's written to by another one. ... > > Round robin could be implemented with function calls and usual parameter > passing. For round robin any shared memory area will also work. In an > operating system this may be implemented as a list there functions which > should be called are stored. > > Different prioriority there tasks can interrupt each other is there > semaphores, mutexes, message passing in some form is needed. Could in some > cases be implemented with a shared memory area and write one in a shared > memory area to indicate then new data is available. > > > Nicklas Karlsson > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > -- Chris Albertson Redondo Beach, California ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users