[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Thread preemption problem



On Mon, Nov 10, 2008 at 02:48:35PM +0200, Zeev Hadar wrote:
> I have encountered a problem running real time application on i686 with
> kernel 2.6.18

Linux is no real time operating system. It provides limited soft real
time response.

> The problem: a high priority thread is preempted by a low priority
> thread.
> All the threads use FIFO real time scheduling.

Which sort of scheduling?

> The variable public_signature was OK in vcgetfea.c:66
> A call to f2() was done in line 70.
> The variable was tested again at the start of f2() and abort() was
> called.
> The value of public_signature idicates that thread#2 changed it.
> I dont understand how thread#2 preempts thread#1.

You can't argument with time relations in multi-threaded environments.
If you need strict sequencial execution of parts of the code use proper
serialization technics.

Bastian

-- 
To live is always desirable.
		-- Eleen the Capellan, "Friday's Child", stardate 3498.9


Reply to: