Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #494816

Re: must-read book

Subject Re: must-read book
Newsgroups sci.electronics.design
References (3 earlier) <p5qonb$7am$1@dont-email.me> <esdgC.902745$qb2.742925@fx25.am4> <JsggC.40802$BX2.14857@fx22.iad> <2IggC.819193$Gr2.558777@fx36.am4> <l4f38dtqeu4bvfqiip99a4vg0punrr2fir@4ax.com>
From Tom Gardner <spamjunk@blueyonder.co.uk>
Message-ID <oYjgC.6265$w26.660@fx47.am4> (permalink)
Organization virginmedia.com
Date 2018-02-12 17:15 +0000

Show all headers | View raw


On 12/02/18 16:19, John Larkin wrote:
> On Mon, 12 Feb 2018 13:32:46 +0000, Tom Gardner
> <spamjunk@blueyonder.co.uk> wrote:
>
>> On 12/02/18 13:16, bitrex wrote:
>>> On 02/12/2018 04:51 AM, Tom Gardner wrote:
>>>> On 12/02/18 01:01, Les Cargill wrote:
>>>>> John Larkin wrote:
>>>>>> Many of them have no formal, or informal, training in CS or EE or
>>>>>> anything. I doubt that many know what a state machine is.
>>>>>>
>>>>>
>>>>> Unsurprising. Software people are very often blind to determinism in
>>>>> general.
>>>>>
>>>>> FSM are not a widely understood technique in software. God only knows
>>>>> why. Even the people who know about them often think they are always
>>>>> equivalent to regular expressions.
>>>>
>>>> I'll confirm that from personal experience. They may dimly remember FSMs as
>>>> being "something to do with compilers".
>>>>
>>>> Sigh.
>>>
>>> I know a fair number of degreed coders under the age of 30, even, and I'd
>>> say close to none of them don't know what a FSM is.
>>
>> I was surprised when I first came across such ignorance, since
>> before that all programmers I worked with knew FSMs and used
>> them where appropriate.
>>
>>
>>> They have their uses in specific domains, but also major downsides, the big
>>> ones are that they're not Turing-complete and don't really allow you to work
>>> with "high level" patterns or meta-programming, they scale poorly (number of
>>> required states balloons geometrically with linearly increasing problem
>>> complexity), they're difficult to synchronize in multi-threaded environments
>>> (how do I guarantee FSM #1 and FSM #2 which need to access the same resource
>>> without deadlocking will be in the appropriate states to do so,
>>> simultaneously?)
>>
>> System design :)
>>
>> But ignorance is more widespread than FSMs. I was unpleasantly
>> surprised at how many youngsters couldn't give a /simple/
>> pseudocode explanation of what happens at assembly level when
>> invoking a procedure with arguments. They had never looked to
>> see how the magic worked.
>>
>
> I've used and even written multitasking RTOS's, but we don't use
> multitasking in our (non-Linux) products. A main state-machine loop
> and some interrupt handlers is all we need.

Ditto, but nowadays I like to stay away from interrupts
(and caches) if I can, so as to preserve hard realtime
properties. (See my other posts about the many-multicore
XMOS xCORE processors and xC/Occam)


> My embedded programmer guy is great (and he's an EE) but he is
> reluctant to make things go fast. We have a power sinewave generator
> that uses software DDS on an LPC1768 (small ARM) and I want him to run
> the IRQ/DDS at 200 KHz, which seems modest to me. We'll add a scope
> test point to the existing code and see how long it actually runs.

Well, it is better to get it right but slow, rather
than fast but wrong.

With the XMOS toolchain you don't have to measure:
the IDE examines the optimised object code, and
states exactly how long each path takes down to
a 10ns resolution. The "dedicate a core to each
peripheral" approach means that "interrupt" latency
(really wakeup latency) is 1 clock cycle (10ns).


> Most programmers have no idea, not within 50:1, how long it takes a
> block of code to run.

With caches, interrupts, and NUMA memory, are
you /really/ surprised; I'd just say that was
good judgement :)


> I've done test point analysis of Linux systems too, to see how big of
> time slices the OS steals from apps. Measuring that is about the only
> way to estimate.

Agreed. And that's unsatisfactory in my eyes, since
you are unlikely to observe the worst case - and
therefore have to /guess/ how much of a frig factor
to add.

But I don't want linux near my peripherals; linux
is for USB/ethernet/monitors etc. My peripherals deserve
an RTOS or FSM, and messaging to/from linux :)

