On May 5, 2021, at 9:55 AM, Øyvind Teig <oyvind.t...@teigfam.net> wrote:
> 
> Here is my cognitive test case. It is not 100% realistic, but it's just to 
> convey my point:
> hiPri is a disconnect message of a smoke detetector. loPri is a fire alarm. 
> If the disconnect hiPri is activated before (1 sec to 1 ns) or simulatenously 
> (same polling of "hw pins") as the alarm loPri there should be no alarm being 
> sent to the fire department. No emergency fire trucks. Not ever. There should 
> not be any case of some low probability where this may happen. However, if 
> the hiPri disconnect message was activated after the alarm, then it was too 
> late, and the alarm will go off. (Disconnect was because we knew that there 
> was going to be an alarm since we were doing something, and we explicitly did 
> not want the fire trucks to come)

Imagine that the latency between the device detecting a disconnect
signal and a user hitting a disconnect button is D ns while the fire
detection latency is F ns. So if D > F the device would raise the
alarm even if you implement it all in hardware! The only difference
between a Go implementation vs a hardware  one is the window size.
If you want to make it minimize it, Go is not the right solution.
For that, in H/W you'd probably *gate* the alarm line to the fire
department with the disconnect signal! But even so there is a small
window.

I think if you have a mix of hard and soft real time requirements,
where soft RT tasks can take a long time, you'd likely want priority
scheduling with preemption. IMHO Go is the wrong choice for that.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/73C1590D-F77A-4613-B522-3DFE1A3FA0BE%40iitbombay.org.

Reply via email to