Case study of virtual memory management
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Need to understand virtual memory concept.
When a process requesting for 2GB mapping onto the virutal memory in Linux environment of 4GB ( 1GB Kernel : 3GB Userspace), when already another process already holds the mapping for 2 GB.
How does the mapping of the stack, heap, data segments all going to happen?
I am not able to find any example for my understanding.
Text book only mentions separately for each mapping but not a practical approach.
linux-kernel virtual-memory
add a comment |
up vote
2
down vote
favorite
Need to understand virtual memory concept.
When a process requesting for 2GB mapping onto the virutal memory in Linux environment of 4GB ( 1GB Kernel : 3GB Userspace), when already another process already holds the mapping for 2 GB.
How does the mapping of the stack, heap, data segments all going to happen?
I am not able to find any example for my understanding.
Text book only mentions separately for each mapping but not a practical approach.
linux-kernel virtual-memory
I don't think I understand your question. In a 32-bit environment (address space 4GiB total), if a process already holds a mapping of size 2GB and it requests another mapping of size 2GB, then the second mapping will simply fail. There isn't enough space. That's all there is to it.
– Celada
Jun 16 '15 at 7:10
sorry for the confusion, its not the same process requesting another mapping. Its one process requesting mapping while another already holds the mapping
– Madara
Jun 16 '15 at 8:27
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Need to understand virtual memory concept.
When a process requesting for 2GB mapping onto the virutal memory in Linux environment of 4GB ( 1GB Kernel : 3GB Userspace), when already another process already holds the mapping for 2 GB.
How does the mapping of the stack, heap, data segments all going to happen?
I am not able to find any example for my understanding.
Text book only mentions separately for each mapping but not a practical approach.
linux-kernel virtual-memory
Need to understand virtual memory concept.
When a process requesting for 2GB mapping onto the virutal memory in Linux environment of 4GB ( 1GB Kernel : 3GB Userspace), when already another process already holds the mapping for 2 GB.
How does the mapping of the stack, heap, data segments all going to happen?
I am not able to find any example for my understanding.
Text book only mentions separately for each mapping but not a practical approach.
linux-kernel virtual-memory
linux-kernel virtual-memory
edited Nov 17 at 2:15
Rui F Ribeiro
38.2k1475123
38.2k1475123
asked Jun 16 '15 at 6:41
Madara
134
134
I don't think I understand your question. In a 32-bit environment (address space 4GiB total), if a process already holds a mapping of size 2GB and it requests another mapping of size 2GB, then the second mapping will simply fail. There isn't enough space. That's all there is to it.
– Celada
Jun 16 '15 at 7:10
sorry for the confusion, its not the same process requesting another mapping. Its one process requesting mapping while another already holds the mapping
– Madara
Jun 16 '15 at 8:27
add a comment |
I don't think I understand your question. In a 32-bit environment (address space 4GiB total), if a process already holds a mapping of size 2GB and it requests another mapping of size 2GB, then the second mapping will simply fail. There isn't enough space. That's all there is to it.
– Celada
Jun 16 '15 at 7:10
sorry for the confusion, its not the same process requesting another mapping. Its one process requesting mapping while another already holds the mapping
– Madara
Jun 16 '15 at 8:27
I don't think I understand your question. In a 32-bit environment (address space 4GiB total), if a process already holds a mapping of size 2GB and it requests another mapping of size 2GB, then the second mapping will simply fail. There isn't enough space. That's all there is to it.
– Celada
Jun 16 '15 at 7:10
I don't think I understand your question. In a 32-bit environment (address space 4GiB total), if a process already holds a mapping of size 2GB and it requests another mapping of size 2GB, then the second mapping will simply fail. There isn't enough space. That's all there is to it.
– Celada
Jun 16 '15 at 7:10
sorry for the confusion, its not the same process requesting another mapping. Its one process requesting mapping while another already holds the mapping
– Madara
Jun 16 '15 at 8:27
sorry for the confusion, its not the same process requesting another mapping. Its one process requesting mapping while another already holds the mapping
– Madara
Jun 16 '15 at 8:27
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Let's assume that we have 3 GiB of virtual address space available and that a process' text, stack, heap, and prior memory mappings together occupy only a small amount of address space (much less than 1 GiB). Then if this process requests a mapping of size 2GB then there is no problem, there is plenty of space to accommodate that mapping.
(Actually, there would be one small case where this is not true: if the process' existing mappings were fragmented and scattered around the address space and there was no contiguous 2GB range of addresses available. But that's unlikely).
What mappings are or are not present in a different process' address space has nothing to do with it.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Let's assume that we have 3 GiB of virtual address space available and that a process' text, stack, heap, and prior memory mappings together occupy only a small amount of address space (much less than 1 GiB). Then if this process requests a mapping of size 2GB then there is no problem, there is plenty of space to accommodate that mapping.
(Actually, there would be one small case where this is not true: if the process' existing mappings were fragmented and scattered around the address space and there was no contiguous 2GB range of addresses available. But that's unlikely).
What mappings are or are not present in a different process' address space has nothing to do with it.
add a comment |
up vote
1
down vote
accepted
Let's assume that we have 3 GiB of virtual address space available and that a process' text, stack, heap, and prior memory mappings together occupy only a small amount of address space (much less than 1 GiB). Then if this process requests a mapping of size 2GB then there is no problem, there is plenty of space to accommodate that mapping.
(Actually, there would be one small case where this is not true: if the process' existing mappings were fragmented and scattered around the address space and there was no contiguous 2GB range of addresses available. But that's unlikely).
What mappings are or are not present in a different process' address space has nothing to do with it.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Let's assume that we have 3 GiB of virtual address space available and that a process' text, stack, heap, and prior memory mappings together occupy only a small amount of address space (much less than 1 GiB). Then if this process requests a mapping of size 2GB then there is no problem, there is plenty of space to accommodate that mapping.
(Actually, there would be one small case where this is not true: if the process' existing mappings were fragmented and scattered around the address space and there was no contiguous 2GB range of addresses available. But that's unlikely).
What mappings are or are not present in a different process' address space has nothing to do with it.
Let's assume that we have 3 GiB of virtual address space available and that a process' text, stack, heap, and prior memory mappings together occupy only a small amount of address space (much less than 1 GiB). Then if this process requests a mapping of size 2GB then there is no problem, there is plenty of space to accommodate that mapping.
(Actually, there would be one small case where this is not true: if the process' existing mappings were fragmented and scattered around the address space and there was no contiguous 2GB range of addresses available. But that's unlikely).
What mappings are or are not present in a different process' address space has nothing to do with it.
answered Jun 16 '15 at 8:44
Celada
30.2k46383
30.2k46383
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f209928%2fcase-study-of-virtual-memory-management%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't think I understand your question. In a 32-bit environment (address space 4GiB total), if a process already holds a mapping of size 2GB and it requests another mapping of size 2GB, then the second mapping will simply fail. There isn't enough space. That's all there is to it.
– Celada
Jun 16 '15 at 7:10
sorry for the confusion, its not the same process requesting another mapping. Its one process requesting mapping while another already holds the mapping
– Madara
Jun 16 '15 at 8:27