9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "John S. Dyson" <dyson@iquest.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Virtual memory in BSD and Plan9
Date: Mon, 29 Oct 2001 10:16:32 +0000	[thread overview]
Message-ID: <c66cd78b.0110262017.322e3b58@posting.google.com> (raw)
In-Reply-To: <20011025142927.B8085@honk.eecs.harvard.edu>

wkj-despam@eecs.harvard.edu (William Josephson) wrote in message news:<20011025142927.B8085@honk.eecs.harvard.edu>...
> On Thu, Oct 25, 2001 at 01:55:25PM -0400, Russ Cox wrote:
> > The discussions here were talking about many-years-old
> > systems.  I don't think anyone even mentioned Plan 9's VM system,
> > which is just about the simplest thing you could imagine.
> > The BSDs have oodles more ``features.''  I'd look in
> > www.researchindex.com for the latest stuff, and in McKusick et al.
> > (Design and Implementation of the 4.4BSD OS) for older stuff.
> > You can decide for yourself whether Plan 9 needs any of it.
> 
> You probably want to take a look at Charles Cranor's PHd thesis from
> Washington on UVM.  If I recall correctly, some of the *BSDs (NetBSD,
> FreeBSD?) have picked it up or at least borrowed ideas.
> 
FreeBSD and NetBSD have different VM systems.  FreeBSD's (which I
am the primary implementer), is really a corrected and filled out
MACH VM for UNIX.  It provides lots of the necessary shortcuts
fully virtualized for the process VM forking and things like that.
The original MACH VM port really wasn't meant as being production
ready (per my discussions with Hibler), but was more of a feasibility
exercise.  Even though it wasn't fully made robust in the original
implementations, it wasn't that much worse than many commercial UNIX
VM behaviors.

Probably the biggest difference doesn't occur during 'normal'
memory resident situations, but where FreeBSD has rather advanced
paging stats, and really does put off the thrashfest until the
system doesn't have enough pages to supply an adequate resident
working set.  If there is minimally enough memory, FreeBSD will
converge reasonably quickly, without undue thrashing.  In my early
experiments, it was very satisfying to hear the system 'calm down'
after experiencing thrashing due to a necessary change in working
set population.  Most other systems tended to keep on thrashing
for long periods, even when there was obviously enough memory.  The
pseudo-random pagouts and invalidations from non-FreeBSD systems
tended to really screw up the page reference information on memory
segments being used by otherwise runnable processes.   The relatively
good behavior has been especially useful when running user-mode
windowing systems, where the blocking from poorly chosen page
invalidations can really stop-up the works.

Both FreeBSD's VM and NetBSD's VM work pretty well (no real complaints
from either party), and most/all of the limitations of the original
MACH VM have been expunged.  There were even cases of limitations
that I thought to be unsolvable in the FreeBSD code eventually simply
be an 'exercise in data structures', and the last REAL limitation
due to address space/fork inheritance was remedied as a result of
competition from NetBSD's new VM stuff.

FreeBSDs and NetBSDs code is both adequately portable, and that
should not be a deciding issue.  Frankly, the most important deciding
issue is probably based upon knowledge of the VM code that the
individual who might do the port to Plan 9.  One might make a
'decision' that the VM shouldn't page anyway (except in odd situations),
and so the relative advantages of the two systems becomes less
important.

My philosophy is based upon the fact that an OS MUST NOT just be a fair
weather friend, and from my rather VM-centered viewpoint, I believe that
this includes the fact that VM shouldn't randomly thrash, when it could
more actively converge to a reasonable working set (when possible.)

If starting from scratch, it is really easy to write some code that
works.   However, there is ALOT more work to making a VM system
function under load to maximize availability of CPU cycles.  Unfortunately,
it is clear that VM system behavior is almost always a secondary
priority, because it doesn't specify/benchmark very easily.

John


  parent reply	other threads:[~2001-10-29 10:16 UTC|newest]

Thread overview: 182+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-25 17:55 Russ Cox
2001-10-25 18:29 ` William Josephson
2001-10-26  8:09   ` [9fans] acme bug/annoyance? Matt
2001-10-26 11:36     ` rob pike
2001-10-26 14:43       ` Scott Schwartz
2001-10-29 10:16   ` John S. Dyson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-01-20 20:02 [9fans] Getting started in Plan9 - help Roshan James
2002-01-20 21:01 ` Matt H
2002-01-20 22:02   ` Scott Schwartz
2002-01-22  9:54     ` ozan s yigit
2002-01-23 10:05       ` Bakul Shah
2002-01-21 10:22   ` Boyd Roberts
2002-01-21 10:40     ` John Murdie
2002-01-20 21:03 ` William S.
2002-01-20 21:34 ` William Josephson
2002-01-21  6:53 ` cej
2001-11-13 11:56 [9fans] Virtual memory in BSD and Plan9 forsyth
     [not found] <dhog@plan9.bell-labs.com>
