HOW TO build a periodic task?

HOW TO build a periodic task?

Post by Carlos Muno » Wed, 09 Apr 1997 04:00:00



Hello everybody!!

I am trying to implement a periodic launching facility inside Linux
1.2.13, but I cannot get it working!!

To make things shorter, I build a list of periodic tasks in the state
TASK_UNINTERRUPTIBLE. Each task has a period of activation, and the list
is sorted by that time. Periodically the 8254 issues an interrupt and
puts the state of the first task in the list to TASK_RUNNING
(need_resched is set to 1, as well), and reinserts it into the list with
a complete period.

I have also modified the exit system call so that the IP is reset to the
start address and the task state turned to the TASK_UNINTERRUPTIBLE
state again. I'm working with a.out files because I'm not familiar with
ELF format, and I get the start IP address from the field ex.a_entry
used in the function load_aout_binary().

A task with such modifications should run periodically, but it never
runs, not once. I think it could be because apart from resetting the IP
something else is needed to leave a task in its initial state. I'm quite
sure the tasks are selected by the scheduler and an explicit switch_to()
is made, but it won't work at any rate.

Please could you help me ASAP?? I'm really despaired!!

Thanks in advance, CARLOS AKA SLACKER

 
 
 

HOW TO build a periodic task?

Post by Robert W. Brew » Sat, 12 Apr 1997 04:00:00


Try RT-Linux if you're trying to get some real-time stuff
going:

http://luz.cs.nmt.edu/~rtlinux/

-Rob
--
Robert W. Brewer