2
$\begingroup$

I know that synchronization is important in the OS, but why do we need a separate topic synchronization and concurrency in the DBMS? The OS concentrates on program synchronization while the DBMS concentrates on data synchronization. Why can't the OS take responsibility for data synchronization?

$\endgroup$
2
$\begingroup$

Program synchronization is a very different beast compared to transaction synchronization. The objective of your Operating System is to have multiple applications working in sync to maximize the utilization of your CPU. A couple of reasons I can think of as to why OS' are not equipped to handle transaction synchronization are as follows.

  1. Your DBMS is a self contained application. Allowing a 3rd party software (i.e. your OS which may be open source or owned by some corporation) direct access to the data is a no-go for business.
  2. There maybe multiple DBMS' with different architectures (relational, non-relational, written in different languages, using different standards) installed on a single Operating System. OS designers usually ignore deadlock recovery because it becomes too complicated for them to handle efficiently. Accounting for applications across the board will mean worse performance issues for the OS, ultimately defeating the purpose of having one in the first place.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.