• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/16

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

16 Cards in this Set

  • Front
  • Back

What are the 3 parts of run-time memory ?

Code area ( main program, subprograms ) , Data area ( run time stack, the heap ) , Control Information ( current IP indicates the instruction about to be executed , current EP shows the activation record of the current block, giving access to local and non-local data )

How every subprogram is represented ?

Represented as an activation record (AR) on the activation stack. The AR of the callee is placed at the top of the stack, directly above the AR of the caller

What are some important characteristics about the caller ?

It has a pointer to the caller's activation record, a return address, and if this is a function, the addess where its value should be stored

What are some important characteristics about the callee ?

It has scoping information ( a pointer to the AR of the enclosing block ), local variables, formal parameters, and temporary storage

What are the elements of an Activation Record ?

A dynamic link DL ( pointer to caller's AR ), a static link SL ( pointer to enclosing block ), a return address, and local data

What is the subprogram call sequence ?

First, the compiler generates prologue for entering the subprogram, then the compiler generates code to execute the subprogram body, finally the compiler generates epilogue for exiting the subprogram

What is the prologue ?

The prologue is made of a segment of free stack storage ( stack frame ). Then it puts in the new stack frame all data about the caller and the callee.

What is the epilogue ?

It stores the returned value ( if subprogram is a function ) , move the top-of-stack pointer down ( same as removing the AR from the stack ), it jumps to the return address, and continues executing statements in the caller's body

What are the 6 attributes that characterize a variable ?

Name, Address ( storage ), Value, Type, Lifetime, Scope

What is a binding ?

It is an association between two entities

What is the binding time ?

Time at which a binding takes place

When do a a binding is static ?

If it occurs before runtime and remains unchanged during the program execution

When do a binding is dynamic ?

If it first occurs at runtime and/or can change during program execution

For the name, value, address, type, and score of a variable, when are the attributes defined ?

Name : generally at compile-time, the value at run-time, the address at load-time and run-time, and the type and the scope at compile-time and run-time

What is the lifetime of a global/static variable ?

It is the load-time through end of program execution

What is the lifetime of a local/parameter variable ?

Subprogram execution