Source string Read only

(itstool) path: legalnotice/para
60/600
Context English State
_
translator-credits
Design elements of the FreeBSD VM system

<email>dillon@apollo.backplane.com</email>
<personname><firstname>Matthew</firstname><surname>Dillon</surname></personname><affiliation> <_:address-1/> </affiliation>
FreeBSD is a registered trademark of the FreeBSD Foundation.
Linux is a registered trademark of Linus Torvalds.
Microsoft, IntelliMouse, MS-DOS, Outlook, Windows, Windows Media and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
Motif, OSF/1, and UNIX are registered trademarks and IT DialTone and The Open Group are trademarks of The Open Group in the United States and other countries.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the FreeBSD Project was aware of the trademark claim, the designations have been followed by the <quote>™</quote> or the <quote>®</quote> symbol.
$FreeBSD: head/en_US.ISO8859-1/articles/vm-design/article.xml 43184 2013-11-13 07:52:45Z hrs $
The title is really just a fancy way of saying that I am going to attempt to describe the whole VM enchilada, hopefully in a way that everyone can follow. For the last year I have concentrated on a number of major kernel subsystems within FreeBSD, with the VM and Swap subsystems being the most interesting and NFS being <quote>a necessary chore</quote>. I rewrote only small portions of the code. In the VM arena the only major rewrite I have done is to the swap subsystem. Most of my work was cleanup and maintenance, with only moderate code rewriting and no major algorithmic adjustments within the VM subsystem. The bulk of the VM subsystem's theoretical base remains unchanged and a lot of the credit for the modernization effort in the last few years belongs to John Dyson and David Greenman. Not being a historian like Kirk I will not attempt to tag all the various features with peoples names, since I will invariably get it wrong.
This article was originally published in the January 2000 issue of <link xlink:href="http://www.daemonnews.org/">DaemonNews</link>. This version of the article may include updates from Matt and other authors to reflect changes in FreeBSD's VM implementation.
Introduction
Before moving along to the actual design let's spend a little time on the necessity of maintaining and modernizing any long-living codebase. In the programming world, algorithms tend to be more important than code and it is precisely due to BSD's academic roots that a great deal of attention was paid to algorithm design from the beginning. More attention paid to the design generally leads to a clean and flexible codebase that can be fairly easily modified, extended, or replaced over time. While BSD is considered an <quote>old</quote> operating system by some people, those of us who work on it tend to view it more as a <quote>mature</quote> codebase which has various components modified, extended, or replaced with modern code. It has evolved, and FreeBSD is at the bleeding edge no matter how old some of the code might be. This is an important distinction to make and one that is unfortunately lost to many people. The biggest error a programmer can make is to not learn from history, and this is precisely the error that many other modern operating systems have made. <trademark class="registered">Windows NT</trademark> is the best example of this, and the consequences have been dire. Linux also makes this mistake to some degree—enough that we BSD folk can make small jokes about it every once in a while, anyway. Linux's problem is simply one of a lack of experience and history to compare ideas against, a problem that is easily and rapidly being addressed by the Linux community in the same way it has been addressed in the BSD community—by continuous code development. The <trademark class="registered">Windows NT</trademark> folk, on the other hand, repeatedly make the same mistakes solved by <trademark class="registered">UNIX</trademark> decades ago and then spend years fixing them. Over and over again. They have a severe case of <quote>not designed here</quote> and <quote>we are always right because our marketing department says so</quote>. I have little tolerance for anyone who cannot learn from history.
Much of the apparent complexity of the FreeBSD design, especially in the VM/Swap subsystem, is a direct result of having to solve serious performance issues that occur under various conditions. These issues are not due to bad algorithmic design but instead rise from environmental factors. In any direct comparison between platforms, these issues become most apparent when system resources begin to get stressed. As I describe FreeBSD's VM/Swap subsystem the reader should always keep two points in mind:
The most important aspect of performance design is what is known as <quote>Optimizing the Critical Path</quote>. It is often the case that performance optimizations add a little bloat to the code in order to make the critical path perform better.
A solid, generalized design outperforms a heavily-optimized design over the long run. While a generalized design may end up being slower than an heavily-optimized design when they are first implemented, the generalized design tends to be easier to adapt to changing conditions and the heavily-optimized design winds up having to be thrown away.
Any codebase that will survive and be maintainable for years must therefore be designed properly from the beginning even if it costs some performance. Twenty years ago people were still arguing that programming in assembly was better than programming in a high-level language because it produced code that was ten times as fast. Today, the fallibility of that argument is obvious — as are the parallels to algorithmic design and code generalization.
VM Objects
The best way to begin describing the FreeBSD VM system is to look at it from the perspective of a user-level process. Each user process sees a single, private, contiguous VM address space containing several types of memory objects. These objects have various characteristics. Program code and program data are effectively a single memory-mapped file (the binary file being run), but program code is read-only while program data is copy-on-write. Program BSS is just memory allocated and filled with zeros on demand, called demand zero page fill. Arbitrary files can be memory-mapped into the address space as well, which is how the shared library mechanism works. Such mappings can require modifications to remain private to the process making them. The fork system call adds an entirely new dimension to the VM management problem on top of the complexity already given.
ComponentTranslation
This translation Translated FreeBSD Doc/articles_vm-design
FreeBSD is a registered trademark of the FreeBSD Foundation.
Following strings have same context and same source.
Translated FreeBSD Doc/articles_linux-users
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_rc-scripting
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_freebsd-releng
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_gjournal-desktop
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_cups
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_explaining-bsd
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_fonts
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_freebsd-questions
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_freebsd-update-server
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_geom-class
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_hubs
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_filtering-bridge
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_nanobsd
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_pr-guidelines
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_problem-reports
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_releng
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_remote-install
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_serial-uart
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/books_arch-handbook
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_ldap-auth
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_new-users
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_solid-state
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/books_faq
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/books_porters-handbook
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_ipsec-must
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_linux-emulation
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_pam
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_contributors
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/books_developers-handbook
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_bsdl-gpl
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_building-products
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_contributing
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/articles_committers-guide
FreeBSD is a registered trademark of the FreeBSD Foundation.
Translated FreeBSD Doc/books_handbook
FreeBSD is a registered trademark of the FreeBSD Foundation.

Loading…

No matching activity found.

Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: legalnotice/para
Labels
No labels currently set.
Flags
read-only
Source string location
article.translate.xml:18
Source string age
11 months ago
Translation file
string