I am currently reading Tanenbaum's Modern Operating Systems. I am tryingwant 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 for the sake of simplicity,please assume that I am asking about single-threaded processes only.
To give an overview, theThe book states that, when a process needs to do some I/O, it doesmakes a system call, requesting 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.
While I appreciate the conceptual image that the book provides, but I am tryingwant to understand (some of) the orchestration that goes on during this process. For the sake of an 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, whatthe part of the file to be read next, etc...?