kernel driver vs userspace program

Simon turner25 at gmail.com
Thu Jan 31 13:38:07 EST 2013


Hi guys,
  I'm building an electrical device which will be controlled by
computer.  It will have an embedded microcontroller and will use USB
to communicate with the PC.  I believe this calls automatically for a
device driver, correct?  And for using the machine from the PC,
interacting with it, that calls for a userspace program, correct?  I
mean, doing things differently, such as all in userspace or all
in-kernel, would be bad form, right?

  My question is in case the machine is used in an industrial context
where there is really only one usage and one kind of interaction that
follows a pre-determined procedure (therefore totally automated).
This could give extremely high priority of execution, I guess.
Similar to a factory robot controlled by a computer.  Would it make
more sense to have everything in kernel space, while the userspace (if
any) would only serve the purpose of reporting?

  To be a lot more general, I find it simple at first glance to
understand what goes where between kernel and user space.  But despite
this, I often find myself in a gray zone (to my perspective) or I find
myself trying to "fit" something I feel is the wrong place.  I would
need to read more on the philosophy of these different processing
spaces, about the design behind them and the usage this philosophy
prescribes.  Anyone know where I could read about this in greater
detail?

Thanks,
  Simon



More information about the Kernelnewbies mailing list