design of interface b/w application module and device drivers

From: nikhil bhargav (nikhilbhargav_nsit_at_indiatimes.com)
Date: 10/25/04


Date: 24 Oct 2004 23:11:35 -0700

hi all,

I am working on developing an efficient interface between application
layer modules and device drivers for an optoelectronic module. The
operating system used is XRTS which is a real time variant of Unix.

Presently, the interface between applications and device driver is
this way. All device drivers are in form of long ISRs whcih does much
of processing and whatever communication that needs to be done between
them is done via using global variables between the device driver and
the application module using the device. Here since the kernel is
pre-emptive so issues of concurrency doesnot arise although race
conditions do exist.

However, now I have to make the kernel preemptive and develop a new
interface between application modules and device drivers, since the
present design has so many fallacies. I have thought of using
something like the filesystem in Linux wherein, I will enumerate each
device by a unique identifier. To access a device, i open a connection
with it via a call similar to open() and thereafter i could read from
it using a call like read ().

I want to know two things

1. How is the interface provided in linux OS?
2. Is this design worth moving forward?

Any good web reference on the design of interface b/w Application
modules and Device drivers would be highly appreciated.

cheers,

nikhil



Relevant Pages

  • Re: svn commit: r180256 - head/sys/dev/arl
    ... library to device drivers, rather than a required interface to transmit. ... This would allow the device driver to instantiate more than one if there are multiple hardware queues that need to be represented, or, for example, allow synthetic encapsulation interfaces to avoid queueing entirely and directly dispatch to the lower layer interface without requiring a mandatory enqueue/dequeue step. ... However, for vlans, I think it would significantly lower overhead without really modifying queueing behavior: notice that we enqueue it at the VLAN layer just to dequeue it a few instructions later so that we can enqueue it a layer lower. ...
    (freebsd-net)
  • Re: Sony CDs are not safe to play in a Windows computer
    ... applications (so you can have an EXE which works on any of them), the interface to device drivers depends upon the kernel. ...
    (rec.arts.anime.misc)
  • Re: MFC of socket/protocol reference improvements
    ... APIs used by loadable modules -- especially for device drivers. ... past, we've not made a lot of changes to the protocol switch interface, ... and historically it hasn't been a run-time extensible interface. ...
    (freebsd-arch)
  • Re: Sony CDs are not safe to play in a Windows computer
    ... > The biggest giveaway is that device drivers come in three flavours: ... > While all of the above provide roughly the same interface to applications ...
    (rec.arts.anime.misc)
  • Re: Is Fedora, or Linux in general, vulnerable to a "paging exploit" like Vista appears to be?
    ... for Linux also. ... It involves forcing unused device drivers in memory ... Swap is a file on Windows which probably makes it easier than ... It's unlikely -- for one thing, I understand that kernel device drivers ...
    (Fedora)