BIrrell Flashcards
A “thread” is a straightforward concept:
a _____ _________ ____ __ ______
a single sequential flow of control
“Having “multiple threads” in a program means that at any instant the program has…
… multiple points of execution, one in each of its threads.” - Andrew D. Birrell
“Having the threads execute within a “single address space” means that the computer’s addressing hardware is configured so as to permit the threads to read and write the same ______ _________. In a high-level language, this usually corresponds to the fact that the off-stack (_____) variables are _____among all the threads of the program. Each thread executes on a separate call stack with its own separate ____ _______. The programmer is responsible for using the _________mechanisms of the thread facility to ensure that the ______ _______ is accessed in a manner that will give the correct answer.” - Andrew D. Birrel
memory locations
global
shared
local variables
synchronization
shared memory
Thread facilities are always advertised as being “lightweight”. This means that thread _______, ________, _________and ___________primitives are _____ enough that the programmer will use them for all his ________ needs.- Andrew D. Birrel
creation
existence
destruction
synchronization
cheap
concurrency
Give 4 reasons to use concurrency:
Utilize ____
Drive ____ (for example ____, ____, _______, ______, ______)
If the ____ invokes multiple actions, multiple _____ will perform them in ______.
Use of multiple threads allows the server to handle _______ _______ __ _______ , instead of artificially ________ them.
- Andrew D. Birrell
Utilize multi-processors
drive slow devices, (disks, networks, terminal, mouse)
user, threads, parallel
clients’ requests in parallel, serializing
List the 4 major mechanisms in the design of a thread facility:
thread creation
mutual exclusion
waiting for events
getting out of a wait