концепции виртуальной памяти

Я запутался в некоторых темах, касающихся виртуальной памяти. Итак, я собираюсь перечислить их и задать вопросы. Отвечая, я предпочту, если вы также перечислите какой-либо источник, где я могу устранить это сомнение Я буду говорить со ссылкой на исполняемый файл linux elf.

I have heard that every process has the address space of 4gb in a 32 bit system. When i checked the objdump of one of my executable relocatable file i saw that it had limits from 00000000 to ffffffff. Also it contained the kernel space. This is the address space of the file. Is this the virtual memory we talk about? If yes then i had read that virtual memory mechanism allows processes of very big sizes to run and that process size is not limited by main memory size(we can bring required pages to main memory upon demand- demand paging). Then if virtual memory is just 4gb, doesn't it limit the maximum size of programs to 4gb? Also, i checked another file's objdump and it had the same address(i.e. 00000000 to ffffffff). So, what does this mean? Does that mean that our file is some kind of relocatable file to which starting addresses will again be added(although this seems absurd because it is already an executable relocatable object file).

I had read that in a memory where segmentation has been implemented, the cpu produces virtual(logical) address. This address has three parts - the segment, the offset within the segment. Also, the segments being talked about here are code, data, stack etc.

In the process address space, these segments are located starting from specific locations. So, what are the contents of the virtual address of the cpu? Does the virtual address produced range from 00000000 to ffffffff? If yes then is the process of accessing the content at the virtual address, the folllowing:-

The segment part is looked up in the segment descriptor table to find the segment's
starting address in linear address space. Then the offset is indexed within the segment and
the resulting address is the linear address. Then, we look up the page table and map the
address to physical address. If the page is not currently in the main memory, it is 
brought. 

This again arises the fact that no process can be fully in the main memory at any time, because then entire memory will be occupied by just one process(as the address space of process is itself 4gb).

Also, if all process have address space from 00000000 to ffffffff, and more than one process can exist in main memory at a time, then all processes should have their own segment descriptor table which returns the segment's address in the linear address space

I read that the operating system is loaded into the main memory at boot up. Then what is the difference between that OS and the kernel code in the kernel space of a particular process? Also, do all processes have their own copy of kernel code in their kernel space?

Ответы на вопрос(1)

Ваш ответ на вопрос