Memory Items Flashcards

1
Q

Ram memory purpose

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a memory address? How much memory can you address with addresses of a given size (e.g., 64-bit addresses)?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a physical address?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why are physical addresses inconvenient for modern programs?

A

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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a logical address?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is physical address space? How many physical address spaces are there in the system?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is logical (a.k.a. virtual) address space? How many logical address spaces are there in the system?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What kind of address does the CPU fetch with instructions?

A

The CPU fetches logical (virtual) addresses with instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What kind of address does the CPU send to RAM with a load/store request?

A

The CPU initially sends a logical (virtual) address with a load/store request, which is then translated to a physical address by the MMU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What kind of address arrives to RAM with the load/store request?

A

A physical address arrives at the RAM with the load/store request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is MMU? What is its purpose?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is contiguous memory management?

A

Contiguous memory management allocates a continuous block of memory addresses to a process. This type of allocation is simple but can lead to fragmentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is fragmentation?

A

Fragmentation refers to the inefficient use of memory that can result in wasted space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is external fragmentation?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is internal fragmentation?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What kind of fragmentation does contiguous memory management suffer from?

A

Contiguous memory management suffers from both external and internal fragmentation.

17
Q

What is paging?

A

Paging is a memory management scheme that eliminates the need for contiguous allocation of physical memory by dividing logical memory into blocks of the same size called pages and physical memory into blocks of the same size called frames.

18
Q

What is a page? What is a frame?

A

A page is a fixed-sized block of logical memory.
A frame is a fixed-sized block of physical memory.

19
Q

What kind of fragmentation does paging suffer from?

A

Paging suffers from internal fragmentation because a process might not fully use the last page allocated, leading to wasted space within that page.

20
Q

How do sizes of pages and frames relate?

A

Pages and frames are of the same size to allow for straightforward mapping from logical to physical addresses.

21
Q

What is a page offset?

A

A page offset is the displacement within a page that indicates the exact location of data within the page.

22
Q

What is a page table?

A

A page table is a data structure used by the MMU to map logical addresses to physical addresses. It contains entries for each page, indicating the corresponding frame in physical memory.

23
Q

How many page tables are there in a system?

A

Typically, each process has its own page table, so there can be as many page tables as there are processes.

24
Q

What is TLB? What is its purpose?

A

The TLB (Translation Lookaside Buffer) is a cache used to store recent translations of logical to physical addresses, speeding up the address translation process.
Cache inside MMU that stores most useful entries of page table

25
Q

What is a TLB hit? What is a TLB miss?

A

A TLB hit occurs when the translation for a requested address is found in the TLB, allowing for faster access.
A TLB miss occurs when the translation is not found in the TLB, requiring the MMU to retrieve it from the page table, which is slower.

26
Q

Is it necessary to have the whole program in memory to run it?

A

No, it is not necessary to have the whole program in memory to run it. Virtual memory allows parts of the program to be loaded as needed.

27
Q

What is a page fault?

A

A page fault occurs when a program tries to access a page that is not currently in physical memory, triggering the operating system to retrieve the page from secondary storage (like a hard drive) and load it into physical memory.