* VM Vs Swap space
@ 2004-10-06 8:52 Ankit Jain
2004-10-07 1:57 ` chuck gelm
0 siblings, 1 reply; 22+ messages in thread
From: Ankit Jain @ 2004-10-06 8:52 UTC (permalink / raw)
To: newbie
hi
if somebody can tell me that is this correct?
can i say that swap area created by linux is nothign
but virtual memory. is it correct to use the term
interchangeably
thanks
ankit
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-06 8:52 VM Vs Swap space Ankit Jain
@ 2004-10-07 1:57 ` chuck gelm
2004-10-07 6:01 ` kernel kernel
2004-10-07 9:15 ` Ankit Jain
0 siblings, 2 replies; 22+ messages in thread
From: chuck gelm @ 2004-10-07 1:57 UTC (permalink / raw)
To: Ankit Jain; +Cc: newbie
Ankit Jain wrote:
>hi
>
>if somebody can tell me that is this correct?
>
>(1)can i say that swap area created by linux is nothign
>but virtual memory. (2)is it correct to use the term
>interchangeably
>
>thanks
>
>ankit
>
>
(1) A swap file or swap partition can be used as virtual memory.
(2) I am not sure. Why one would wish to use 'swap area'
interchangeably with 'virtual memory'.
:-|
Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 1:57 ` chuck gelm
@ 2004-10-07 6:01 ` kernel kernel
2004-10-07 9:15 ` Ankit Jain
1 sibling, 0 replies; 22+ messages in thread
From: kernel kernel @ 2004-10-07 6:01 UTC (permalink / raw)
To: chuck; +Cc: Ankit Jain, newbie
swap area forms a part of the memory which is used for the memory
objects like the stack when executable
starts running. This anonymous segment will grow dependin upon the
pattern of the functions calls in ur executable
On Wed, 06 Oct 2004 21:57:27 -0400, chuck gelm <chuck@gelm.net> wrote:
> Ankit Jain wrote:
>
> >hi
> >
> >if somebody can tell me that is this correct?
> >
> >(1)can i say that swap area created by linux is nothign
> >but virtual memory. (2)is it correct to use the term
> >interchangeably
> >
> >thanks
> >
> >ankit
> >
> >
> (1) A swap file or swap partition can be used as virtual memory.
> (2) I am not sure. Why one would wish to use 'swap area'
> interchangeably with 'virtual memory'.
> :-|
> Chuck
>
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 1:57 ` chuck gelm
2004-10-07 6:01 ` kernel kernel
@ 2004-10-07 9:15 ` Ankit Jain
2004-10-07 9:25 ` kernel kernel
2004-10-07 10:41 ` chuck gelm
1 sibling, 2 replies; 22+ messages in thread
From: Ankit Jain @ 2004-10-07 9:15 UTC (permalink / raw)
To: chuck; +Cc: newbie
how will u differentiate virtual memory and swap area
thanks
ankit
--- chuck gelm <chuck@gelm.net> wrote:
> Ankit Jain wrote:
>
> >hi
> >
> >if somebody can tell me that is this correct?
> >
> >(1)can i say that swap area created by linux is
> nothign
> >but virtual memory. (2)is it correct to use the
> term
> >interchangeably
> >
> >thanks
> >
> >ankit
> >
> >
> (1) A swap file or swap partition can be used as
> virtual memory.
> (2) I am not sure. Why one would wish to use 'swap
> area'
> interchangeably with 'virtual memory'.
> :-|
> Chuck
>
>
>
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* VM Vs Swap Space
@ 2004-10-07 9:17 Ankit Jain
2004-10-07 19:30 ` Rik van Riel
2004-10-13 22:46 ` Robert White
0 siblings, 2 replies; 22+ messages in thread
From: Ankit Jain @ 2004-10-07 9:17 UTC (permalink / raw)
To: linux
hi
if somebody can tell me that is this correct?
(1)can i say that swap area created by linux is
nothign
but virtual memory. (2)is it correct to use the term
interchangeably
thanks
ankit
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 9:15 ` Ankit Jain
@ 2004-10-07 9:25 ` kernel kernel
2004-10-07 9:37 ` Ankit Jain
2004-10-07 10:41 ` chuck gelm
1 sibling, 1 reply; 22+ messages in thread
From: kernel kernel @ 2004-10-07 9:25 UTC (permalink / raw)
To: Ankit Jain; +Cc: chuck, newbie
Virtual Memory is a policy. Swap Area is a artifact, u use to
implement this policy
Hope makes sense
On Thu, 7 Oct 2004 10:15:15 +0100 (BST), Ankit Jain
<ankitjain1580@yahoo.com> wrote:
> how will u differentiate virtual memory and swap area
>
> thanks
>
> ankit
> --- chuck gelm <chuck@gelm.net> wrote:
> > Ankit Jain wrote:
> >
> > >hi
> > >
> > >if somebody can tell me that is this correct?
> > >
> > >(1)can i say that swap area created by linux is
> > nothign
> > >but virtual memory. (2)is it correct to use the
> > term
> > >interchangeably
> > >
> > >thanks
> > >
> > >ankit
> > >
> > >
> > (1) A swap file or swap partition can be used as
> > virtual memory.
> > (2) I am not sure. Why one would wish to use 'swap
> > area'
> > interchangeably with 'virtual memory'.
> > :-|
> > Chuck
> >
> >
> >
>
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 9:25 ` kernel kernel
@ 2004-10-07 9:37 ` Ankit Jain
2004-10-07 10:31 ` chuck gelm
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: Ankit Jain @ 2004-10-07 9:37 UTC (permalink / raw)
To: kernel kernel; +Cc: newbie
well if we dont have a swap area then shall i say my
system dosent have virtual memory
is this correct? because i feel even if this swap area
is not there then also virtual memory concept exists?
thanks
ankit
--- kernel kernel <unix.hacker@gmail.com> wrote:
> Virtual Memory is a policy. Swap Area is a
> artifact, u use to
> implement this policy
>
> Hope makes sense
>
>
> On Thu, 7 Oct 2004 10:15:15 +0100 (BST), Ankit Jain
> <ankitjain1580@yahoo.com> wrote:
> > how will u differentiate virtual memory and swap
> area
> >
> > thanks
> >
> > ankit
> > --- chuck gelm <chuck@gelm.net> wrote:
> > > Ankit Jain wrote:
> > >
> > > >hi
> > > >
> > > >if somebody can tell me that is this correct?
> > > >
> > > >(1)can i say that swap area created by linux is
> > > nothign
> > > >but virtual memory. (2)is it correct to use the
> > > term
> > > >interchangeably
> > > >
> > > >thanks
> > > >
> > > >ankit
> > > >
> > > >
> > > (1) A swap file or swap partition can be used as
> > > virtual memory.
> > > (2) I am not sure. Why one would wish to use
> 'swap
> > > area'
> > > interchangeably with 'virtual memory'.
> > > :-|
> > > Chuck
> > >
> > >
> > >
> >
> >
>
________________________________________________________________________
> > Yahoo! Messenger - Communicate instantly..."Ping"
> > your friends today! Download Messenger Now
> > http://uk.messenger.yahoo.com/download/index.html
> >
> >
> > -
> > To unsubscribe from this list: send the line
> "unsubscribe linux-newbie" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at
> http://www.linux-learn.org/faqs
> >
>
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 9:37 ` Ankit Jain
@ 2004-10-07 10:31 ` chuck gelm
2004-10-07 16:05 ` Pratik Solanki
2004-10-07 16:07 ` Pratik Solanki
2 siblings, 0 replies; 22+ messages in thread
From: chuck gelm @ 2004-10-07 10:31 UTC (permalink / raw)
To: Ankit Jain; +Cc: kernel kernel, newbie
Ankit Jain wrote:
>well if we dont have a swap area then shall i say my
>system dosent have virtual memory
>
>
Yes, I think so. I think that it is difficult to say that a system
has no 'swap area', because a 'swap area' could be a file.
How can you be sure that none of the files on a system are
a 'swap file' ?
I think that you can say that a system has no 'swap' or 'virtual memory'
if there are no swap areas enabled.
I suggest that the output of 'free' will indicate your swap.
If 'free' indicates that you have no swap, then you have no swap.
If 'free' indicates that you have swap, then you have swap.
>is this correct? because i feel even if this swap area
>is not there then also virtual memory concept exists?
>
A system can have a swap partition and not use it.
A system can have a swap file and not use it.
Swap can be enabled and disabled on a running kernel.
So, at any given instance, a running system can have
or have not 'virtual memory'.
>thanks
>
>ankit
>--- kernel kernel <unix.hacker@gmail.com> wrote:
>
>
>>Virtual Memory is a policy. Swap Area is a
>>artifact, u use to
>>implement this policy
>>
>>Hope makes sense
>>
>>
>>On Thu, 7 Oct 2004 10:15:15 +0100 (BST), Ankit Jain
>><ankitjain1580@yahoo.com> wrote:
>>
>>
>>>how will u differentiate virtual memory and swap
>>>
>>>
>>area
>>
>>
>>>thanks
>>>
>>>ankit
>>>--- chuck gelm <chuck@gelm.net> wrote:
>>>
>>>
>>>>Ankit Jain wrote:
>>>>
>>>>
>>>>
>>>>>hi
>>>>>
>>>>>if somebody can tell me that is this correct?
>>>>>
>>>>>(1)can i say that swap area created by linux is
>>>>>
>>>>>
>>>>nothign
>>>>
>>>>
>>>>>but virtual memory. (2)is it correct to use the
>>>>>
>>>>>
>>>>term
>>>>
>>>>
>>>>>interchangeably
>>>>>
>>>>>thanks
>>>>>
>>>>>ankit
>>>>>
>>>>>
>>>>>
>>>>>
>>>>(1) A swap file or swap partition can be used as
>>>>virtual memory.
>>>>(2) I am not sure. Why one would wish to use
>>>>
>>>>
>>'swap
>>
>>
>>>>area'
>>>>interchangeably with 'virtual memory'.
>>>>:-|
>>>>Chuck
>>>>
>>>>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 9:15 ` Ankit Jain
2004-10-07 9:25 ` kernel kernel
@ 2004-10-07 10:41 ` chuck gelm
2004-10-07 16:09 ` Pratik Solanki
1 sibling, 1 reply; 22+ messages in thread
From: chuck gelm @ 2004-10-07 10:41 UTC (permalink / raw)
To: Ankit Jain; +Cc: newbie
Ankit Jain wrote:
>how will u differentiate virtual memory and swap area
>
>thanks
>
>ankit
>
>
Virtual memory is swap area in use.
Regards, Chuck
> --- chuck gelm <chuck@gelm.net> wrote:
>
>
>>Ankit Jain wrote:
>>
>>
>>
>>>hi
>>>
>>>if somebody can tell me that is this correct?
>>>
>>>(1)can i say that swap area created by linux is
>>>
>>>
>>nothign
>>
>>
>>>but virtual memory. (2)is it correct to use the
>>>
>>>
>>term
>>
>>
>>>interchangeably
>>>
>>>thanks
>>>
>>>ankit
>>>
>>>
>>>
>>>
>>(1) A swap file or swap partition can be used as
>>virtual memory.
>>(2) I am not sure. Why one would wish to use 'swap
>>area'
>>interchangeably with 'virtual memory'.
>>:-|
>>Chuck
>>
>>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 9:37 ` Ankit Jain
2004-10-07 10:31 ` chuck gelm
@ 2004-10-07 16:05 ` Pratik Solanki
2004-10-07 16:07 ` Pratik Solanki
2 siblings, 0 replies; 22+ messages in thread
From: Pratik Solanki @ 2004-10-07 16:05 UTC (permalink / raw)
To: linux-newbie
On Thu, 7 Oct 2004 10:37:40 +0100 (BST), Ankit Jain
<ankitjain1580@yahoo.com> wrote:
> well if we dont have a swap area then shall i say my
> system dosent have virtual memory
No.
> is this correct? because i feel even if this swap area
> is not there then also virtual memory concept exists?
Virtual memory is the reason why applications can think they have 4GB
of memory while your physical machine might actually have only 32MB.
You don't need to have swap in order to have virtual memory, although
its very advantageous to have swap with VM.
Virtual memory maps the viurtual pages (from 0 to 4GB) to actually
physical memory pages (from 0 to however much RAM you have). Swapping
is the process of using the disk to store physical memory pages when
they are not in use, and then restoring them when an application
accesses them.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 9:37 ` Ankit Jain
2004-10-07 10:31 ` chuck gelm
2004-10-07 16:05 ` Pratik Solanki
@ 2004-10-07 16:07 ` Pratik Solanki
2004-10-08 3:29 ` kernel kernel
2 siblings, 1 reply; 22+ messages in thread
From: Pratik Solanki @ 2004-10-07 16:07 UTC (permalink / raw)
To: linux-newbie
On Thu, 7 Oct 2004 10:37:40 +0100 (BST), Ankit Jain
<ankitjain1580@yahoo.com> wrote:
> well if we dont have a swap area then shall i say my
> system dosent have virtual memory
No.
> is this correct? because i feel even if this swap area
> is not there then also virtual memory concept exists?
Virtual memory is the reason why applications can think they have 4GB
of memory while your physical machine might actually have only 32MB.
You don't need to have swap in order to have virtual memory, although
its very advantageous to have swap with VM.
Virtual memory maps the viurtual pages (from 0 to 4GB) to actually
physical memory pages (from 0 to however much RAM you have). Swapping
is the process of using the disk to store physical memory pages when
they are not in use, and then restoring them when an application
accesses them.
Pratik.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 10:41 ` chuck gelm
@ 2004-10-07 16:09 ` Pratik Solanki
[not found] ` <20041007172157.63553.qmail@web52908.mail.yahoo.com>
0 siblings, 1 reply; 22+ messages in thread
From: Pratik Solanki @ 2004-10-07 16:09 UTC (permalink / raw)
To: linux-newbie
On Thu, 07 Oct 2004 06:41:38 -0400, chuck gelm <chuck@gelm.net> wrote:
> Ankit Jain wrote:
>
> >how will u differentiate virtual memory and swap area
> >
> >thanks
> >
> >ankit
> >
> >
> Virtual memory is swap area in use.
umm. A running system can or cannot have swap. Correct me if I am
wrong but you can't disable virtual memory once its enabled, or at the
very least it would be extremely tough to do so and I don't know of
any system that does it. Virtual memory is enabled when the kernel
starts up and stays that way. Swap is a different issue.
Pratik.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
[not found] ` <20041007160656.32450.qmail@web52904.mail.yahoo.com>
@ 2004-10-07 16:13 ` Pratik Solanki
0 siblings, 0 replies; 22+ messages in thread
From: Pratik Solanki @ 2004-10-07 16:13 UTC (permalink / raw)
To: Ankit Jain; +Cc: linux-newbie
Yes. 32 bit address = 2^32 addresses = 4GB
For a 64-bit machine, the limit is 2^64.
Pratik.
On Thu, 7 Oct 2004 17:06:56 +0100 (BST), Ankit Jain
<ankitjain1580@yahoo.com> wrote:
> why limit is upto 4 GB is it due to address bus limit?
>
> thanks
>
> ankit
> --- Pratik Solanki <pratik.solanki.ml@gmail.com>
> wrote:
>
>
> > On Thu, 7 Oct 2004 10:37:40 +0100 (BST), Ankit Jain
> > <ankitjain1580@yahoo.com> wrote:
> > > well if we dont have a swap area then shall i say
> > my
> > > system dosent have virtual memory
> >
> > No.
> >
> > > is this correct? because i feel even if this swap
> > area
> > > is not there then also virtual memory concept
> > exists?
> >
> > Virtual memory is the reason why applications can
> > think they have 4GB
> > of memory while your physical machine might actually
> > have only 32MB.
> > You don't need to have swap in order to have virtual
> > memory, although
> > its very advantageous to have swap with VM.
> >
> > Virtual memory maps the viurtual pages (from 0 to
> > 4GB) to actually
> > physical memory pages (from 0 to however much RAM
> > you have). Swapping
> > is the process of using the disk to store physical
> > memory pages when
> > they are not in use, and then restoring them when an
> > application
> > accesses them.
> >
> > Pratik.
> >
>
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
[not found] ` <20041007172157.63553.qmail@web52908.mail.yahoo.com>
@ 2004-10-07 18:49 ` Pratik Solanki
2004-10-07 22:13 ` chuck gelm
0 siblings, 1 reply; 22+ messages in thread
From: Pratik Solanki @ 2004-10-07 18:49 UTC (permalink / raw)
To: Ankit Jain; +Cc: linux-newbie
[CCing linux-newbie]
On Thu, 7 Oct 2004 18:21:57 +0100 (BST), Ankit Jain
<ankitjain1580@yahoo.com> wrote:
> well i dont know exactly but somewhat i feel that
> there must be some way to disable the virtual memory.
> yaa of course there should be some way. it is not that
> sys cant work without it
Yes, you can have a system without virtual memory. Search for MMUless
linux kernel and you'll see patches/websites.
My point was that disabling VM after its been enabled would tough (if
not impossible). Someone correct me if I am wrong here.
Pratik.
> ankit
> --- Pratik Solanki <pratik.solanki.ml@gmail.com>
> wrote:
>
>
> > On Thu, 07 Oct 2004 06:41:38 -0400, chuck gelm
> > <chuck@gelm.net> wrote:
> > > Ankit Jain wrote:
> > >
> > > >how will u differentiate virtual memory and swap
> > area
> > > >
> > > >thanks
> > > >
> > > >ankit
> > > >
> > > >
> > > Virtual memory is swap area in use.
> >
> > umm. A running system can or cannot have swap.
> > Correct me if I am
> > wrong but you can't disable virtual memory once its
> > enabled, or at the
> > very least it would be extremely tough to do so and
> > I don't know of
> > any system that does it. Virtual memory is enabled
> > when the kernel
> > starts up and stays that way. Swap is a different
> > issue.
> >
> > Pratik.
> > -
> > To unsubscribe from this list: send the line
> > "unsubscribe linux-newbie" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at
> > http://www.linux-learn.org/faqs
>
>
> >
>
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap Space
2004-10-07 9:17 VM Vs Swap Space Ankit Jain
@ 2004-10-07 19:30 ` Rik van Riel
2004-10-13 22:46 ` Robert White
1 sibling, 0 replies; 22+ messages in thread
From: Rik van Riel @ 2004-10-07 19:30 UTC (permalink / raw)
To: Ankit Jain; +Cc: linux
On Thu, 7 Oct 2004, Ankit Jain wrote:
> (2) is it correct to use the term interchangeably
No. Virtual memory can mean a lot of other things, including
the address space of individual processes, or the kernel
address space.
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 18:49 ` Pratik Solanki
@ 2004-10-07 22:13 ` chuck gelm
2004-10-08 2:49 ` Jim Nelson
2004-10-08 15:25 ` Pratik Solanki
0 siblings, 2 replies; 22+ messages in thread
From: chuck gelm @ 2004-10-07 22:13 UTC (permalink / raw)
To: Pratik Solanki; +Cc: Ankit Jain, linux-newbie
Pratik Solanki wrote:
>[CCing linux-newbie]
>
>On Thu, 7 Oct 2004 18:21:57 +0100 (BST), Ankit Jain
><ankitjain1580@yahoo.com> wrote:
>
>
>>well i dont know exactly but somewhat i feel that
>>there must be some way to disable the virtual memory.
>>yaa of course there should be some way. it is not that
>>sys cant work without it
>>
>>
>
>Yes, you can have a system without virtual memory. Search for MMUless
>linux kernel and you'll see patches/websites.
>
>My point was that disabling VM after its been enabled would tough (if
>not impossible). Someone correct me if I am wrong here.
>
>Pratik.
>
I was thinking that an active swap partition was 'virtual memory'.
Why are many folks using capital letters 'VM'. Am I missing
something? Is 'VM' == virtual memory or is there a application
or service called 'VM' ?
Anywho, the only 'virtual memory' I know of is an active
swap file or swap partition and either can be started
or stopped in a running kernel.
(I think.)
Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 22:13 ` chuck gelm
@ 2004-10-08 2:49 ` Jim Nelson
2004-10-08 15:25 ` Pratik Solanki
1 sibling, 0 replies; 22+ messages in thread
From: Jim Nelson @ 2004-10-08 2:49 UTC (permalink / raw)
To: chuck; +Cc: Pratik Solanki, Ankit Jain, linux-newbie
chuck gelm wrote:
> Pratik Solanki wrote:
>
>> [CCing linux-newbie]
>>
>> On Thu, 7 Oct 2004 18:21:57 +0100 (BST), Ankit Jain
>> <ankitjain1580@yahoo.com> wrote:
>>
>>
>>> well i dont know exactly but somewhat i feel that
>>> there must be some way to disable the virtual memory.
>>> yaa of course there should be some way. it is not that
>>> sys cant work without it
>>>
>>
>>
>> Yes, you can have a system without virtual memory. Search for MMUless
>> linux kernel and you'll see patches/websites.
>>
>> My point was that disabling VM after its been enabled would tough (if
>> not impossible). Someone correct me if I am wrong here.
>>
>> Pratik.
>>
> I was thinking that an active swap partition was 'virtual memory'.
> Why are many folks using capital letters 'VM'. Am I missing
> something? Is 'VM' == virtual memory or is there a application
> or service called 'VM' ?
>
> Anywho, the only 'virtual memory' I know of is an active
> swap file or swap partition and either can be started
> or stopped in a running kernel.
> (I think.)
>
> Regards, Chuck
From "Understanding the Linux Kernel":
"Virtual memory acts as a logical layer between the application memory
requests and the hardware Memory Management Unit (MMU)."
It is an abstraction of system memory to provide an
architecture-independent memory interface. It allows for a great many
things, including swap functionality, but its primary function is to
make the details of memory management invisible to application
programmers. You just malloc() some memory, and you don't have to worry
overmuch about far jumps, hardware cache alignment, or other annoying stuff.
It also allows large malloc() calls to succeed, even if physical memory
is completely fragmented, by maintaining a set of page tables that allow
virtual-to-physical mapping of memory addresses.
This is one of the most challenging areas of kernel development, and
very hardware-specific. I tried to understand how it worked recently,
gave myself a splitting headache after 30 minutes, and decided to let it
sit for another year or so until I understand kernel internals, computer
architecture, and assembler much better than I do now :)
Jim
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 16:07 ` Pratik Solanki
@ 2004-10-08 3:29 ` kernel kernel
0 siblings, 0 replies; 22+ messages in thread
From: kernel kernel @ 2004-10-08 3:29 UTC (permalink / raw)
To: Pratik Solanki; +Cc: linux-newbie
In That case, also. There is a implicit Swap area and a Explicit area.
On Thu, 7 Oct 2004 12:07:21 -0400, Pratik Solanki
<pratik.solanki.ml@gmail.com> wrote:
> On Thu, 7 Oct 2004 10:37:40 +0100 (BST), Ankit Jain
> <ankitjain1580@yahoo.com> wrote:
> > well if we dont have a swap area then shall i say my
> > system dosent have virtual memory
>
> No.
>
> > is this correct? because i feel even if this swap area
> > is not there then also virtual memory concept exists?
>
> Virtual memory is the reason why applications can think they have 4GB
> of memory while your physical machine might actually have only 32MB.
> You don't need to have swap in order to have virtual memory, although
> its very advantageous to have swap with VM.
>
> Virtual memory maps the viurtual pages (from 0 to 4GB) to actually
> physical memory pages (from 0 to however much RAM you have). Swapping
> is the process of using the disk to store physical memory pages when
> they are not in use, and then restoring them when an application
> accesses them.
>
> Pratik.
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: VM Vs Swap space
2004-10-07 22:13 ` chuck gelm
2004-10-08 2:49 ` Jim Nelson
@ 2004-10-08 15:25 ` Pratik Solanki
1 sibling, 0 replies; 22+ messages in thread
From: Pratik Solanki @ 2004-10-08 15:25 UTC (permalink / raw)
To: chuck; +Cc: Ankit Jain, linux-newbie
On Thu, 07 Oct 2004 18:13:52 -0400, chuck gelm <chuck@gelm.net> wrote:
> Pratik Solanki wrote:
>
> >[CCing linux-newbie]
> >
> >On Thu, 7 Oct 2004 18:21:57 +0100 (BST), Ankit Jain
> ><ankitjain1580@yahoo.com> wrote:
> >
> >
> >>well i dont know exactly but somewhat i feel that
> >>there must be some way to disable the virtual memory.
> >>yaa of course there should be some way. it is not that
> >>sys cant work without it
> >>
> >>
> >
> >Yes, you can have a system without virtual memory. Search for MMUless
> >linux kernel and you'll see patches/websites.
> >
> >My point was that disabling VM after its been enabled would tough (if
> >not impossible). Someone correct me if I am wrong here.
> >
> >Pratik.
> >
> I was thinking that an active swap partition was 'virtual memory'.
> Why are many folks using capital letters 'VM'. Am I missing
> something? Is 'VM' == virtual memory or is there a application
> or service called 'VM' ?
Yes, VM is virtual memory.
> Anywho, the only 'virtual memory' I know of is an active
> swap file or swap partition and either can be started
> or stopped in a running kernel.
> (I think.)
Swap can be started or stopped. Virtual memory cannot be started or
stopped. Just because you stopped swap does not mean the kernel is not
using virtual memory. The kernel always uses virtual memory (except if
its MMUless) . Swap is used only when the kernel needs more memory
than what's physically available.
Pratik.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: VM Vs Swap Space
2004-10-07 9:17 VM Vs Swap Space Ankit Jain
2004-10-07 19:30 ` Rik van Riel
@ 2004-10-13 22:46 ` Robert White
2004-10-13 23:35 ` David Schwartz
1 sibling, 1 reply; 22+ messages in thread
From: Robert White @ 2004-10-13 22:46 UTC (permalink / raw)
To: 'Ankit Jain', 'linux'
A long but basic explanation of the difference between "Virtual Memory" and "Swap
Space" follows:
-----Original Message-----
From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org]
On Behalf Of Ankit Jain
Sent: Thursday, October 07, 2004 2:18 AM
To: linux
Subject: VM Vs Swap Space
> (1)can I say that swap area created by linux is
> nothing but virtual memory.
It is initially appealing to make this observation, but "swap space" is not "virtual
memory" in exactly the same sense that "disk space" is not "files". When you create
(and mount) swap space you are reserving storage that the kernel *may* use to
temporarily store data it cannot afford to lose while managing memory operations.
But aside from being a big pile of potential, it isn't really anything...
> (2)is it correct to use the term(s) interchangeably
No. These terms are often used interchangeably in Windows documentation. This is
largely an error that comes from the days when all operations in windows were part of
a singular memory map. The confusion is carried forward today as a fossil.
The system (linux/windows/whatever) can have, need, and use virtual memory features
with no "swap space" whatsoever. The only real feature of virtual memory is the idea
that "where something is really stored" is not the same thing as where something (a
program/process/whatever) appears to be stored. This can happen usefully even when
it is all taking place in RAM (memory).
Imagine a computer with only five pages of memory. Imagine a moment when pages 1 3
and 5 are in use, and the system needs to load a program that is two pages long. In
the absence of virtual memory, that program couldn't be loaded because the two
available pages (2 and 4) are not "next to each other" so the program would be broken
in half.
In that same computer *with* virtual memory, the computer can create the "imaginary"
pages 6 and 7. The "virtual memory management hardware" takes the imaginary page 6
and maps it over page 4, and the imaginary page 7 and maps it over page 2. Those two
pages (6 and 7) are "next to each other" in virtual memory (even though the "real
pages" are not) and so could hold a two-page-long program.
Fundamentally, the best way to think about the term "virtual memory" is that a
virtual memory system insulates the way a task/program/programmer needs to see memory
from the way the hardware has memory actually arranged.
So the virtual memory system is playing a card game, where it is shuffling real
storage into place in various virtual/imaginary sets.
Now, in the same way that you, were you playing a game with hundreds of cards, would
like to be able to put some cards aside while sorting through things so that you can
handle the most important cards in play; the computer sometimes would like to put
aside pages of memory that are valid, but that nobody seems to need just now.
A swap file (which is also called a "paging file" in some systems) represents a place
where the system (linux/windows/whatever) can set aside (swap out) the data from a
page of real RAM memory, so that it can reuse that piece of real memory for another
purpose.
If the program that "owns" the original data tries to get to it a "page fault"
happens and the system finds a (usually different) page of real memory that isn't in
use (or that can be swapped out) and puts the data back (swaps) in this original data
page into the new place, and makes that new/other piece of RAM appear (to the
program) as if it had always been there and that it didn't move at all.
There are *LOTS* of other uses for Virtual Memory that have _nothing_ to do with the
swap file. Things like "sharing code" so that if 20 people are using a program the
computer doesn't actually have to have 20 copies of it in 20 different places in
memory. Things like being able to give the "screen memory" to a program to write to
directly, without having to "reserve a hole" for the screen memory in every program.
Things like copy-on-write where you share something until you want to change part of
it, and then the system "magically" makes a private copy of the page containing the
part you changed without it suddenly changing out from under (and crashing) another
program.
"Virtual Memory" is a short-hand name for either the task of making and maintaining
these logical maps/chunks, or the name for any one consistent logical chunk when seen
from inside. If phrase is used without enough context it can get meaningless. But
in no meaningful case is it "interchangeable" with the term "swap space".
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: VM Vs Swap Space
2004-10-13 22:46 ` Robert White
@ 2004-10-13 23:35 ` David Schwartz
2004-10-14 4:09 ` Lee Revell
0 siblings, 1 reply; 22+ messages in thread
From: David Schwartz @ 2004-10-13 23:35 UTC (permalink / raw)
To: Linux-Kernel@Vger. Kernel. Org, 'Ankit Jain',
'linux'
> A long but basic explanation of the difference between "Virtual
> Memory" and "Swap
> Space" follows:
One of the problems with a 'basic' explanation is that you always wind up
leaving out something that someone else things is important. ;)
> Imagine a computer with only five pages of memory. Imagine a
> moment when pages 1 3
> and 5 are in use, and the system needs to load a program that is
> two pages long. In
> the absence of virtual memory, that program couldn't be loaded
> because the two
> available pages (2 and 4) are not "next to each other" so the
> program would be broken
> in half.
Even if it only had one page, it could load half the program in one page.
When the program tried to access the other page, it would fault. The first
page could be discarded and the second loaded. So the system could operate
even if it didn't have enough pages or any swap space.
> Now, in the same way that you, were you playing a game with
> hundreds of cards, would
> like to be able to put some cards aside while sorting through
> things so that you can
> handle the most important cards in play; the computer sometimes
> would like to put
> aside pages of memory that are valid, but that nobody seems to
> need just now.
> A swap file (which is also called a "paging file" in some
> systems) represents a place
> where the system (linux/windows/whatever) can set aside (swap
> out) the data from a
> page of real RAM memory, so that it can reuse that piece of real
> memory for another
> purpose.
Or, if the data is already stored somewhere (if it's a page from a file
that hasn't been modified), it can just throw the page away.
> If the program that "owns" the original data tries to get to it a
> "page fault"
> happens and the system finds a (usually different) page of real
> memory that isn't in
> use (or that can be swapped out) and puts the data back (swaps)
> in this original data
> page into the new place, and makes that new/other piece of RAM
> appear (to the
> program) as if it had always been there and that it didn't move at all.
This works the same whether the place is a file or a swap page.
> "Virtual Memory" is a short-hand name for either the task of
> making and maintaining
> these logical maps/chunks, or the name for any one consistent
> logical chunk when seen
> from inside. If phrase is used without enough context it can get
> meaningless. But
> in no meaningful case is it "interchangeable" with the term "swap space".
Swap space, basically, allows a virtual memory system to move pages that it
can't discard out of precious physical memory.
DS
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: VM Vs Swap Space
2004-10-13 23:35 ` David Schwartz
@ 2004-10-14 4:09 ` Lee Revell
0 siblings, 0 replies; 22+ messages in thread
From: Lee Revell @ 2004-10-14 4:09 UTC (permalink / raw)
To: davids; +Cc: Linux-Kernel@Vger. Kernel. Org, 'Ankit Jain'
On Wed, 2004-10-13 at 19:35, David Schwartz wrote:
> > A long but basic explanation of the difference between "Virtual
> > Memory" and "Swap
> > Space" follows:
>
> One of the problems with a 'basic' explanation is that you always wind up
> leaving out something that someone else things is important. ;)
>
"Unix Internals" by Uresh Vahalia is the best book on the subject I know
of. You could never explain virtual memory in a single mailing list
thread...
Lee
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2004-10-14 4:13 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06 8:52 VM Vs Swap space Ankit Jain
2004-10-07 1:57 ` chuck gelm
2004-10-07 6:01 ` kernel kernel
2004-10-07 9:15 ` Ankit Jain
2004-10-07 9:25 ` kernel kernel
2004-10-07 9:37 ` Ankit Jain
2004-10-07 10:31 ` chuck gelm
2004-10-07 16:05 ` Pratik Solanki
2004-10-07 16:07 ` Pratik Solanki
2004-10-08 3:29 ` kernel kernel
2004-10-07 10:41 ` chuck gelm
2004-10-07 16:09 ` Pratik Solanki
[not found] ` <20041007172157.63553.qmail@web52908.mail.yahoo.com>
2004-10-07 18:49 ` Pratik Solanki
2004-10-07 22:13 ` chuck gelm
2004-10-08 2:49 ` Jim Nelson
2004-10-08 15:25 ` Pratik Solanki
-- strict thread matches above, loose matches on Subject: below --
2004-10-07 9:17 VM Vs Swap Space Ankit Jain
2004-10-07 19:30 ` Rik van Riel
2004-10-13 22:46 ` Robert White
2004-10-13 23:35 ` David Schwartz
2004-10-14 4:09 ` Lee Revell
[not found] <9cb08bfa04100708182c097689@mail.gmail.com>
[not found] ` <20041007160656.32450.qmail@web52904.mail.yahoo.com>
2004-10-07 16:13 ` VM Vs Swap space Pratik Solanki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.