Memory Flashcards
What does a program that has been brought from disk into memory become?
A process
What does this definition describe: only one process runs at a time
Uniprogramming
What does this definition describe: processes share hardware resources, CPU, memory
Multiprogramming
What is address space an abstraction of?
Physical memory
What sort of components in the address space are code and some global variables?
Static
What sort of components in the address space are the stack and the heap?
Dynamic
What three components does the address space consist of?
Code
Heap
Stack
Does the stack or the heap use LIFO?
Stack
What do we call the translation/mapping from virtual to physical addresses?
Adress translation/mapping
What are these the goals of:
- Transparency
- Protection
- Efficiency
Virtual memory
What sort of relocation within address translation methods does this describe:
At load time, the OS adjusts the addresses in a process to reflect its position in memory
Once a memory is assigned a place in memory and starts executing it, the OS cannot move it
Static relocation (no HW requirement)
What sort of relocation within address translation methods does this describe:
Two registers for each process
* Base register indicates the starting address
* Bound/limit register determines the memory size
Memory-Management Unit (MMU)
* Translate virtual addresses to physical addresses
* Such translation happens for every memory reference
Dynamic relocation (HW supported)
How is each memory reference in dynamic relocation translated?
Physical address = virtual address + base
What are the two problems with dynamic relocation?
Fragmentation (memory inefficiency)
Internal and external
What do we call the allocation of contiguous memory spaces to different processes?
Memory allocation
What sort of memory allocation is described below:
- Physical memory broken up into fixed partitions
- One base register per process
Fixed partition
What are the advantages of fixed partition memory allocation?
Easy to implement
Fast context switch
What are the problems with fixed partition memory allocation?
Internal fragmentation
What sort of memory allocation is described below:
- Base register and limit register
- Dynamic relocation
Variable partition
What are the advantages of variable partition memory allocation?
Flexible
What are the disadvantages of variable partition memory allocation?
External fragmentation
When each partition has the same size, what sort of fragmentation can occur?
Internal fragmentation
What do we call the allocation algorithm that allocates the first hole that’s big enough in memory?
First-fit
What do we call the allocation algorithm that allocates the smallest hole that is big enough in memory?
Best-fit
What do we call the allocation algorithm that allocates the largest hole in memory?
Worst-fit
What do we call the allocation algorithm that keeps an extra pointer to the location within the list where one was looking last?
Next-fit
What is a solution to external fragmentation?
Compaction
Give the definition:
Shuffling of the memory contents to place all free memory together in one large block
Compaction
What is the main concern connected to compaction?
Performance overhead - memory intensive
Give the definition:
The dividing of the contiguous address space into several logic segments
Segmentation
What do we call the bits added to a segment to indicate permissions of read, write and execute?
Protection bits
What makes it possible to translate virtual memory into physical memory?
The MMU
Give the definition:
Multiple processes are ready to run at a given time, and the OS can switch between them
Multiprogramming
Give the definition:
The running programs view of memory in the system
Address space
What consists of code, stack and heap?
The address space
Give the definition:
When the running program think it’s loaded into memory at a particular address and has a potentially large address space
Virtualizing memory
Give the definition:
The hardware transforms each memory access, changing the virtual address provided by the instruction to a physical address where the desired information is actually located
Address translation