SQLite Forum

Sqlite3 is multi-core multi-OS system
All of the above is fairly negative, so how about a positive suggestion? Move all persistent I/O stuff from the RTOS to the Linux side.

For instance, if your RTOS is collecting data from a sensor, don't have the RTOS write the data to SQLite. Instead, push it into a shared-memory [message queue][1] consumed on the Linux side, which persists the records in batches.

That transforms the problem from unbounded SD I/O times with SQL tree rebalancing, reindexing, and such thrown in to one of hard-bound RAM write times. With a suitable locking structure, you probably don't even have cross-core locking times to worry about.

I realize that none of this may apply to your application, but that just means you need to share more details of what you're trying to accomplish if you want better feedback. :)

[1]: https://en.wikipedia.org/wiki/Message_queue