2001-11-01 21:19 ` David Gordon Hogan
2001-11-01 21:23   ` Scott Schwartz
2001-10-30 16:08 bwc
2001-10-30 15:37 bwc
2001-10-29 12:38 rob pike
2001-10-29 12:57 ` Borja Marcos
2001-10-30 15:22 ` Douglas A. Gwyn
2001-10-30 15:22 ` John S. Dyson
2001-10-30 21:13   ` Boyd Roberts
2001-11-02  9:59     ` Thomas Bushnell, BSG
2001-10-30 15:23 ` Ozan Yigit
2001-10-31 10:00   ` John S. Dyson
2001-10-31 18:12     ` Douglas A. Gwyn
2001-10-31 20:21       ` Dan Cross
2001-11-13 10:34         ` John S. Dyson
2001-11-02  9:58 ` Thomas Bushnell, BSG
2001-10-25 16:59 Wladimir Mutel
2001-07-12  8:42 [9fans] architectures forsyth
2001-07-12 13:56 ` Laura Creighton
2001-07-12 16:13 ` Ozan Yigit
2001-07-12 16:33   ` Matt
2001-07-12 18:12     ` Scott Schwartz
2001-07-12 18:16       ` Martin Harriss
2001-07-12 18:43       ` Dan Cross
2001-07-13 14:52         ` Douglas A. Gwyn
2001-07-13 15:13           ` Boyd Roberts
2001-06-26 16:33 [9fans] bitsy question John Packer
2001-06-26 17:10 ` [9fans] " Dan Cross
2001-06-26 19:51   ` John Packer
2001-06-26 20:34     ` Dan Cross
2001-06-29 22:32       ` Boyd Roberts
2001-06-27  1:15     ` [9fans] Two cpu servers? Ish Rattan
2001-06-26 20:09   ` [9fans] Re: bitsy question John Packer
2001-06-26 20:36     ` Dan Cross
2001-06-26 20:18   ` Latchesar Ionkov
2001-06-26 20:28     ` Matt
2001-06-26 22:13       ` Steve Kilbane
     [not found] <matt@proweb.co.uk>
2001-06-12  0:39 ` [9fans] help, i'm in a wet paper bag and I can't get out Matt
2001-06-12  0:55   ` Scott Schwartz
2001-06-12  1:12     ` Boyd Roberts
2001-06-12  1:00   ` Boyd Roberts
2001-06-12  1:30     ` Jonathan Sergent
2001-06-15  8:27     ` Hermann Samso
2001-06-15 11:53       ` Boyd Roberts
2001-06-15 12:18         ` Matt
2001-06-15 14:01         ` Matt
2001-06-15 14:25           ` Boyd Roberts
     [not found] <vikki@proweb.co.uk>
2001-06-10 17:32 ` [9fans] string to list? vikki
2001-06-10 17:47   ` Boyd Roberts
2001-06-10 17:55   ` Boyd Roberts
2001-06-10 18:03   ` Scott Schwartz
2001-06-10 21:48     ` Matt
2001-06-10 22:24       ` Scott Schwartz
2001-06-10 22:30         ` Boyd Roberts
2001-06-09 17:22 [9fans] could those of you who have students check this out for forsyth
2001-06-09 18:50 ` [9fans] Re: the 'science' in computer science andrey mirtchovski
2001-06-09 17:56   ` Boyd Roberts
2001-06-11  8:27     ` pac
2001-06-11 15:19     ` Dan Cross
2001-06-11 21:43       ` Boyd Roberts
     [not found]       ` <0cb501c0f2bf$97cacea0$e8b7c6d4@SOMA>
