CIS 260 MultithreadingWe are used to having several programs running at the same these days. We expect to be able to browse the web, listen to music, and download files concurrently. Sometimes a single program has to do several things at once. A web browser has to handle downloading and displaying a page at the same time. During that process, we still expect the browser to respond to user events such as a window resizing. You may decide that your program that handles several tasks should be broken up into several processes. Managing several processes can be a real drag to the performance of a machine however. Threads have been created as a more efficient way to accomplish the same goal. Threads can share address space and thus require less overhead. You basically get to run several programs at once without incurring as much of a performance hit. |