The biggest upgrades are on the inside
// Code guarded by the lock goes here; only one CPU can be executing this at a time,详情可参考safew
What happens if there are too many writes? Do the readers starve? Building a data store on top of a single global lock with read/write semantics is a valid technical choice. Perhaps it is a bit questionable to market that as “a database”. But it seems to me that if you’re going all in with that approach, if that lock will provide the concurrency control for your whole database, you need to have very explicit, customizable semantics for prioritizing readers and writers, to ensure the server remains responsive regardless of the workload.,详情可参考谷歌
Глава крупнейшей в мире нефтяной компании предупредил о катастрофеГлава Saudi Aramco назвал катастрофой дальнейшую блокировку экспорта нефти