Memory discussion is more useful when we discuss address spaces associated with memory. The system has physical memory. The physical memory blocks are combined together to provide real memory to the system. The physical memory blocks are handled by kernel VMM (Virtual Memory Manager). The kernel VMM manages address translations.
The memory is categorized in four types:
- Physical Memory.
- Real Memory.
- Virtual Memory.
- Logical Memory.
Now, I discuss the types of memory one by one.
Physical Memory
The physical memory is the memory available in the system in the form of memory cards in various slots of system. The physical address space is associated with this type of memory. The Physical address space across the all the memory cards is handled by kernel VMM.
Real Memory
The Real Memory is same as Physical memory if the system is non-partitioned. But if the system is partitioned then these two types are different. Now this memory acts as physical memory for that particular partition and the address space will be different for all the partitions with in the same system.
Logical Memory
The Logical Memory comes into picture only when the system is partitioned. The operating systems like AIX, Linux etc have the following requirements:
- The address space should start from zero.
- The address space should be contiguous.
The Logical memory concept supports both of these. The logical memory represents non-contiguous memory in the form of contiguous memory.
The following benefits are achieved:
- The partition is isolated and secured from physical memory address space.
- It simplifies the monitoring of partitions by POWER Hypervisor.
Virtual Memory
Sometimes the memory available for operating systems is not enough to carry out all the processes. So, operating system uses the disk space as memory. Thus operating system is tricked to think that it has more memory than it actually has. Some of the virtual memory is mapped to the physical memory and rest is divided by page size (often 4kB). These pages are mapped to the disk blocks. The address translation is handled by kernel VMM.
Now to clarify all of the above terms I take very simple example:
Suppose there are 6 cards of 10 MB each. So, total memory is: 6X10 = 60MB.
Lets say we have three partitions A, B, C with respective memories assigned as 16, 24, 20 MB. Now we have following data:
Total Physical Memory: 60MB.
Let’s say 1MB shows 10 |
|
|
|
Equipment |
Memory |
Address Range Represented by VMM |
|
Card A |
16MB |
1-160 |
|
Card B |
24MB |
161-240 |
|
Card C |
32MB |
241-320 |
|
Partition |
Memory Assigned |
Real Memry Address Range |
Logical Memory Address Range |
Partition A |
24MB |
1-240 |
1-240 |
Partition B |
36MB |
241-600 |
1-360 |
Partition C |
12MB |
601-720 |
1-120 |