Re: help regarding development of common interface of application with devices..

From: John Fusco (fusco_john_at_yahoo.com)
Date: 08/10/04


Date: Mon, 09 Aug 2004 22:29:56 GMT

You do know this is a Linux newsgroup right?

Assuming you are implementing this on Linux, the "global variable"
approach in Linux would be done via an mmap. The device driver could
mark this region uncacheable, which would help with the synchronization
issues, but not completely. Guaranteed synchronization would rely on
the application using msync() calls at the right times. Even then, the
instruction pipelines can confound your timing. It all depends on how
sensitive your application is to timing.

To hide this complexity from the application, you might want to consider
  using an ioctl interface, read/write call interface, or the proc
filesystem instead of mmap. These methods would allow you to perform
synchronization in the driver so the application doesn't have to deal
with it.

Regards,
John

nikhil bhargav wrote:

> hi all,
>
> I am developing on a small scale embedded project which is a course
> level modification of WDM system. We have a set of devices which read
> some parameters in their registers and store them. These parameters
> are read by application modules which look after aspects like
> Performance monitoring, Fault monitoring, configuration and error
> reporting. I am using Xinu based RTOS called XRTS.
>
> So far the interface between these device drivers and application code
> is not defined. Device driver have and application modules have
> defined common globla variables in which device driver writes
> information in say every 0.5 sec and application module reads in say
> every 15 sec. But in this approach thee is no security and
> synchronization.
>
> I am looking for a better implementation i.e. a common interface which
> I could use for all devices. It should provide security,
> synchronization and data integrity.
>
> Any pointers would be useful.
>
>
> Bye,
>
> nikhil



Relevant Pages

  • Re: set serial lines status in linux
    ... to Linux comes almost out of the box. ... doesn't have a user interface though. ... Reason I suggested to write a device driver is that I have no idea what ... standard Linux commands can do with the serial port, and I just read a book ...
    (comp.lang.labview)
  • Re: Alternative to a thread THread in MFC??
    ... To do DMA, you need to lock all the ... This can only be done in a device driver, ... interface this bad could possibly have done them. ... >Waiting for an interrupt is done in a device driver. ...
    (microsoft.public.vc.mfc)
  • Re: Alternative to a thread THread in MFC??
    ... you have a completely unsalvageable mess and both the device driver and the ... You still talk about "interrupt received", although there is no mechanism in Windows ... interface is nearly impossible, but I'm guessing what the interface is likely to be doing. ... Waiting for an interrupt is done in a device driver. ...
    (microsoft.public.vc.mfc)
  • Re: RiscPC has stopped talking to router
    ... EtherM interface statistics ... Packets transmitted: 330 ... Module 'EtherM' is a supplier titled 'EtherM device driver' ... Small mbufs in use: 1 ...
    (comp.sys.acorn.networking)
  • Re: ABI change for device drivers using future AVX instruction set
    ... the possible use of YMM registers in device drivers. ... should it be the responsibility of the device driver? ... The Linux kernel always saves FP and related state only in the function ...
    (Linux-Kernel)

Loading