I would like to write an application, which will better choice !!
1. Writing a simple application in the User space and invoked during startup and run the system forever. (It seems to be easy but not meeting the time critical event)
2. Configure the kernel and disable the unwanted hardware modules and put the application in to the kernel thread. So it will be preemptive and tightly packed with less latency.