Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #22801

Re: Will 'free' return the memory Immediately to the OS ?

From Stephen Sprunk <stephen@sprunk.org>
Newsgroups comp.lang.c
Subject Re: Will 'free' return the memory Immediately to the OS ?
Date 2012-06-26 10:33 -0500
Organization A noiseless patient Spider
Message-ID <jscknn$7nc$1@dont-email.me> (permalink)
References (5 earlier) <jp6j5t$q4m$1@dont-email.me> <jp6ott$t0q$1@dont-email.me> <jpgrn5$hbu$1@dont-email.me> <874nr8djxa.fsf@blp.benpfaff.org> <4fe7ee7f$0$10088$882e7ee2@usenet-news.net>

Show all headers | View raw


On 24-Jun-12 23:49, Robert Miles wrote:
> On 5/22/2012 3:45 PM, Ben Pfaff wrote:
>> Stephen Sprunk <stephen@sprunk.org> writes:
>>> There's that problem too, but I was thinking more along the lines
>>> of 4MB pages taking ~1000 times as long as 4kB pages to evict and
>>> reload.
>>
>> I doubt that that is true, though.  I'd suspect that 4 MB pages
>> take less than 100 times as long as 4 kB pages to evict and
>> reload, maybe much less.
>>
>> I tried to find some measurements online to support this point,
>> but couldn't quickly find anything relevant.
> 
> I'd expect that to depend heavily on the rotation speed of the hard
> drive.  Eviction and reloading should each take at least an average
> of half a rotation, plus however long it takes to read or write that
> much data.
> 
> The fastest common speed for hard drives for home computers is
> 7200 RPM, although 10000 RPM is available but not common yet.
> 
> Some hard drives have memory caches to help with this if a read
> request comes soon enough after a write request for the same data.
> 
> Also, SSD drives don't use a rotating disk - they only use a slower
> interface to memory chips, and are therefore much faster than hard
> drives.

AFAIK, 10,000rpm drives, 7,200rpm drives, caching drives, and SSD drives
were not available in the consumer x86 market at the time the i386 was
being designed, which is when 4kB/4MB page sizes were chosen.

And, if you study the x86 (and even x64) page table system, there's
really no good way to add an intermediate page size without basically
revamping the entire system--which means OS developers would have to
throw away all of the paging code and experience they've built up over
the last two and a half decades of x86 development.

S

-- 
Stephen Sprunk         "God does not play dice."  --Albert Einstein
CCIE #3723         "God is an inveterate gambler, and He throws the
K5SSS        dice at every possible opportunity." --Stephen Hawking

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Will 'free' return the memory Immediately to the OS ? Raj Pashwar <raj121190@hotmail.NOSPAM.com> - 2012-05-15 21:34 +0000
  Re: Will 'free' return the memory Immediately to the OS ? Ian Collins <ian-news@hotmail.com> - 2012-05-16 09:55 +1200
  Re: Will 'free' return the memory Immediately to the OS ? James Kuyper <jameskuyper@verizon.net> - 2012-05-15 18:42 -0400
  Re: Will 'free' return the memory Immediately to the OS ? Keith Thompson <kst-u@mib.org> - 2012-05-15 16:49 -0700
  Re: Will 'free' return the memory Immediately to the OS ? Ben Pfaff <blp@cs.stanford.edu> - 2012-05-15 16:59 -0700
  Re: Will 'free' return the memory Immediately to the OS ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-15 20:24 -0400
  Re: Will 'free' return the memory Immediately to the OS ? David T. Ashley <dashley@gmail.com> - 2012-05-16 13:29 -0400
    Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-16 18:36 -0500
      Re: Will 'free' return the memory Immediately to the OS ? David T. Ashley <dashley@gmail.com> - 2012-05-17 09:47 -0400
        Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-17 11:22 -0500
        Re: Will 'free' return the memory Immediately to the OS ? Kaz Kylheku <kaz@kylheku.com> - 2012-05-17 16:54 +0000
          Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-18 12:30 -0500
        Re: Will 'free' return the memory Immediately to the OS ? Keith Thompson <kst-u@mib.org> - 2012-05-17 14:09 -0700
        Re: Will 'free' return the memory Immediately to the OS ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-17 21:05 -0400
          Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-18 17:41 -0500
            Re: Will 'free' return the memory Immediately to the OS ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-18 20:19 -0400
              Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-22 15:08 -0500
                Re: Will 'free' return the memory Immediately to the OS ? Ben Pfaff <blp@cs.stanford.edu> - 2012-05-22 13:45 -0700
                Re: Will 'free' return the memory Immediately to the OS ? Robert Wessel <robertwessel2@yahoo.com> - 2012-05-23 03:02 -0500
                Re: Will 'free' return the memory Immediately to the OS ? Robert Miles <milesrf@Usenet-News.net> - 2012-06-24 23:49 -0500
                Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-06-26 10:33 -0500
        Re: Will 'free' return the memory Immediately to the OS ? jgk@panix.com (Joe keane) - 2012-05-18 19:44 +0000
          Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-18 17:27 -0500
            Re: Will 'free' return the memory Immediately to the OS ? jgk@panix.com (Joe keane) - 2012-05-22 21:52 +0000
              Re: Will 'free' return the memory Immediately to the OS ? Ian Collins <ian-news@hotmail.com> - 2012-05-23 11:12 +1200
                Re: Will 'free' return the memory Immediately to the OS ? Robert Wessel <robertwessel2@yahoo.com> - 2012-05-23 03:15 -0500
    Re: Will 'free' return the memory Immediately to the OS ? Robert Wessel <robertwessel2@yahoo.com> - 2012-05-17 11:54 -0500

csiph-web