Take a look at Alex Miller's diagrams for what function calls are actually doing on various systems.
https://transactional.blog/how-to-learn/disk-io