Memory Items Flashcards
Ram memory purpose
RAM is a temporary memory bank where your computer stores data it needs to retrieve quickly. RAM keeps data easily accessible so your processor can quickly find it without having to go into long-term storage to complete immediate processing tasks.
What is a memory address? How much memory can you address with addresses of a given size (e.g., 64-bit addresses)?
A memory address is a unique identifier for a memory location where data can be stored and retrieved. With 64-bit addresses, you can address 2^64 memory locations, which amounts to approximately 18.4 exabytes of addressable memory.
What is a physical address?
A physical address is the actual location in the computer’s physical memory (RAM) where data is stored. It refers to a specific memory cell within the hardware.
Why are physical addresses inconvenient for modern programs?
Physical addresses are inconvenient because:
They require programs to know the exact physical memory layout, which can vary. They lack flexibility, as memory locations are fixed and can’t be easily relocated. Directly using physical addresses can lead to issues with memory protection and security, as well as difficulties in managing multiple programs simultaneously.
What is a logical address?
A logical address (also known as a virtual address) is an address generated by the CPU during program execution. It is part of an abstract layer that allows programs to use addresses without concerning themselves with the physical memory layout.
What is physical address space? How many physical address spaces are there in the system?
Physical address space is the range of addresses that correspond to actual physical memory cells in the RAM. There is typically one physical address space per system, corresponding to the installed RAM.
What is logical (a.k.a. virtual) address space? How many logical address spaces are there in the system?
Logical (or virtual) address space is the range of addresses that a process can use. Each process has its own logical address space, allowing multiple processes to run independently without interfering with each other’s memory.
What kind of address does the CPU fetch with instructions?
The CPU fetches logical (virtual) addresses with instructions.
What kind of address does the CPU send to RAM with a load/store request?
The CPU initially sends a logical (virtual) address with a load/store request, which is then translated to a physical address by the MMU.
What kind of address arrives to RAM with the load/store request?
A physical address arrives at the RAM with the load/store request.
What is MMU? What is its purpose?
The MMU (Memory Management Unit) is a hardware component responsible for translating logical (virtual) addresses into physical addresses. It enables the use of virtual memory and protects memory access between processes.
What is contiguous memory management?
Contiguous memory management allocates a continuous block of memory addresses to a process. This type of allocation is simple but can lead to fragmentation.
What is fragmentation?
Fragmentation refers to the inefficient use of memory that can result in wasted space.
What is external fragmentation?
External fragmentation occurs when free memory is divided into small, non-contiguous blocks scattered throughout the physical memory, making it difficult to allocate large contiguous blocks to processes.
What is internal fragmentation?
Internal fragmentation happens when allocated memory blocks contain unused space, usually because memory is allocated in fixed-sized blocks that may be larger than needed.