Unix Programming - What is the active page in Linux kernel, so inactive?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2007 > What is the active page in Linux kernel, so inactive?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author What is the active page in Linux kernel, so inactive?
Bin Chen

2007-03-30, 1:19 pm

I am quite confusing about the concept that Linux usage of the term
active and inactive pages. Some book tells me active pages is the
'working set' in system, but what is the 'working set'? There is a
page cache system in the system, and when a page is freed when not
needed by some way, the page will first considered be added to the
page cache. Once some stuff need more pages, it also get it from page
cache.

So it is easy to understand that there is two list in the page cache,
one for 'used' pages, that is, the page actually used by some one. And
the other one is 'unused', that is, unused by any one but is still
cached.

But I doubt whether the 'used' and 'unused' correspond to active and
inactive correctly? If I am right, when the system memory is tight,
the pages in the active list will be swapped out and the pages will be
added to the inactive list? Or the pages that has swapped out go
directly to the buddy allocator?

Thanks in advance.

abai

Tauno Voipio

2007-03-30, 1:19 pm

Bin Chen wrote:
> I am quite confusing about the concept that Linux usage of the term
> active and inactive pages. Some book tells me active pages is the
> 'working set' in system, but what is the 'working set'? There is a
> page cache system in the system, and when a page is freed when not
> needed by some way, the page will first considered be added to the
> page cache. Once some stuff need more pages, it also get it from page
> cache.
>
> So it is easy to understand that there is two list in the page cache,
> one for 'used' pages, that is, the page actually used by some one. And
> the other one is 'unused', that is, unused by any one but is still
> cached.
>
> But I doubt whether the 'used' and 'unused' correspond to active and
> inactive correctly? If I am right, when the system memory is tight,
> the pages in the active list will be swapped out and the pages will be
> added to the inactive list? Or the pages that has swapped out go
> directly to the buddy allocator?



Get a textbook that handles virtual memory management.

You're asking for the textbook basics.

--

Tauno Voipio
tauno voipio (at) iki fi
Bin Chen

2007-03-31, 1:25 am

On 3=D4=C231=C8=D5, =C9=CF=CE=E72=CA=B118=B7=D6, Tauno Voipio <tauno.voi...=
@INVALIDiki.fi> wrote:
> Bin Chen wrote:
>
>
>
> Get a textbook that handles virtual memory management.
>
> You're asking for the textbook basics.

Your reply seems very useless. If what I am asking is really basics,
you can point me to a real book and the part describes this in detail.
Otherwise, you can type a simple 'yes' or 'no' to my question, this at
least give me a hint.
And, after I google this, I found a mail in LKML discuss this too.
http://kerneltrap.org/node/7608

The author of the page cache says it uses two list to avoid cache
pollution.


Barry Margolin

2007-03-31, 1:25 am

In article <1175301465.542173.189030@r56g2000hsd.googlegroups.com>,
"Bin Chen" <binary.chen@gmail.com> wrote:

> On 3月31日, 上午2时18分, Tauno Voipio <tauno.voi...@INVALIDiki.fi> wrote:
> Your reply seems very useless. If what I am asking is really basics,
> you can point me to a real book and the part describes this in detail.


A good textbook on this is "Operating Systems" by Deitel, Deitel, and
Choffnes. It explains almost all aspects of modern OS design, and has
appendixes explaining how these are implemented in Windows XP and Linux.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

2007-03-31, 7:20 am

In article <1175301465.542173.189030@r56g2000hsd.googlegroups.com>,
Bin Chen <binary.chen@gmail.com> wrote:

>Your reply seems very useless.


Do you think you are owed more?

Tauno Voipio

2007-03-31, 1:16 pm

Bin Chen wrote:
> On 3月31日, 上午2时18分, Tauno Voipio <tauno.voi...@INVALIDiki.fi> wrote:
>
>
> Your reply seems very useless. If what I am asking is really basics,
> you can point me to a real book and the part describes this in detail.
> Otherwise, you can type a simple 'yes' or 'no' to my question, this at
> least give me a hint.
> And, after I google this, I found a mail in LKML discuss this too.
> http://kerneltrap.org/node/7608
>
> The author of the page cache says it uses two list to avoid cache
> pollution.



It seems that you're in need for the basics of O/S programming.

You could start with e.g. Understanding the Linux Kernel, published
by O'Reilly.

--

Tauno Voipio
tauno voipio (at) iki fi
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com