ANONYMOUS wrote:
> 1. In the project sheet, it says that the device with the fastest read time is serviced first. This makes sense if we are actually doing a read system call. However, if we are doing a write system call, would the device with the fastest read speed be serviced first regardless of the write speed? For example, if the terminal write speed is faster than all other devices but the read speed is only 10Bps, would the terminal still acquire the data bus last? As I was writing this I realized that it would be much more complicated to consider the write speed as well as the read speed.
We'll be sticking with the project description - that the request for the fastest reading device received the data-bus next.
For any combination of read and write speeds, and the order of requests, it's (probably) possible to construct a scenario where a different request should precede another. But, as we're not chasing an optimal solution (minimum execution time), we're defining the simplest solution that all students can get right.
(but it's great that you're considering these alternatives, and always great to extend project solutions to increase your understanding of things).
> 2. I found a possible edge case where if a sleeping function and a device I/O becomes unblocked at the same time. Which process would unblock first? Depending on which process is unblocked first, we may end up with different measurements at the end (i think).
It may not affect the total onCPU time of each process, and hence the grand total, just their order of execution. But to avoid the concern, yes, we'll define which should go first in the (re)definition of the sample solution.