Reputation: 21
I have a process that needs to interact with hardware at very tightly controlled periods. I have a second process that can start at any time and needs to interact with the first process without affecting the first process' timing. I'm using SCHED_DEADLINE to control the period on both processes. Is there a way to get the second process to align its period with the first process?
I know I can synchronize communication using semaphores. This is not what I'm talking about.
Consider the scenario:
Therefore, on the first time step the 2 processes try to communicate, the timing for contacting the hardware is thrown off by 0.5ms. IF the periods of the 2 processes were synchronized then this problem would not happen.
For those interested, the hardware in this case is EtherCAT based and using a Distributed Clock (DC). The 1 time step jitter would desynchronize the DC, forcing the DC to re-synchronize. The re-sync time is about 7 seconds. I really want to avoid that time penalty since a person will be interacting with the system and regular 7s delays are unacceptable.
I have tried using semaphores to set the task scheduler up on the second process at a specifically synchronized time with the first process. This did not get the periods of the tasks synchronized close enough.
Upvotes: 0
Views: 27