Re: RTL scheduler

Der Herr Hofrat <[email protected]>
Newsgroups gmane.linux.real-time.rtlinux.general
Message-ID <[email protected]>
> Hi,
>    I am new to the world of RTLinux and I was wondering if anyone
> could point me to some comprehensive tutorial on RTLinux scheduler. I
> am trying to figure out how RTLinux scheduler deals with the deadline.
> For example, let us consider that we are running a real-time
> application which will read data from a port at each 100 micros. That
> means if that code starts at time t1, it'll have to finish before
> t1+100 and have to be scheduled to run again at t1+100.
> 
>    What happens if it can't finish before t1+100? At that point
> there'll be new set of data on the port to be read while the old data
> is still being read by real-time application. Does RTLinux stops the
> currently executing application and does a fresh start for the new set
> of data? I was doing some research regarding scheduling in real-time
> systems. I used QNX before. I know that QNX works that way ( stops old
> process which is not finished within deadline and starts a new
> process).
> 

No scheduler can allow you to use up more than 100% CPU-time. If you 
schedule an application at a period < execution time then you are toasted.

If the priority of the task to be executed at t1+100 permits to preempt
what is currently executing it will preemt it and start - the current task
is not killed though but would resume after the current task terminates
so in case your task has period < execution time you would stack half done
task up until you overflow the stack and the box drops dead - if you are 
only preempting the task in the cases where your execution time was higher
due to system jitter it would unwind the stack sooner or later again and
you would not crash but it is then up to you to ensure that access to data
and internal structures is safe - if its not then you would have data 
corruption. This needs to be taken care of at the application level - the
scheduler is doing nothing for you here.

give schedulers/rtl_sched.c -> rtl_schedule a look it actually should be
quite clear what is done (and especially what is not done).

hofrat
_______________________________________________
Rtl mailing list
[email protected]
http://www2.fsmlabs.com/mailman/listinfo/rtl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.