Note that there is no intent that these questions cover the entire midterm! Please review other material, homework, etc!
You can get one list of answers if you focus on file to disk address translation.
You can get a different list if you focus on virtual and physical memory addresses and the fact that DMA hardware is unlikely to know about virtual addresses.
You can get another answer if you focus on the difference in I/O model between the stream oriented read() service and the sector oriented I/O primitives.
This is a study question. All of the above are relevant and there is no correct answer!
How would you implement the wait operation to allow a trap service routine to call it? What did you have to assume about the actual trap entry mechanism to make your implementation work?
As an alternative to making wait() callable from within a trap service routine, the job of page-fault handling could be distributed between the actual page-fault trap service routine and various interrupt handlers, so that, at the very end, the disk interrupt handler would, on completing the I/O required to handle the page fault, fix the user's address map and signal the user saying it was done. What information must go with each disk request in the disk requeust queue to allow this? Write pseudocode for the page fault handler and disk handler to support this (of course, leave out all the details not specific to this!)