Quiz 5 Flashcards
A program must be in what for it to run?
In memory
What are the only sources of storage can the CPU access directly?
Main memory and registers
Why can main memory cause stalls?
Because accessing it may require multiple cycles
What is between main memory and CPU registers?
Cache
What is the order of memory from smallest to largest?
Register->Cache->Main Memory->External Storage
How does the OS ensures that a process can only access those addresses in its address space?
It uses a pair of base and limit registers to define the logical address space of a process
What must the CPU do to insure that every memory access generated in user mode is between the base and limit for the user?
It checks if the address is larger than the base register and smaller than the base + limit register, if this is not the case it causes an error.
Where do programs brought into memory execute from?
The input queue
What binds relocatable addresses to absolute addresses?
Linkers or loaders
What are the three stages where the binding of instructions and data to memory addresses can occur?
Compile time, Load Time and Execution Time
When memory addresses are bound during compile time what type of code can be generated?
Absolute code, assuming that the memory location is known a priori
When memory addresses are bound during load time what type of code can be generated?
Relocatable code
What is a logical address?
An address generated by the CPU
What is a physical address?
Address seen by the memory unit
When are logical and physical addresses are the same?
During compile time and load-time address-binding schemes
When do logical and physical addresses differ?
During execution time address binding schemes
What is the logical address space?
The set of all logical addresses generated by a program
What is the physical address space?
The set of all physical addresses generated by a program
What is the memory management unit?
A hardware device that maps virtual addresses to physical addresses
During a simple scheme what occurs?
The base register is called a relocation register
The value in the relocation register is added to every address generated by a user process
During a simple scheme what does the user program deal with?
Logical addresses
What is dynamic loading?
Loading only what you require into memory while executing a program
When are routines loaded during dynamic loading?
When they are called
Is special support needed from the operating system when you use dynamic loading?
No