I am reading Tanenbaum's Modern Operating Systems. I want to understand a particular concept regarding processes and blocking system calls, specifically with regards to I/O. I assume threads might complicate the discussion somewhat, so please assume that I am asking about single-threaded processes only.
The book states that when a process needs to do some I/O, it makes a system call to request the necessary data. At that point, the OS can block the process until the data is available. Specifically, the CPU waits for an interrupt from an I/O device, and upon receiving it, marks the process as ready, so that it can be picked up by the scheduler.
I appreciate the conceptual image that the book provides, but I want to understand (some of) the orchestration that goes on during this process. For example, suppose a process requests to read the file: "some_file.txt".
Who initiates the blocking of the process and when? Is it the system call itself, or is it the I/O device's driver?
Who keeps a record of what data has been asked for by which process, such as the file name, the part of the file to be read next, etc.?