On Saturday 29 October 2016 14:20:34 Jon Elson wrote:

> On 10/28/2016 09:41 PM, Jon Elson wrote:
> > This is why I keep popping up with asking about
> > externally-triggered RT threads, which should relieve all
> > the Pico Systems boards from the RT latency issue.  I
> > don't mind doing some work on this, especially testing and
> > verification, but I'm not sure I'm competent to dive into
> > rtapi to try to do it myself.
>
> OK, I did a little reading of the code, to get some sense of
> how much needed to be changed in rtapi superstructure for
> externally-triggered threads.
>
> First, you'd need to change emc/motion/motion.c to accept
> parameters that defined an interrupt rather than a time in
> ns for the thread. It would then need to pass this info to
> hal/hal_lib.c function hal_create_thread() to actually
> create the RT thread based on that interrupt #.  One would
> want to make this flexible enough to handle interrupt
> numbers for not only the PC but ARM processors, too.
>
> hal_create_thread() has a lot of code in it to regularize
> the thread period, make it an integral number of timer
> ticks, make other threads multiples of the fastest thread,
> and so on.  All of this would be "broken" by
> interrupt-scheduled threads.
>
> At this point, I'd have to do a lot more reading to figure
> out how the rtapi functions do what they do.
>
> Any comments?
>
> Jon

One avenue to look at, since the execution time of the load is largely 
unk, would be to, when everything has been done, sample the raw time, 
compare that to what it was when this execution cycle started, subtract 
to get the time actually used, and sub that from the desired loop time, 
and put yourself to sleep until the next scheduled wake up time.

Close to 30 years back up the log, when we were generating lots of a tv 
stations graphics on amiga's, one thing the amigados did not have, was a 
working cron, and we needed one, badly. We downloaded a couple of them, 
but they both busy-waited, sucking up 98% of the cpu.  I had by then, 
become fairly familiar with ARexx as it was hooked into the system 100 
times better than we could do even in C. So Jim Hines wrote the first 
code, and I fine-tuned it by insisting on it sleeping until the top of 
the next minute. This was wildly successful, and cpu load meters 
couldn't find it so we had 99.9% of the cpu available to do work, like 
firing up LightWave to render a couple hundred frames of a commercial 
due to air the next day, putting the machines to work after the evening 
news had been put to bed and 90% of the personell had boogied.

We did have to break a few fingers on the night crew though, they hadn't 
a clue those machines were cash cows, not to be disturbed by their 
watching porn.

But its a thought, probably by now an old way of doing it. But 30 days 
after we published EzCron on AmiNet, most of the production machines on 
the planet had pulled it, put it on their machines and sent us thanks.  
Our 15 minutes of fame. :)  As for ARexx, William Hawes wrote that for 
commode door, they sold a pile of it at $40/copy, but bill never saw a 
dime of it, and I still hate commode door over that.  When I switched 
from a big box Amiga to a linux box running red hat 5.0 in about 1998 or 
9, the first thing I did was download and install Regina, which was 
supposed to be equ to IBM's Rexx. But the system stuff we had used to do 
all our magic with, simply wasn't there, so about 80% of what we were 
doing never got past line 2 before Regina upchucked and died. Totally 
worthless to us as a language.

Your trivia factoid for the day.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to