NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Hard Real-Time?



On 2020-04-15 22:14, Michael Cheponis wrote:
Is there already a way to do "hard real time" on NetBSD?

To me, "hard real time" means from an external pin going 'high' to the 1st instruction of my driver executing is on the order of (up to) 10 usec.

Many eons ago, I did this on BSD4.3 VAX 785 and achieved <  about 100 usec jitter.  It was a Royal Pain to do, since so many places in the kernel turned off interrupts as it massaged various data structures. The pain was to find every one of those and break them down to absolutely minimize the time interrupts were turned off.

But it worked:  Here it is controlling various hopping machines: https://www.youtube.com/watch?v=mG_ZKXo6Rlg&feature=youtu.be&t=34 ; I'm sitting controlling the thing; the umbilical goes back to a UNIBUS interface in the VAX.  Timesharing only slowed down; it did not stop during operation.

I'm especially interested in getting the RPi to operate 'hard real time' on NetBSD.  I mainly want to use the RPi to control a robot -- low level as well has higher-level planning/control.

I wish that people would stop coming up with their own definitions for well established terms.

Hard real time is a well established term, and it don't mean what you think. It's not about any absolute number at all, but about the predictability, or in another way, the consequence of missing a deadline (see https://en.wikipedia.org/wiki/Real-time_computing#Criteria_for_real-time_computing). Essentially, a hard real time system guarantees that it never takes longer than some specified time for something to happen. And as far as I know, NetBSD cannot give such guarantees. Various combinations of events and situations can lock out interrupts for some time, and there is no guaranteed upper bound to that time.

That said, I am sure that if you just want it to usually work, then I'm pretty sure NetBSD can do it well enough.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index