[Question]: Concurrency approach #341
Unanswered
GavinRay97
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are told that the DB must be thread-safe, and the implementation requires lock-free data structures or critical sections
But one thing that is not clear to me from the architecture/assignments is how you should architect for concurrency
Should you create one thread per CPU core at program startup, and run an independent set of services on each thread, or what is the general approach taken by databases?
And in languages that support virtual threads like Go/Kotlin, I assume that operations like disk reads/writes should be run on virtual threads to not block the main thread, since you don't pay a physical thread cost?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions