Memory Flashcards
(70 cards)
What does a program that has been brought from disk into memory become?
A process
Is this multi- or uni-programming? Only one process runs at a time
Uniprogramming
What was the con with uniprogramming?
Inefficient
Is this multi- or uni-programming?
Processes share hardware resources, CPU & memory
Multiprogramming
Why do we have an abstraction for memory?
Processes may interfere with each other
Processes can suffer from access issues
⭐️ What is address space an abstraction of?
Physical memory
⭐️ What’s the running program’s view of memory in the system?
The address space
⭐️ What 2 types of components does the address space consist of?
Static & dynamic
⭐️ 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 main components does the address space consist of?
Code
Heap
Stack
Why won’t the code in the address space be changed during execution?
It’s static
What contains the local variables, pass parameters & return values in the address space?
Stack
What does add/push do to the stack pointer?
Increment it
What does remove (free) / pop do to the stack pointer?
Decrement it
Does the stack or the heap use LIFO?
Stack
What component of the address space contains explicitly dynamically allocated & user-managed memory?
Heap
What command should programmers use to deallocate in the heap?
free()
What does the OS use to virtualize memory?
Virtual addresses
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
Which address does the compiler/linker assume that the process starts at in OSes using address translation?
0
Address translation aims to relocate addresses in a … way
transparent
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)