Paging and Segmentation Flashcards
What is a logical address?
The address generated by the CPU when a program is running.
It represents a location in the computer’s memory that the program wants to access.
What is a physical address?
A physical address is the actual location in the computer’s memory hardware (RAM) where data is stored.
What is paging?
A memory management scheme where we partition memory into small equal fixed-size chunks and divide each process into the same size chunks
The chunks of a process are called
pages
the chunks of memory are called
frames
For each process there is a page table
True
Formula for physical address
(frame*page size)+offset
Where is the page table kept?
In main memory
What is the PTBR?
Page table base register points to the page table
What indicates the size of the page table?
Page table length register
What is a TLB?
a memory cache that stores the recent translations of virtual memory to physical memory.
What is effective access time?
The total time it takes to access data from a system
EAT Formula
EAT=h(c+m)+(1-h)*(c+2m)
h=hit ratio
c=TLB access time
m=memory access time
What is a hit ratio?
percentage of times that a page number is found in the associative registers: related to the number of associative registers
What is Multilevel paging?
A paging scheme which consists of two or more levels of page tables in a hierarchical manner
What are the three ways Address binding can happen?
Compile Time
Load Time
Execution Time
What is a cache?
A high-speed storage mechanism that stores copies of frequently accessed or recently used data or instructions.
Name two differences between logical and physical addresses
- Tangibility: Logical addresses are virtual addresses that exist only within the program’s perspective, while physical addresses are real addresses that correspond to actual locations in physical memory.
- Visibility: Logical addresses are visible to the programmer and are used in the program’s code, while physical addresses are hidden from the programmer and managed by the operating system’s memory management unit (MMU).
What is contiguous allocation/ Simple paging?
a memory allocation method where data is stored in adjacent, continuous blocks of memory without fragmentation or physical gaps between them.
What is fixed partitioning?
divide memory into a fixed number of partitions of equal or different size. This can be efficient for programs that have a predictable memory usage.
What is dynamic partitioning?
divide memory into partitions of variable size. This can be more efficient for programs that have a variable memory usage.
What is fragmentation?
a problem that occurs when memory is allocated in a way that leaves unused gaps between allocated blocks. This can make it difficult to allocate memory for new processes.
Explain the difference between internal and external fragmentation.
Internal fragmentation:
Occurs when allocated memory is larger than needed, leaving unused space within the allocated block.
External fragmentation: Wastage of memory when there are enough total free memory spaces, but they are not contiguous or usable together.
What is thrashing?
Thrashing occurs when processes are actively using more memory than is physically present. This causes a state of continuous paging;
What is pre paging?
Prepaging, also known as anticipatory paging, involves loading not only the required page but also additional pages into memory preemptively before they are needed by a process.
What is demand paging?
Demand paging is a memory management scheme that loads only the required pages into memory when a process initially starts execution.
What is a page fault?
An interrupt that occurs when a program requests data that is not currently in real memory.