Hi Kenneth,
On 8/22/19, Kenneth Porter via Boost
On 8/21/2019 4:05 PM, JH via Boost wrote:
there might be no chance to match the requirement simply because Linux is not a realtime OS?
You're at the mercy of the scheduler. Another process can always hog the CPU and lock you out until it's done. Have you reniced your process to increase your priority over other tasks? I recall the scheduler has acquired a lot of "knobs" over the last couple decades so this might require some research to see if any of them can help you. (It's an interesting problem so I'm interested in hearing what solutions you find.)
Yes, I am doing the experiment to increase process priority, it will help, but don't know how much. I am not quite sure if replace boost::asio::deadline_timer by high_resolution_timer will help or not, or if multithreading will help, the device is running simple process to generate data and to transmit data, there will be lots of work to change to multithreading structure in application, but I doubt the benefits running single threading vs multithreading in a single processor using i.MX6 MCU, appreciate your opinion. Thank you. - jupiter