Describe the difference between blocking and nonblocking input/output operations. How can an operating system improve the performance
Question:
Describe the difference between blocking and nonblocking input/output operations. How can an operating system improve the performance (as seen by a process) of blocking operations? [4 marks]
(b) A privileged process is given raw access to a slow disk device. It reads a page from the disk (using a blocking operation), processes the information and repeats. Suppose a read takes 3 units of time and the processing 2 units of time, so that reading a block and processing takes 5 units of elapsed time. Assuming the machine is otherwise idle, how can this elasped time be reduced? State any assumptions about hardware features you are making. [5 marks]
(c) Describe how polled I/O works and state its disadvantages. Under what conditions is polling a sensible approach? Describe an alternative approach. (You may find it helpful to provide a few lines of psuedo code.) [4 marks]
(d) What advantages does direct memory access (DMA) provide? Describe its operation as seen by a device driver in the operating system. (You may find it helpful to write a few lines of psuedo code.) [5 marks]
(e) To what extent does heterogeneity in I/O systems add complexity to an operating system? [2 marks]