Chapter 13 - Concurrency Flashcards
what are the 4 different levels of concurrency
machine instruction level
statement level
unit level
program level
what is machine instruction level concurrency
executing two more machine instructions concurrently
what is statement level concurrency?
executing two or more high-level language statements simultaneously
what is unit level concurrency?
executing two or more subprogram units simultaneously
6 motivations for concurrency
- speed up execution
- increase program flexibility
- resource management in OS
- task management in OS
- solving large-scale problems
- simulates actual physical systems that consist of multiple concurrent subsystems
what is a scalable concurrent algorithm?
an algorithm with which the speed of execution increases when more processors are available
what is a thread of control?
a sequence of program points reached as control flows through the program
what is physical concurrency?
multiple independent processors (multiple threads of control)
what is logical concurrency?
the appearance of physical concurrency is presented by time-sharing one processor
what is hidden concurrency and what are 3 kinds of it?
- concurrency that is built into processor architectures
- pipelining of instruction (run instruction A, while preparing instruction B, while fetching instruction C)
- separate lines (buses) for instructions and data
- prefetching of instruction and data
3 differences between a task (aka a process) and a subprogram
Tasks are:
- implicitly started
- invoking unit need not wait for the task to finish to resume itself
- upon completion of the task, control may or may not return to the invoker
what is a lightweight vs a heavyweight task?
lightweight tasks all run in a single address space and heavyweight tasks each run in their own address space
what is a program “guard”
a linguistic device that allows the guarded code to be executed only when a specified condition is true
what is a task descriptor?
-a data structure that stores all of the relevant information about the execution state of a task
what is cooperation synchronization
when two processes must perform their work in some mandated order