week2 Flashcards

1
Q

concurrency

A
  • ability to specify parts of program that can run simultaneously
  • no assumption can be made about relative order of execution of concurrent portions of a program
  • does not necessarily mean parallel
  • even on multicore, no guarantee concurrent portion will be on different cores
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ada concurrency

A

task specifications

task body

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

abstraction (func and types)

A

functions - procedural abstractions, hidden, i.e. printf for displaying output
types - data abstractions (bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

type

A

set of values w set of operations over those values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

adt

A
  • type
  • has complicated representation that is not visible to users of the type
  • has user defined operations over values of the type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

higher order functions

A

functions that operate over functions

- pass func as parameter, insert into data struct and return func as parmeters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

static scoping

A

look where function is DEFINED

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

dynamic chain

A
  • represents the way back to the stack frame
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

stacks in concurrency

A

cactus stack

each thread has its own stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

stack pointer

A
  • points to top of stack

- adjusted everytime something pushed on

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

frame pointer

A
  • points into same plc w/in current activation record
  • locals and parameters are offset from FP in current AR
  • when stack is decremented to go to next stack item, must have pter (DL) to show where to go in next frame
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

block structure

A
  • function can access its own declared varaibles as well as outside variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

dynamic link

A
  • pts to previous AR
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

static link

A
  • for each procedure from AR of current procedure to procedure outside of it
  • allows arbitrary nested programs in ADA
  • main procedure does not have static link
  • if multiple a’s static link pts to most recent a
  • address in memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

symbol table

A

compiler uses it so names /searching does not occur

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

why is static chain efficient

A

all variables forced on appropriate plc on stack

17
Q

closure

A
  • code pter
  • static link
    = environment; i.e. path to retrieve nonlocal variables that the function needs
    -self-contained
18
Q

heap

A
  • when stack is not enough; i.e. in scheme for returning functions as parameters means procedures can outlive procedure where it is declared
  • languages that support returning functions that access nonlocal variables
19
Q

garbage collection

A

reclaims space in heap where variables are no longer needed

20
Q

formal parameter

A

the parameter in the function construction

21
Q

actual parameter

A

the parameter when the function is called

22
Q

pass by value

A

the value of actual param is copied into formal param (c, c++, java)

23
Q

pass by ref

A

any use of formal params in body to function is ref to actual param

24
Q

pass by val-result

A

copy in copy out

25
Q

pass by name

A

algol copy rule

  • expression that is in the actual parameter is passed
  • replace formal params by actual params
  • expand func call into body of funct w formals replaced by actual params