How does a memory managemet unit map a virtual address to a virtual address
How does a memory managemet unit map a virtual address to a virtual address
If a computer system has a main memory of 1mb and virtual address space of 16mb while the disk block size is 1kb. How does the memory management unit map a virtual address to a physical address
Operating systems will keep a map of virtual_address - physical_address. For example if a program uses virtual page 0, 1, 2, 3, operating systems can map these pages to physical pages as 64, 128, 256, 512. Since the virtual address space is larger than physical address space, not all of the virtual memory will be mapped to physical memory at any moment if physical memory cannot hold all of them. Therefore, some of the data would be swapped out to disk, and thus not present in physical memory. Those swapped out pages will only be brought back to main memory by OS if the program needs the data.
Комментарии
Отправить комментарий