Re: Device driver scheduling time

Andre M. Hedrick (hedrick@astro.dyer.vanderbilt.edu)
Tue, 3 Nov 1998 01:48:47 -0600 (CST)


On 2 Nov 1998, Claude Gamache wrote:

>
> Hi,
>
> I need to write a device driver that must send data to a device
> every 8 milliseconds.
>
> Unless something changes, the device will not send me any interrupt to
> wake my driver. With a timer (add_timer) the driver can only be
> executed every 10 ms (Linux-i386). With Linux-Alpha, add_timer would
> allowed the driver to be executed every 1 ms.
>
> For the moment, I re-schedule the driver with the scheduler
> queue. This allows the driver to run approximatively 2 times per clock
> tick, so every 5 ms. But this is rather coarse and yet not sufficient.
>
> So I was considering using the Real Time Clock to get interrupts at a
> rate of 128 Hz (8 ms is 125 Hz, but the difference is acceptable).
>
> Is there any other way to achieve this ?
> And are there any "dangers" for the system if I use the RTC ? (I'm
> thinking about system time and others)

Yep, but you have to let your mind run wild.........at least I found it to
be a requirement........to achieve 33 micro-second stable interrupt
servicing under SMP. The first problem is to see that the PC clock as a
56 millisecond granularity limit. After many wasted attempts.....I
settled on the concept of a symbiotic device driver, but that required me
to design and build a millisecond precision time-base (oh yeah, I am an
astronomer) that was Y2(or nth)K stable. Then cascade a off with
programable timer-counters that could extend the precision of the
time-base to a 10 micro-second granularity. Ten (10) was a result of
using 16-bit counters and stable ovenized OSCs with a base greater than
1MHz but less than 10MHz. Next design the ISA card to have decoupled
address decoding and preferred would be a dual addressable card.

You are now asking what is this idiot babbling about........

The above mentioned card can be found at ::
http://www.dyer.vanderbilt.edu/server/pcs/

I use it to give a CCD camera for astonomy, not designed to handle
time-delay integrations or drift scanning this capablity.
Using this card and writing a device driver to capture contiguous address
of the CCD camera controller card. The new driver has programable
interrupts (RTC style) yielded and serviced by the camera.

Should you choose to peak at the URL, closely examine the two GIF images
of the same field in the sky. The first image is 512x512 pixels and is
the native and only way to use the instrument. The second image is 512x2048
pixels and is obtained via the symbiotic device driver concept.
One should note that the camera's sensor is only 512x512. This larger
image is not, I repeat, is not a composite/mosaic construction. Those who
need more than by word, I will be happy to send them a 2M+ FITS file to
tear appart.

If this looks like a solution, please let me now.......I do have cards to
sell with SMP capable drivers (source) and a how to.......

Cheers,
Andre Hedrick
The IDE-FNG for Linux
The APC UPS Specialist for Linux

http://www.dyer.vanderbilt.edu/server/udma/
http://www.dyer.vanderbilt.edu/server/apcupsd/apcupsd-3.4.9.bin.linux.tar.gz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/