2001-06-11 22:43         ` paurea
2001-06-12 14:18           ` Dan Cross
2001-06-12 15:50             ` Boyd Roberts
2001-06-12 18:48               ` Dan Cross
2001-06-12  0:09   ` Scott Merrilees
2001-06-12  0:16     ` Boyd Roberts
2001-06-12  0:42       ` Scott Merrilees
2001-06-12  1:08         ` Boyd Roberts
     [not found]   ` <0cc301c0f2c0$78949560$e8b7c6d4@SOMA>
2001-06-12 14:12     ` Dan Cross
2001-06-16 23:34   ` Matt
2001-06-28 21:29     ` Boyd Roberts
2001-06-28 22:03       ` Matt
2001-06-28 23:20         ` George Michaelson
2001-06-29 21:27           ` Boyd Roberts
2001-07-18 15:49           ` Ralph Corderoy
2001-06-29  4:30         ` Lucio De Re
2000-09-07 21:57 [9fans] new versions of graphics programs? rob pike
2000-09-07 22:50 ` Jim Choate
     [not found]   ` <ravage@einstein.ssz.com>
2000-09-07 22:35     ` Tom Duff
2000-09-07 23:24       ` Jim Choate
2000-09-08 15:28         ` please_no_spam_to_
     [not found]           ` <D.M.Pick@qmw.ac.uk>
2000-09-08 16:43             ` Tom Duff
2000-08-18 15:34 [9fans] Re: Solaris thread scheaduling rob pike
     [not found] ` <rob@plan9.bell-labs.com>
2000-08-02 14:48   ` [9fans] pipefile rob pike
2000-08-02 15:49     ` James A. Robinson
2000-08-18 20:25   ` [9fans] Re: Solaris thread scheaduling Tom Duff
2000-09-06 21:59   ` [9fans] Reliable Cray Y-MP C90 Supercomputer rob pike
2000-09-06 22:02     ` James A. Robinson
2000-09-06 22:14       ` Boyd Roberts
2000-09-06 22:11     ` Boyd Roberts
2000-09-07 22:18   ` [9fans] new versions of graphics programs? Tom Duff
2000-11-01 22:23   ` [9fans] /n/smtp rob pike
2000-11-01 22:38     ` Scott Schwartz
2000-11-24  0:41   ` [9fans] Crazy idea... or a new project? rob pike
2000-11-24  0:48     ` Boyd Roberts
2000-11-24 22:13     ` Scott Schwartz
2000-11-24 22:24       ` Boyd Roberts
2001-02-06 17:11   ` [9fans] azerty [french] keyboard support rob pike
2001-02-06 19:10     ` Scott Schwartz
2001-02-06 19:23     ` Dan Cross
2001-02-07 15:23   ` [9fans] 9p2k, fsync rob pike
2001-02-07 18:42     ` Scott Schwartz
2001-02-08  1:19     ` Dan Cross
2001-02-08  9:43       ` Douglas A. Gwyn
2001-02-14 13:51   ` [9fans] isatty rob pike
2001-02-14 16:42     ` Scott Schwartz
2001-03-26 14:12   ` [9fans] sam mod for delete-forward rob pike
2001-03-26 15:37     ` Douglas A. Gwyn
2001-03-27  8:25       ` Boyd Roberts
2001-03-27 14:01         ` Sam
2001-03-27 16:51           ` Dan Cross
2001-03-28  8:37             ` Douglas A. Gwyn
2001-03-29  8:26               ` Boyd Roberts
2001-03-26 15:42     ` Scott Schwartz
2001-05-10 14:59   ` [9fans] snprint(), getfields() specification rob pike
2001-05-10 16:42     ` Scott Schwartz
2001-05-10 18:13     ` Steve Kilbane
2001-05-10 21:38       ` Boyd Roberts
2001-05-11  6:51         ` Steve Kilbane
2001-05-19 14:14   ` Re[4]: [9fans] home, end ^h^j^k^l rob pike
2001-05-19 14:26     ` Re[6]: " Matt H
2001-05-19 22:45       ` [9fans] ls -m Scott Schwartz
2001-05-19 22:50         ` Boyd Roberts
2001-05-19 15:35     ` Re[4]: [9fans] home, end ^h^j^k^l James A. Robinson
2001-05-19 20:36     ` Boyd Roberts
2001-05-19 23:30     ` Richard Elberger
2001-05-20  2:37     ` Boyd Roberts
2001-05-20  7:03     ` Lucio De Re
2001-05-20 11:16     ` paurea
2001-05-20 13:11       ` Boyd Roberts
2001-05-20 13:04     ` Boyd Roberts
2001-05-23  8:24     ` Randolph Fritz
2001-05-23  8:46       ` Re[6]: " Matt H
2001-05-23  9:04         ` Boyd Roberts
2001-05-20  0:16   ` [9fans] ls -m rob pike
2001-05-20  0:31     ` Boyd Roberts
2001-05-20  1:38     ` [9fans] mouse vs key Scott Schwartz
2001-05-20  6:29       ` Dan Cross
2001-05-20  8:09       ` Matt H
2001-05-20 11:35         ` Re[2]: [9fans] mouse vs key - nethack matt
2001-05-20 13:13           ` Boyd Roberts
2001-05-20 12:50         ` [9fans] mouse vs key Boyd Roberts
2001-05-29  4:27   ` [9fans] src vs db rob pike
2001-05-29  4:37     ` Scott Schwartz
2001-07-11 19:22   ` [9fans] sam vs acme rob pike
2001-07-11 20:08     ` James A. Robinson
2001-08-14 12:54   ` [9fans] User Interface rob pike
2001-08-14 15:01     ` James A. Robinson
2001-08-16 13:45     ` phaet0n
2001-08-20  8:57     ` Randolph Fritz
2001-12-02  3:10   ` [9fans] plumb rob pike
2001-12-02  3:31     ` Scott Schwartz
2002-01-30  5:52   ` [9fans] venti rob pike
2002-01-30  6:23     ` George Michaelson
2002-01-30  8:07     ` paurea
2002-01-30 11:17     ` Boyd Roberts
2002-03-01  6:20   ` Fwd: Re: [9fans] samuel (fwd) rob pike
2002-03-01  6:34     ` George Michaelson
2002-03-01 12:04     ` Boyd Roberts
2002-04-27 16:35   ` [9fans] Fourth Release of Plan 9 Now Available rob pike, esq.
2002-04-27 18:24     ` Scott Schwartz
2002-04-27 22:14     ` Laura Creighton
2002-04-29  9:37     ` Andrew
2002-06-28 16:49   ` [9fans] dumb question rob pike, esq.
2002-06-29  2:23     ` Scott Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c66cd78b.0110262017.322e3b58@posting.google.com \
    --to=dyson@iquest.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).