CS 481: Operating System Principles Assignment # 3: Due Date = Wednesday, 09/23/98 Chapter 5: Problems 16, 24, 25 and 28. Comment regarding problem 16: When a process wishes to read or write from/to a disk, it has to wait. First, its request is inserted into a queue since there could be other requests in the disk queue. Second, once service begins it could take a couple of milliseconds until the required block is transferrred to the buffer in the requesting process' address space. Ofcourse this waiting + service delay could be reduced by use of a disk cache. If there are many processes, many of which are running I/O -intensive applications, the waiting time may not be insignificant. It is possible that a process, after having made a disk request has other computation to perform. Our goal in this problem is to: (i) permit a process to receive CPU cycles even while it is waiting on I/O and (ii) enable a process to learn that its I/O request is serviced. What is the minimal change (addition and deletion) in the SOS code to facilitate this? Comment on Problem 25: This is sort of the reverse of Problem 16. Here, it is possible that a process that wishes to send a message cannot do so since there is no free buffer available. SOS immediately returns -1 ('sorry, no buffer space') to the caller. Instead modify SOS so that the caller is blocked when this happens and exactly one such waiting process is unblocked when a buffer is freed. Also, make sure that the first one to be blocked because of buffer unavailability is the first one to be unblocked. Kindly have all answers printed out. Also, make sure any code is appropriately indented and commented.