The HyperNews Linux KHG Discussion Pages

Question: Realtime Problem

Forum: The Linux Kernel Hackers' Guide
Date: Wed, 14 Jan 1998 20:51:59 GMT
From: Uwe Gaethke <Uwe.Gaethke@t-online.de>

Hi!

I do have a problem with the realtime capabilities of Linux. I wrote a loadable driver which uses the RealTimeClock to generate periodic interrupt at a frequency of 1024Hz. With each interrupt the driver increments an internal counter. The 'read' function of the driver returns simply that counter.

Next I wrote a realtime task (with the highest priority) which read that RTC continuously. This tasks checks if the read counter is incremented by one between two read calls. If not, it prints an error message which includes also the time between the last two read calls.

What I expect is: 1. The task calls 'read', 2. The RTC generates an Interrupt, 3. The task returns from 'read'.

If this is done fast enough (less than 1ms) every interrupt will get through to the realtime task.

And here is my surprise: Everything worked as expected until I called 'free' or 'ps' from a different shell. At this time the task seem to loose interrupts for almost exact 10ms (i.e. 10 to 11 interrupts). It seems that the scheduling is blocked for one tick.

Does anybody know why this happens?

Thanks for your help,
  Uwe


Messages

1. Feedback: SCHED_FIFO scheduling by Balaji Srinivasan newest