OTT? You betcha!

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-11 08:54 -0800
  Re: must-read book Cursitor Doom <curd@notformail.com> - 2018-02-11 17:33 +0000
    Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-11 11:51 -0800
      Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-11 16:52 -0500
        Re: must-read book Robert Baer <robertbaer@localnet.com> - 2018-02-15 22:58 -0800
          Re: must-read book krw@notreal.com - 2018-02-16 04:35 -0500
            Re: must-read book Robert Baer <robertbaer@localnet.com> - 2018-02-19 21:58 -0800
              Re: must-read book krw@notreal.com - 2018-02-20 16:00 -0500
              Re: must-read book Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> - 2018-02-21 16:14 +0000
          Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-16 08:53 -0800
            Re: must-read book Robert Baer <robertbaer@localnet.com> - 2018-02-19 22:00 -0800
      Re: must-read book Cursitor Doom <curd@notformail.com> - 2018-02-11 22:44 +0000
        Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-11 15:36 -0800
  Re: must-read book Les Cargill <lcargill99@comcast.com> - 2018-02-11 12:30 -0600
    Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-11 11:54 -0800
      Re: must-read book Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> - 2018-02-12 00:17 +0000
  Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-11 16:45 -0500
    Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-11 15:47 -0800
      Re: must-read book Les Cargill <lcargill99@comcast.com> - 2018-02-11 19:01 -0600
        Re: must-read book Tom Gardner <spamjunk@blueyonder.co.uk> - 2018-02-12 09:51 +0000
          Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-12 08:16 -0500
            Re: must-read book Tom Gardner <spamjunk@blueyonder.co.uk> - 2018-02-12 13:32 +0000
              Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-12 08:19 -0800
                Re: must-read book Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-02-12 11:42 -0500
                Re: must-read book Tom Gardner <spamjunk@blueyonder.co.uk> - 2018-02-12 17:15 +0000
                Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-12 09:40 -0800
                Re: must-read book Tom Gardner <spamjunk@blueyonder.co.uk> - 2018-02-12 19:34 +0000
                Re: must-read book John Larkin <jjlarkin@highland_snip_technology.com> - 2018-02-12 12:46 -0800
                Re: must-read book Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> - 2018-02-12 18:58 +0000
                Re: must-read book Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-02-12 21:14 +0200
                Re: must-read book John Larkin <jjlarkin@highland_snip_technology.com> - 2018-02-12 12:50 -0800
            Re: must-read book Les Cargill <lcargill99@comcast.com> - 2018-02-12 21:12 -0600
        Re: must-read book krw@notreal.com - 2018-02-13 18:08 -0500
          Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-13 18:34 -0500
            Re: must-read book krw@notreal.com - 2018-02-13 19:11 -0500
              Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-13 19:23 -0500
                Re: must-read book Les Cargill <lcargill99@comcast.com> - 2018-02-13 20:59 -0600
                Re: must-read book krw@notreal.com - 2018-02-13 22:21 -0500
                Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-20 20:31 -0500
                Re: must-read book krw@notreal.com - 2018-02-20 20:44 -0500
                Re: must-read book Clifford Heath <no.spam@please.net> - 2018-02-21 14:13 +1100
                Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-21 08:30 -0500
                Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-21 08:17 -0500
                Re: must-read book krw@notreal.com - 2018-02-21 08:27 -0500
                Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-21 08:53 -0500
                Re: must-read book Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-02-21 14:16 +0000
                Re: must-read book Les Cargill <lcargill99@comcast.com> - 2018-02-21 21:46 -0600
                Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-22 11:02 -0500
                Re: must-read book Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> - 2018-02-22 22:31 +0000
                Re: must-read book Les Cargill <lcargill99@comcast.com> - 2018-02-23 21:09 -0600
                Re: must-read book Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> - 2018-02-22 22:27 +0000
                Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-22 18:32 -0500
                Re: must-read book Chris <c@b.a> - 2018-02-23 14:23 +1100
                Re: must-read book Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> - 2018-02-23 04:57 +0000
                Re: must-read book Jasen Betts <jasen@xnet.co.nz> - 2018-02-21 05:48 +0000
                Re: must-read book Reinhardt Behm <rbehm@hushmail.com> - 2018-02-23 13:56 +0800
            Re: must-read book Les Cargill <lcargill99@comcast.com> - 2018-02-13 20:56 -0600
          Re: must-read book John Larkin <jjlarkin@highland_snip_technology.com> - 2018-02-13 15:37 -0800
            Re: must-read book krw@notreal.com - 2018-02-13 19:14 -0500
      Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-12 00:02 -0500
      Re: must-read book Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-02-13 14:11 +0000
        Re: must-read book tabbypurr@gmail.com - 2018-02-13 06:42 -0800
          Re: must-read book John Larkin <jjlarkin@highlandtechnology.com> - 2018-02-13 08:11 -0800
          Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-13 16:23 -0500
            Re: must-read book tabbypurr@gmail.com - 2018-02-13 14:54 -0800
              Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-13 18:22 -0500
                Re: must-read book tabbypurr@gmail.com - 2018-02-13 17:34 -0800
  Re: must-read book bloggs.fredbloggs.fred@gmail.com - 2018-02-11 15:37 -0800
  Re: must-read book bitrex <bitrex@de.lete.earthlink.net> - 2018-02-13 07:37 -0500

csiph-web