6 Multitasking
In this chapter
- You learn how to identify and analyze possible bottleneck types of the program/solution
- You design a solution with an I/O component and with the lack of processing resources
- Design solutions runtime systems similar to OS where multiple actions running simultaneously.
Computer users take it for granted that their systems can do several things at once. They assume that they can keep working in a text editor while the operating system usually has many active processes and threads – other applications download files, manage print queues, and solve all the computational problems. This is true even for computer systems that have only one processor core. But concurrency is possible even in such systems thanks to the magic of multitasking.
In this chapter we will take our understanding of parallelism one step further by introducing multitasking into the runtime layer. The processor itself provides only limited support for multitasking. Software is needed to manage the sharing of the processor and other resources by multiple tasks.