How Does A DBMS Perform Disk I/O

tags: learning database

content

my question:

  • for a user-space program, disk I/O is performed by the program calling read write syscalls
  • the actual disk I/O is performed by the kernel
    • the kernel sends CPU instructions
    • CPU then moves data between disk and memory (still somewhat confused about this)

for a DBMS, how is disk I/O performed?

  • when it comes to CPU, I guess it’s the same
  • but does a DBMS lives in user space? and is the process exactly the same as above?
  • DBMS does not rely on OS?

“Most disk operations go through OS API.” CMU course

  • first of all, DBMS is userspace program
    • so, DBMS rely on OS to perform disk I/O (by calling OS API)
  • most DBMS have their their own buffer pool (in userspace memory) for better page management
  • some DBMS completely bypasses OS’s page cache by using O_DIRECT flag when calling OS API, to avoid double caching

up

down

reference