Scheduling engines to the CPU

Figure 3-2 shows a run queue for a single-CPU environment in which process 8 (proc 8) is running on the CPU and processes 6, 1, 7, and 4 are in the operating system run queue waiting for CPU time. Process 7 is an Adaptive Server process; the others can be any operating system process.

Figure 3-2: Processes queued for a single CPU

Image shows a series of processes queued in the operating system run queue, and the CPU working on a separate process.

In a multitasking environment, multiple processes or subprocesses execute concurrently, alternately sharing CPU resources.

Figure 3-3 shows three subprocesses in a multitasking environment. The subprocesses share a single CPU by switching onto and off the engine over time.

At any one time, only one process is executing. The other processes sleep in various stages of progress.

Figure 3-3: Multithreaded processing

Image showing three processes running in a mixture of executing, waiting, and sleeping states.