Exercises
141. | Use asynchronous I/O to merge several sorted files into a larger sorted file. |
142. | Does the FILE_FLAG_NO_BUFFERING flag improve atouOV or atouEX performance, as suggested by the CreateFile documentation? Are there any restrictions on file size? |
143. | Modify TimeBeep (Program 14-3) so that it uses a manual-reset notification timer. |
144. | Modify the named pipe client in Program 11-2, clientNP, to use overlapped I/O so that the client can continue operation after sending the request. In this way, it can have several outstanding requests. |
145. | Rewrite the socket server, serverSK in Program 12-2, so that it uses I/O completion ports. |
146. | Rewrite either serverSK or serverNP so that the number of ready worker threads is limited by a semaphore. Experiment with a large thread pool to determine the effectiveness of this alternative. serverSM on the Web site is a modification of serverNP. As Win64 implementations and large physical memories become available, the trade-offs between this solution and completion ports may shift. |
147. | Use JobShell (Program 6-3, the job management program) to bring up a large number of clients and compare the responsiveness of serverNP and serverCP. Networked clients can provide additional load. Determine an optimal range for the number of active threads. |
