-
Book Overview & Buying
-
Table Of Contents
Mastering IPython 4.0
By :
Experience with multitasking systems showed that a smaller unit of control was required than the process itself. Two inter-requirements presented themselves:
The process model, where each process has its own address space and program counter and an expensive context switch is required to change the instruction stream, was a poor fit for these requirements. In particular, the feature of the context switch, in which the process's memory was swapped out directly contradicted the need for data sharing.
The solution was the idea of threads. A thread is like a process in that it is a sequence of instructions with an associated process counter. The difference is that several threads can share the same address space. In general, threads are components of processes that share the entire process address space, but can be scheduled separately. Switching from one thread...