1、Mauerer ffirs.tex V2 - 08/26/2008 3:23am Page iiiProfessionalLinuxKernel ArchitectureWolfgang MauererWileyPublishing,Inc.Mauerer ffirs.tex V2 - 08/26/2008 3:23am Page iiMauerer ffirs.tex V2 - 08/26/2008 3:23am Page iProfessional LinuxKernel ArchitectureIntroduction .xxviiChapter1: IntroductionandOve
2、rview . 1Chapter2: ProcessManagementandScheduling .35Chapter3: MemoryManagement . 133Chapter4: VirtualProcessMemory . 289Chapter5: LockingandInterprocessCommunication. 347Chapter6: DeviceDrivers . 391Chapter7: Modules . 473Chapter8: TheVirtualFilesystem. 519Chapter9: TheExtendedFilesystemFamily . 58
3、3Chapter10:FilesystemswithoutPersistentStorage . 643Chapter11:ExtendedAttributesandAccessControlLists . 707Chapter12:Networks. 733Chapter13:SystemCalls . 819Chapter14:KernelActivities . 847Chapter15:Timemanagement . 893Chapter16:PageandBufferCache. 949Chapter17:DataSynchronization . 989Chapter18:Pag
4、eReclaimandSwapping.1023Chapter19:Auditing .1097AppendixA:ArchitectureSpecifics .1117AppendixB:Workingwith theSourceCode .1141AppendixC:NotesonC .1175AppendixD:SystemStartup .1223AppendixE:TheELFBinaryFormat .1241AppendixF:TheKernelDevelopmentProcess.1267Bibliography .1289Index .1293Mauerer ffirs.te
5、x V2 - 08/26/2008 3:23am Page iiMauerer ffirs.tex V2 - 08/26/2008 3:23am Page iiiProfessionalLinuxKernel ArchitectureWolfgang MauererWileyPublishing,Inc.Mauerer ffirs.tex V2 - 08/26/2008 3:23am Page ivProfessional LinuxKernel ArchitecturePublished byWiley Publishing, Inc.10475 Crosspoint BoulevardIn
6、dianapolis, IN Copyright 2008 by Wolfgang MauererPublished by Wiley Publishing, Inc., Indianapolis, IndianaPublished simultaneously in CanadaISBN: 978-0-470-34343-2Manufactured in the United States of America10987654321Library of Congress Cataloging-in-Publication Data:Mauerer, Wolfgang, 1978-Profes
7、sional Linux kernel architecture / Wolfgang Mauerer.p. cm.Includes index.ISBN 978-0-470-34343-2 (pbk.)1. Linux. 2. Computer architecture. 3. Application software. I. Title.QA76.9.A73M38 2008005.432-dc222008028067No part of this publication may be reproduced, stored in a retrieval system or transmitt
8、ed in any form or by anymeans, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, orauthorization through payment of the appropriat
9、e per-copy fee to the Copyright Clearance Center, 222 RosewoodDrive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should beaddressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317)572-3447, fax
10、(317) 572-4355, or online at http:/ of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warrantieswith respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties,including without limitation warranties of fit
11、ness for a particular purpose. No warranty may be created or extendedby sales or promotional materials. The advice and strategies contained herein may not be suitable for everysituation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting,or othe
12、r professional services. If professional assistance is required, the services of a competent professional personshould be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that anorganization or Website is referred to in this work as a citation and/o
13、r a potential source of further informationdoes not mean that the author or the publisher endorses the information the organization or Website may provideor recommendations it may make. Further, readers should be aware that Internet Websites listed in this work mayhave changed or disappeared between
14、 when this work was written and when it is read.For general information on our other products and services please contact our Customer Care Department within theUnited States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.Trademarks: Wiley, the Wiley logo, Wrox,
15、 the Wrox logo, Wrox Programmer to Programmer, and related trade dressare trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States andother countries, and may not be used without written permission. All other trademarks are the property of theirrespe
16、ctive owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not beavailable in electronic books.Mauerer fauth.tex V2 - 08/22/2008 4:52am Page vAbout
17、 the AuthorWolfgang Mauerer is a quantum physicist whose professional interests are centered around quantumcryptography, quantum electrodynamics, and compilers for you guessed it quantum architectures.With the confirmed capacity of being the worst experimentalist in the known universe, he sticks to
18、thetheoretical side of his profession, which is especially reassuring considering his constant fear of acci-dentally destroying the universe. Outside his research work, he is fascinated by operating systems, andfor more than a decade starting with an article series about the kernel in 1997 he has fo
19、und greatpleasure in documenting and explaining Linux kernel internals. He is also the author of a book abouttypesetting with LaTeX and has written numerous articles that have been translated into seven languagesin total.When hes not submerged in vast Hilbert spaces or large quantities of source cod
20、e, he tries to take theopposite direction, namely, upward be this with model planes, a paraglider, or on foot with an ice axein his hands: Mountains especially have the power to outrival even the Linux kernel. Consequently, heconsiders planning and accomplishing a first-ascent expedition to the vast
21、 arctic glaciers of east Green-land to be the really unique achievement in his life.Being interested in everything that is fundamental, he is also the author of the first compiler forPlankalk ul, the worlds earliest high-level language devised in 19421946 by Konrad Zuse, the father ofthe computer. A
22、s an avid reader, he is proud that despite the two-digit number of computers present inhis living room, the volume required for books still occupies a larger share.Mauerer fauth.tex V2 - 08/22/2008 4:52am Page viMauerer fcredit.tex V2 - 08/22/2008 4:53am Page viiCreditsExecutive EditorCarol LongSeni
23、or Development EditorTom DinseProduction EditorDebra BanningerCopy EditorsCate CaffreyKathryn DugganEditorial ManagerMary Beth WakefieldProduction ManagerTim TateVice President and Executive GroupPublisherRichard SwadleyVice President and ExecutivePublisherJoseph B. WikertProject Coordinator, CoverLynsey StanfordProofreaderPublication Services, Inc.IndexerJack Lewis