Hi Jlliagre,
I am so sorry for that extra "i". Eyes playing tricks on me..and thank you for your reply.
Quote:
Originally Posted by
jlliagre
Unless shared memory enter in the game, no it can't.
Virtual space allocated by a process is for its exclusive use. Note again that virtual memory is not the same as physical memory. No particular space is reserved, that's just an amount of space. The OS is free to map this virtual space to whatever physical backend it likes.
Sorry if i am getting confused again..
Virtual swap = ram + disk. (shown in swap -s)
- I understand that memory reservation on virtual swap does not actually consume physical space
- From the previous thread, i understood that reserved virtual swap can be use for actual swapping/paging
But you mentioned that virtual space allocated by a process is for its exclusive use.. --> is reserved = allocated ?
I am actually referring to if virtual swap being reserved by a processA can still has the underlying unused physical ram/disk swap used by another ProcessB right ?
E.g.
T1) Process A reserved 5G of virtual swap using malloc (
(i) 3G from swap disk and
(ii) 2G from ram ) -> again at this point, nothing is being physically allocated or used (ram and swap still shown as free in vmstat and swap -l)
T2) Existing Process B needs to read data into the physical RAM (page fault) -> it is actually able to put this piece of data into the
(ii) 2G physical ram reserved by Process A - since the reservation is just done virtual swap
T3) OS also see the needs to page some data out of the physical ram -> it is also able to page out this data in ram out onto the
(i)3G disk swapright ?
However, if a physical ram is already used/allocated to processA, no other process can use it.
Is my understanding correct ?
Regards,
Noob