Scintillating explanation specifically towards the end to give an end to end understanding of virtual memory using demand paging whilst how different components like MMU Processor and OS interact amongst themselves
Is the page table is ~4 MB because each entry contains the address to the start of a page frame, which is 32 bits, i.e., 4 B, and hence, the page table = 2^20*4 B = 4 MB? (It is roughly 4 MB because there are a few additional bits for state, permissions?) And is the RAM 4 GB because we are assuming each memory location to be 1 B, and there are 2^32 such memory locations?
In this example process is already in RAM. What is need of shifting from one place of ram to another. Or process need to shift from user space to kernel space. But in video professor said that from disk to ram. Totally confuse..
The page table has 2^20 entries. Each entry in the page table is of 4 Bytes. Therefore, the size of page table is 4*2^20 = 4MB. Note that the page table only contains the mapping between a block and the page. It does not contain the actual page.
A virtual address refers to the 32-bit (10-bits page-directory-table index, 10-bits page-table index, 12-bits page frame offset) address in a process's virtual address space and is the address printed out if we print the address of some variable in our code. It's the one that get's mapped to the physical address in RAM via the paging unit (page directory table and active page table). This is the same as the linear address, they are interchangeable. The logical address is different. It's the composite of the segmentation selector and the offset register and get's mapped to the linear-address/virtual-address via the segmentation unit. th-cam.com/video/GoI8xYCESiw/w-d-xo.html
This is the best explanation of Virtual Memory ideas that I've ever seen. Thanks!
I watched this video for 1 and 1/2 hours and completely understood the concept, its interesting to know whats happening behind the hood
Thank you sir for detail explanation of process of conversion from virtual memory to physical memory. It is interesting to know how it works.
Scintillating explanation specifically towards the end to give an end to end understanding of virtual memory using demand paging whilst how different components like MMU Processor and OS interact amongst themselves
at 15:45, the program is not loaded into the ram yet, how can OS transfer control to the main fun? Please, sir, clarify it.
The OS transfers control to the CPU to fetch the main function of the program from the program's virtual address space.
This is what I think Sir meant there.
Is the page table is ~4 MB because each entry contains the address to the start of a page frame, which is 32 bits, i.e., 4 B, and hence, the page table = 2^20*4 B = 4 MB? (It is roughly 4 MB because there are a few additional bits for state, permissions?)
And is the RAM 4 GB because we are assuming each memory location to be 1 B, and there are 2^32 such memory locations?
Thank you sir.
In this example process is already in RAM. What is need of shifting from one place of ram to another. Or process need to shift from user space to kernel space. But in video professor said that from disk to ram. Totally confuse..
9:20
Why is it 4MB? Shouldn't it be 1MB.
2^32 divided by 2^12 equals 2^20 = 1,048,576 entries of 4KB pages
The page table has 2^20 entries. Each entry in the page table is of 4 Bytes. Therefore, the size of page table is 4*2^20 = 4MB. Note that the page table only contains the mapping between a block and the page. It does not contain the actual page.
@@nitinchauhan530 Thank you for your response.
what is the difference between virtual address and logical address? As both are generated by cpu ...are they used interchangeably.
Yes, In a computer with virtual memory , the logical address is interchangeable.
th-cam.com/video/3akTtCu_F_k/w-d-xo.html
In essence, a Virtual Address is a Logical Address.
A virtual address refers to the 32-bit (10-bits page-directory-table index, 10-bits page-table index, 12-bits page frame offset) address in a process's virtual address space and is the address printed out if we print the address of some variable in our code. It's the one that get's mapped to the physical address in RAM via the paging unit (page directory table and active page table). This is the same as the linear address, they are interchangeable.
The logical address is different. It's the composite of the segmentation selector and the offset register and get's mapped to the linear-address/virtual-address via the segmentation unit.
th-cam.com/video/GoI8xYCESiw/w-d-xo.html