I was hoping someone could point me in the right direction, on where I can learn about efficiently reading and writing random file io, and how that translates to actual hardware requests.
For example, I'm guessing C++ is buffering a lot of input/output and attempting to batch the requests -- but I want full control over how the hardware behaves so I can toy with some test programs.
It isn’t just C++ doing magic buffering — the underlying OS will also buffer.
Don’t try to get around it. If you want to make sure that the OS has been properly instructed to synchronize output to disk, perform a flush. Otherwise, assume that the system works as described to you by the language.