Guys,
As per my observation and study I don't think virtual memory is virtual that has implemented on linux/windows operating system. So, you can ask me why it's not virtual? And you guys can say "in computer science everyone believes that there is virtual memory which is abstract layer of the memory space". Ok if this is the case then explain why it's virtual? What I suspect that your answer would be like "the term "virtual" is a really a abstract view and idea or guess that doesn't have any real existance since cpu generates the logical addresses or set of logical memory address".
Let me first tell you "what is virtual memory as per the current notion". On linux OS cpu generates a set of logical address for a process or task before loading it on the RAM or primary memory. So, the task or program will be first loaded in that logical address space(set of logical addresses). The "swap" partition is used for the logical address space on linux and please note that swap partition is created during installing of the OS or later since it's a part of linux OS. Now swap partition is the part of hard disk. The hard disk is real, So, swap partition is also real. Now swap partition is used as a logical address space. So, again logical address space is virtual memory(as per the current convention). Here we can say logical address space is also real. So, the virtual memory is also real. That's why I don't think it's virtual. It's real memory. You can say it "first primary memory" and RAM can be called "second primary memory".
Let me take an example. The "init" is the first process which resides on the logical or swap memory. As per its requiremts cpu loads the program/libraries on the RAM. Here is a real view of the logical address(start address , end address, access permission, size of the each page,major no:minor no, total size) of the task "init".
--------------
[root@kmaiti ~]# cat /proc/1/maps
00400000-00420000 r-xp 00000000 fd:01 527519 /sbin/init
0061f000-00621000 rw-p 0001f000 fd:01 527519 /sbin/init
02563000-025a4000 rw-p 00000000 00:00 0 [heap]
3d43a00000-3d43a1e000 r-xp 00000000 fd:01 40 /lib64/ld-2.12.so
3d43c1d000-3d43c1e000 r--p 0001d000 fd:01 40 /lib64/ld-2.12.so
3d43c1e000-3d43c1f000 rw-p 0001e000 fd:01 40 /lib64/ld-2.12.so
3d43c1f000-3d43c20000 rw-p 00000000 00:00 0
3d43e00000-3d43f75000 r-xp 00000000 fd:01 42 /lib64/libc-2.12.so
3d43f75000-3d44175000 ---p 00175000 fd:01 42 /lib64/libc-2.12.so
3d44175000-3d44179000 r--p 00175000 fd:01 42 /lib64/libc-2.12.so
3d44179000-3d4417a000 rw-p 00179000 fd:01 42 /lib64/libc-2.12.so
3d4417a000-3d4417f000 rw-p 00000000 00:00 0
3d44200000-3d44217000 r-xp 00000000 fd:01 7379 /lib64/libpthread-2.12.so
3d44217000-3d44417000 ---p 00017000 fd:01 7379 /lib64/libpthread-2.12.so
3d44417000-3d44418000 r--p 00017000 fd:01 7379 /lib64/libpthread-2.12.so
3d44418000-3d44419000 rw-p 00018000 fd:01 7379 /lib64/libpthread-2.12.so
3d44419000-3d4441d000 rw-p 00000000 00:00 0
3d44600000-3d44618000 r-xp 00000000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44618000-3d44818000 ---p 00018000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44818000-3d44819000 rw-p 00018000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44a00000-3d44a09000 r-xp 00000000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44a09000-3d44c08000 ---p 00009000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44c08000-3d44c09000 rw-p 00008000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44e00000-3d44e07000 r-xp 00000000 fd:01 7380 /lib64/librt-2.12.so
3d44e07000-3d45006000 ---p 00007000 fd:01 7380 /lib64/librt-2.12.so
3d45006000-3d45007000 r--p 00006000 fd:01 7380 /lib64/librt-2.12.so
3d45007000-3d45008000 rw-p 00007000 fd:01 7380 /lib64/librt-2.12.so
3d4a600000-3d4a640000 r-xp 00000000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a640000-3d4a83f000 ---p 00040000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a83f000-3d4a840000 r--p 0003f000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a840000-3d4a841000 rw-p 00040000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4e600000-3d4e616000 r-xp 00000000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
3d4e616000-3d4e815000 ---p 00016000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
3d4e815000-3d4e816000 rw-p 00015000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
7f76c8840000-7f76c884c000 r-xp 00000000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c884c000-7f76c8a4b000 ---p 0000c000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4b000-7f76c8a4c000 r--p 0000b000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4c000-7f76c8a4d000 rw-p 0000c000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4d000-7f76c8a52000 rw-p 00000000 00:00 0
7f76c8a6d000-7f76c8a6e000 rw-p 00000000 00:00 0
7fff72f53000-7fff72f68000 rw-p 00000000 00:00 0 [stack]
7fff72fff000-7fff73000000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
[root@kmaiti ~]#
--------------
See logical memory has started from "00400000" to "ffffffffff601000". Please note that each task has divided into 4KB pages here. So, do you think this is virtual?? No it's not at all. This logical memory allocation has on "swap" partition. In windows swap partiton has ".swap" extension.
Don't be confused with the "virtualization of the computer resources". Here os multiple images are running on one host machine and each VM or VPS looks like a original machine. Here we can say each VM or VPS is a virtual machine.
What's your opinion? Please share here! Don't take it as an ego! Just share your logical thinking and analysis! Your opinion is always appreciated!
TC :)
As per my observation and study I don't think virtual memory is virtual that has implemented on linux/windows operating system. So, you can ask me why it's not virtual? And you guys can say "in computer science everyone believes that there is virtual memory which is abstract layer of the memory space". Ok if this is the case then explain why it's virtual? What I suspect that your answer would be like "the term "virtual" is a really a abstract view and idea or guess that doesn't have any real existance since cpu generates the logical addresses or set of logical memory address".
Let me first tell you "what is virtual memory as per the current notion". On linux OS cpu generates a set of logical address for a process or task before loading it on the RAM or primary memory. So, the task or program will be first loaded in that logical address space(set of logical addresses). The "swap" partition is used for the logical address space on linux and please note that swap partition is created during installing of the OS or later since it's a part of linux OS. Now swap partition is the part of hard disk. The hard disk is real, So, swap partition is also real. Now swap partition is used as a logical address space. So, again logical address space is virtual memory(as per the current convention). Here we can say logical address space is also real. So, the virtual memory is also real. That's why I don't think it's virtual. It's real memory. You can say it "first primary memory" and RAM can be called "second primary memory".
Let me take an example. The "init" is the first process which resides on the logical or swap memory. As per its requiremts cpu loads the program/libraries on the RAM. Here is a real view of the logical address(start address , end address, access permission, size of the each page,major no:minor no, total size) of the task "init".
--------------
[root@kmaiti ~]# cat /proc/1/maps
00400000-00420000 r-xp 00000000 fd:01 527519 /sbin/init
0061f000-00621000 rw-p 0001f000 fd:01 527519 /sbin/init
02563000-025a4000 rw-p 00000000 00:00 0 [heap]
3d43a00000-3d43a1e000 r-xp 00000000 fd:01 40 /lib64/ld-2.12.so
3d43c1d000-3d43c1e000 r--p 0001d000 fd:01 40 /lib64/ld-2.12.so
3d43c1e000-3d43c1f000 rw-p 0001e000 fd:01 40 /lib64/ld-2.12.so
3d43c1f000-3d43c20000 rw-p 00000000 00:00 0
3d43e00000-3d43f75000 r-xp 00000000 fd:01 42 /lib64/libc-2.12.so
3d43f75000-3d44175000 ---p 00175000 fd:01 42 /lib64/libc-2.12.so
3d44175000-3d44179000 r--p 00175000 fd:01 42 /lib64/libc-2.12.so
3d44179000-3d4417a000 rw-p 00179000 fd:01 42 /lib64/libc-2.12.so
3d4417a000-3d4417f000 rw-p 00000000 00:00 0
3d44200000-3d44217000 r-xp 00000000 fd:01 7379 /lib64/libpthread-2.12.so
3d44217000-3d44417000 ---p 00017000 fd:01 7379 /lib64/libpthread-2.12.so
3d44417000-3d44418000 r--p 00017000 fd:01 7379 /lib64/libpthread-2.12.so
3d44418000-3d44419000 rw-p 00018000 fd:01 7379 /lib64/libpthread-2.12.so
3d44419000-3d4441d000 rw-p 00000000 00:00 0
3d44600000-3d44618000 r-xp 00000000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44618000-3d44818000 ---p 00018000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44818000-3d44819000 rw-p 00018000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44a00000-3d44a09000 r-xp 00000000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44a09000-3d44c08000 ---p 00009000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44c08000-3d44c09000 rw-p 00008000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44e00000-3d44e07000 r-xp 00000000 fd:01 7380 /lib64/librt-2.12.so
3d44e07000-3d45006000 ---p 00007000 fd:01 7380 /lib64/librt-2.12.so
3d45006000-3d45007000 r--p 00006000 fd:01 7380 /lib64/librt-2.12.so
3d45007000-3d45008000 rw-p 00007000 fd:01 7380 /lib64/librt-2.12.so
3d4a600000-3d4a640000 r-xp 00000000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a640000-3d4a83f000 ---p 00040000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a83f000-3d4a840000 r--p 0003f000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a840000-3d4a841000 rw-p 00040000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4e600000-3d4e616000 r-xp 00000000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
3d4e616000-3d4e815000 ---p 00016000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
3d4e815000-3d4e816000 rw-p 00015000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
7f76c8840000-7f76c884c000 r-xp 00000000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c884c000-7f76c8a4b000 ---p 0000c000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4b000-7f76c8a4c000 r--p 0000b000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4c000-7f76c8a4d000 rw-p 0000c000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4d000-7f76c8a52000 rw-p 00000000 00:00 0
7f76c8a6d000-7f76c8a6e000 rw-p 00000000 00:00 0
7fff72f53000-7fff72f68000 rw-p 00000000 00:00 0 [stack]
7fff72fff000-7fff73000000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
[root@kmaiti ~]#
--------------
See logical memory has started from "00400000" to "ffffffffff601000". Please note that each task has divided into 4KB pages here. So, do you think this is virtual?? No it's not at all. This logical memory allocation has on "swap" partition. In windows swap partiton has ".swap" extension.
Don't be confused with the "virtualization of the computer resources". Here os multiple images are running on one host machine and each VM or VPS looks like a original machine. Here we can say each VM or VPS is a virtual machine.
What's your opinion? Please share here! Don't take it as an ego! Just share your logical thinking and analysis! Your opinion is always appreciated!
TC :)