Visit to download the full and correct content document: https://ebookmass.com/product/ebook-pdf-operating-system-concepts-10th-edition/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Operating System Forensics 1st Edition Messier
https://ebookmass.com/product/operating-system-forensics-1stedition-messier/

Database System Concepts 6th Edition, (Ebook PDF)
https://ebookmass.com/product/database-system-concepts-6thedition-ebook-pdf/

Operating System Design: The Xinu Approach, Second Edition u2013 Ebook PDF Version 2nd
https://ebookmass.com/product/operating-system-design-the-xinuapproach-second-edition-ebook-pdf-version-2nd/

Intermediate Algebra: Concepts and Applications 10th Edition, (Ebook PDF)
https://ebookmass.com/product/intermediate-algebra-concepts-andapplications-10th-edition-ebook-pdf/

The Design of the UNIX
System Maurice J. Bach
https://ebookmass.com/product/the-design-of-the-unix-operatingsystem-maurice-j-bach/

Database System Concepts 7th Edition Avi Silberschatz
https://ebookmass.com/product/database-system-concepts-7thedition-avi-silberschatz/

Database System Concepts 7th Edition Abraham Silberschatz
https://ebookmass.com/product/database-system-concepts-7thedition-abraham-silberschatz/


Porth’s Pathophysiology: Concepts of Altered Health States 10th Edition, (Ebook PDF)
https://ebookmass.com/product/porths-pathophysiology-concepts-ofaltered-health-states-10th-edition-ebook-pdf/ Biology. Concepts & Applications 10th Edition Cecie Starr
https://ebookmass.com/product/biology-concepts-applications-10thedition-cecie-starr/

Preface
Operatingsystemsareanessentialpartofanycomputersystem.Similarly,a courseonoperatingsystemsisanessentialpartofanycomputerscienceeducation.Thisfieldisundergoingrapidchange,ascomputersarenowprevalent invirtuallyeveryarenaofday-to-daylife—fromembeddeddevicesinautomobilesthroughthemostsophisticatedplanningtoolsforgovernmentsand multinationalfirms.Yetthefundamentalconceptsremainfairlyclear,anditis onthesethatwebasethisbook.
Wewrotethisbookasatextforanintroductorycourseinoperatingsystemsatthejuniororseniorundergraduateleveloratthefirst-yeargraduate level.Wehopethatpractitionerswillalsofindituseful.Itprovidesaclear descriptionofthe concepts thatunderlieoperatingsystems.Asprerequisites, weassumethatthereaderisfamiliarwithbasicdatastructures,computer organization,andahigh-levellanguage,suchasCorJava.Thehardwaretopics requiredforanunderstandingofoperatingsystemsarecoveredinChapter1. Inthatchapter,wealsoincludeanoverviewofthefundamentaldatastructures thatareprevalentinmostoperatingsystems.Forcodeexamples,weusepredominantlyC,aswellasasignificantamountofJava,butthereadercanstill understandthealgorithmswithoutathoroughknowledgeoftheselanguages. Conceptsarepresentedusingintuitivedescriptions.Importanttheoretical resultsarecovered,butformalproofsarelargelyomitted.Thebibliographical notesattheendofeachchaptercontainpointerstoresearchpapersinwhich resultswerefirstpresentedandproved,aswellasreferencestorecentmaterial forfurtherreading.Inplaceofproofs,figuresandexamplesareusedtosuggest whyweshouldexpecttheresultinquestiontobetrue.
Thefundamentalconceptsandalgorithmscoveredinthebookareoften basedonthoseusedinbothopen-sourceandcommercialoperatingsystems. Ouraimistopresenttheseconceptsandalgorithmsinageneralsettingthat isnottiedtooneparticularoperatingsystem.However,wepresentalarge numberofexamplesthatpertaintothemostpopularandthemostinnovative operatingsystems,includingLinux,MicrosoftWindows,ApplemacOS (the originalname, OSX,waschangedin2016tomatchthenamingschemeofother Appleproducts),andSolaris.WealsoincludeexamplesofbothAndroidand iOS,currentlythetwodominantmobileoperatingsystems.
Theorganizationofthetextreflectsourmanyyearsofteachingcourses onoperatingsystems.Considerationwasalsogiventothefeedbackprovided vii
bythereviewersofthetext,alongwiththemanycommentsandsuggestions wereceivedfromreadersofourpreviouseditionsandfromourcurrentand formerstudents.ThisTenthEditionalsoreflectsmostofthecurriculumguidelinesintheoperating-systemsareain ComputerScienceCurricula2013,themost recentcurriculumguidelinesforundergraduatedegreeprogramsincomputer sciencepublishedbythe IEEE ComputingSocietyandtheAssociationforComputingMachinery(ACM).
What’sNewinThisEdition
FortheTenthEdition,wefocusedonrevisionsandenhancementsaimedat loweringcoststothestudents,betterengagingtheminthelearningprocess, andprovidingincreasedsupportforinstructors.
Accordingtothepublishingindustry’smosttrustedmarketresearchfirm, Outsell,2015representedaturningpointintextusage:forthefirsttime, studentpreferencefordigitallearningmaterialswashigherthanforprint,and theincreaseinpreferencefordigitalhasbeenacceleratingsince.
Whileprintremainsimportantformanystudentsasapedagogicaltool,the TenthEditionisbeingdeliveredinformsthatemphasizesupportforlearning fromdigitalmaterials.Allformsweareprovidingdramaticallyreducethecost tostudentscomparedtotheNinthEdition.Theseformsare:
• Stand-alonee-textnowwithsignificanenhancements.Thee-textformat fortheTenthEditionaddsexerciseswithsolutionsattheendsofmain sections,hide/revealdefinitionsforkeyterms,andanumberofanimated figures.Italsoincludesadditional “PracticeExercises” withsolutionsfor eachchapter,extraexercises,programmingproblemsandprojects, “FurtherReading” sections,acompleteglossary,andfourappendicesforlegacy operatingsystems.
• E-textwithprintcompanionbundle.Foranominaladditionalcost,the e-textalsoisavailablewithanabridgedprintcompanionthatincludes aloose-leafcopyofthemainchaptertext,end-of-chapter “PracticeExercises” (solutionsavailableonline),and “FurtherReading” sections.Instructorsmayalsoorderboundprintcompanionsforthebundledpackageby contactingtheirWileyaccountrepresentative.
Althoughwehighlyencourageallinstructorsandstudentstotakeadvantage ofthecost,content,andlearningadvantagesofthee-textedition,itispossible forinstructorstoworkwiththeirWileyAccountManagertocreateacustom printedition.
Toexploretheseoptionsfurtherortodiscussotheroptions,contactyour Wileyaccountmanager(http://www.wiley.com/go/whosmyrep)orvisitthe productinformationpageforthistextonwiley.com
BookMaterial
Thebookconsistsof21chaptersand4appendices.Eachchapterandappendix containsthetext,aswellasthefollowingenhancements:
• Asetofpracticeexercises,includingsolutions
• Asetofregularexercises
• Asetofprogrammingproblems
• Asetofprogrammingprojects
• AFurtherReadingsection
• Pop-updefinitionsofimportant(blue)terms
• Aglossaryofimportantterms
• Animationsthatdescribespecifickeyconcepts
Ahardcopyofthetextisavailableinbookstoresandonline.Thatversionhas thesametextchaptersastheelectronicversion.Itdoesnot,however,include theappendices,theregularexercises,thesolutionstothepracticeexercises, theprogrammingproblems,theprogrammingprojects,andsomeoftheother enhancementsfoundinthisePubelectronicbook.
ContentofThisBook
Thetextisorganizedintenmajorparts:
• Overview.Chapters1and2explainwhatoperatingsystemsare,what theydo,andhowtheyaredesignedandconstructed.Thesechaptersdiscusswhatthecommonfeaturesofanoperatingsystemareandwhatan operatingsystemdoesfortheuser.Weincludecoverageofbothtraditional PC andserveroperatingsystemsandoperatingsystemsformobile devices.Thepresentationismotivationalandexplanatoryinnature.We haveavoidedadiscussionofhowthingsaredoneinternallyinthesechapters.Therefore,theyaresuitableforindividualreadersorforstudentsin lower-levelclasseswhowanttolearnwhatanoperatingsystemiswithout gettingintothedetailsoftheinternalalgorithms.
• Processmanagement.Chapters3through5describetheprocessconcept andconcurrencyastheheartofmodernoperatingsystems.A process is theunitofworkinasystem.Suchasystemconsistsofacollectionof concurrently executingprocesses,someexecutingoperating-systemcode andothersexecutingusercode.Thesechapterscovermethodsforprocess schedulingandinterprocesscommunication.Alsoincludedisadetailed discussionofthreads,aswellasanexaminationofissuesrelatedtomulticoresystemsandparallelprogramming.
• Processsynchronization.Chapters6through8covermethodsforprocess synchronizationanddeadlockhandling.Becausewehaveincreasedthe coverageofprocesssynchronization,wehavedividedtheformerChapter 5(ProcessSynchronization)intotwoseparatechapters:Chapter6,SynchronizationTools,andChapter7,SynchronizationExamples.
• Memorymanagement.Chapters9and10dealwiththemanagementof mainmemoryduringtheexecutionofaprocess.Toimproveboththe
utilizationofthe CPU andthespeedofitsresponsetoitsusers,thecomputermustkeepseveralprocessesinmemory.Therearemanydifferent memory-managementschemes,reflectingvariousapproachestomemory management,andtheeffectivenessofaparticularalgorithmdependson thesituation.
• Storagemanagement.Chapters11and12describehowmassstorageand I/O arehandledinamoderncomputersystem.The I/O devicesthatattach toacomputervarywidely,andtheoperatingsystemneedstoprovidea widerangeoffunctionalitytoapplicationstoallowthemtocontrolall aspectsofthesedevices.Wediscusssystem I/O indepth,including I/O systemdesign,interfaces,andinternalsystemstructuresandfunctions. Inmanyways, I/O devicesaretheslowestmajorcomponentsofthecomputer.Becausetheyrepresentaperformancebottleneck,wealsoexamine performanceissuesassociatedwith I/O devices.
• Filesystems.Chapters13through15discusshowfilesystemsarehandled inamoderncomputersystem.Filesystemsprovidethemechanismforonlinestorageofandaccesstobothdataandprograms.Wedescribetheclassicinternalalgorithmsandstructuresofstoragemanagementandprovide afirmpracticalunderstandingofthealgorithmsused—theirproperties, advantages,anddisadvantages.
• Securityandprotection.Chapters16and17discussthemechanismsnecessaryforthesecurityandprotectionofcomputersystems.Theprocesses inanoperatingsystemmustbeprotectedfromoneanother’sactivities. Toprovidesuchprotection,wemustensurethatonlyprocessesthathave gainedproperauthorizationfromtheoperatingsystemcanoperateon thefiles,memory, CPU,andotherresourcesofthesystem.Protectionis amechanismforcontrollingtheaccessofprograms,processes,orusers tocomputer-systemresources.Thismechanismmustprovideameans ofspecifyingthecontrolstobeimposed,aswellasameansofenforcement.Securityprotectstheintegrityoftheinformationstoredinthesystem (bothdataandcode),aswellasthephysicalresourcesofthesystem,from unauthorizedaccess,maliciousdestructionoralteration,andaccidental introductionofinconsistency.
• Advancedtopics.Chapters18and19discussvirtualmachinesand networks/distributedsystems.Chapter18providesanoverviewof virtualmachinesandtheirrelationshiptocontemporaryoperating systems.Includedisageneraldescriptionofthehardwareandsoftware techniquesthatmakevirtualizationpossible.Chapter19providesan overviewofcomputernetworksanddistributedsystems,withafocuson theInternetand TCP/IP.
• Casestudies.Chapter20and21presentdetailedcasestudiesoftworeal operatingsystems—LinuxandWindows10.
• Appendices.AppendixAdiscussesseveraloldinfluentialoperatingsystemsthatarenolongerinuse.AppendicesBthroughDcoveringreat detaislthreeolderoperatingsystems—Windows7, BSD,andMach.
ProgrammingEnvironments
ThetextprovidesseveralexampleprogramswritteninCandJava.These programsareintendedtoruninthefollowingprogrammingenvironments:
• POSIX. POSIX (whichstandsfor PortableOperatingSystemInterface)representsasetofstandardsimplementedprimarilyfor UNIX-basedoperatingsystems.AlthoughWindowssystemscanalsoruncertain POSIX programs,ourcoverageof POSIX focusesonLinuxand UNIX systems. POSIXcompliantsystemsmustimplementthe POSIX corestandard(POSIX.1); LinuxandmacOS areexamplesof POSIX-compliantsystems. POSIX also definesseveralextensionstothestandards,includingreal-timeextensions (POSIX.1b)andanextensionforathreadslibrary(POSIX.1c,betterknown asPthreads).WeprovideseveralprogrammingexampleswritteninC illustratingthe POSIX base API,aswellasPthreadsandtheextensionsfor real-timeprogramming.TheseexampleprogramsweretestedonLinux4.4 andmacOS 10.11systemsusingthe gcc compiler.
• Java.Javaisawidelyusedprogramminglanguagewitharich API and built-inlanguagesupportforconcurrentandparallelprogramming.Java programsrunonanyoperatingsystemsupportingaJavavirtualmachine (or JVM).Weillustratevariousoperating-systemandnetworkingconcepts withJavaprogramstestedusingVersion1.8oftheJavaDevelopmentKit (JDK).
• Windowssystems.TheprimaryprogrammingenvironmentforWindows systemsistheWindows API,whichprovidesacomprehensivesetoffunctionsformanagingprocesses,threads,memory,andperipheraldevices. WesupplyamodestnumberofCprogramsillustratingtheuseofthis API ProgramsweretestedonasystemrunningWindows10.
Wehavechosenthesethreeprogrammingenvironmentsbecausewe believethattheybestrepresentthetwomostpopularoperating-system models—Linux/UNIX andWindows—alongwiththewidelyusedJava environment.MostprogrammingexamplesarewritteninC,andweexpect readerstobecomfortablewiththislanguage.Readersfamiliarwithboththe CandJavalanguagesshouldeasilyunderstandmostprogramsprovidedin thistext.
Insomeinstances—suchasthreadcreation—weillustrateaspecificconceptusingallthreeprogrammingenvironments,allowingthereadertocontrastthethreedifferentlibrariesastheyaddressthesametask.Inothersituations,wemayusejustoneofthe APIstodemonstrateaconcept.Forexample, weillustratesharedmemoryusingjustthe POSIXAPI;socketprogrammingin TCP/IP ishighlightedusingtheJava API
LinuxVirtualMachine
TohelpstudentsgainabetterunderstandingoftheLinuxsystem,weprovideaLinuxvirtualmachinerunningtheUbuntudistributionwiththistext. Thevirtualmachine,whichisavailablefordownloadfromthetextwebsite
(http://www.os-book.com),alsoprovidesdevelopmentenvironmentsincludingthe gcc andJavacompilers.Mostoftheprogrammingassignmentsinthe bookcanbecompletedusingthisvirtual machine,withtheexceptionofassignmentsthatrequiretheWindows API.Thevirtualmachinecanbeinstalledand runonanyhostoperatingsystemthatcanruntheVirtualBoxvirtualization software,whichcurrentlyincludesWindows10Linux,andmacOS
TheTenthEdition
AswewrotethisTenthEditionof OperatingSystemConcepts, wewereguidedby thesustainedgrowthinfourfundamentalareasthataffectoperatingsystems:
1. Mobileoperatingsystems
2. Multicoresystems
3. Virtualization
4. Nonvolatilememorysecondarystorage
Toemphasizethesetopics,wehaveintegratedrelevantcoveragethroughout thisnewedition.Forexample,wehavegreatlyincreasedourcoverageofthe AndroidandiOS mobileoperatingsystems,aswellasourcoverageofthe ARMv8architecturethatdominatesmobiledevices.Wehavealsoincreased ourcoverageofmulticoresystems,includingincreasedcoverageof APIsthat providesupportforconcurrencyandparallelism.Nonvolatilememorydevices like SSDsarenowtreatedastheequalsofhard-diskdrivesinthechaptersthat discuss I/O,massstorage,andfilesystems.
SeveralofourreadershaveexpressedsupportforanincreaseinJava coverage,andwehaveprovidedadditionalJavaexamplesthroughoutthis edition.
Additionally,wehaverewrittenmaterialinalmosteverychapterbybringingoldermaterialuptodateandremovingmaterialthatisnolongerinterestingorrelevant.Wehavereorderedmanychaptersandhave,insomeinstances, movedsectionsfromonechaptertoanother.Wehavealsogreatlyrevised theartwork,creatingseveralnewfiguresaswellasmodifyingmanyexisting figures.
MajorChanges
TheTenthEditionupdateencompassesmuchmorematerialthanprevious updates,intermsofbothcontentandnewsupportingmaterial.Next,we provideabriefoutlineofthemajorcontentchangesineachchapter:
• Chapter1:Introduction includesupdatedcoverageofmulticoresystems, aswellasnewcoverageof NUMA systemsandHadoopclusters.Old materialhasbeenupdated,andnewmotivationhasbeenaddedforthe studyofoperatingsystems.
• Chapter2:Operating-SystemStructures providesasignificantlyrevised discussionofthedesignandimplementationofoperatingsystems.We haveupdatedourtreatmentofAndroidandiOS andhaverevisedour
coverageofthesystembootprocesswithafocuson GRUB forLinux systems.NewcoverageoftheWindowssubsystemforLinuxisincluded aswell.Wehaveaddednewsectionsonlinkersandloaders,andwenow discusswhyapplicationsareoftenoperating-systemspecific.Finally,we haveaddedadiscussionofthe BCC debuggingtoolset.
• Chapter3:Processes simplifiesthediscussionofschedulingsothatit nowincludesonly CPU schedulingissues.Newcoveragedescribesthe memorylayoutofaCprogram,theAndroidprocesshierarchy,Mach messagepassing,andAndroid RPCs.Wehavealsoreplacedcoverageof thetraditional UNIX/Linux init processwithcoverageof systemd.
• Chapter4:ThreadsandConcurrency (previouslyThreads)increasesthe coverageofsupportforconcurrentandparallelprogrammingatthe API andlibrarylevel.WehaverevisedthesectiononJavathreadssothatit nowincludesfuturesandhaveupdatedthecoverageofApple’sGrand CentralDispatchsothatitnowincludesSwift.Newsectionsdiscussforkjoinparallelismusingthefork-joinframeworkinJava,aswellasIntel threadbuildingblocks.
• Chapter5: CPU Scheduling (previouslyChapter6)revisesthecoverageof multilevelqueueandmulticoreprocessingscheduling.Wehaveintegrated coverageof NUMA-awareschedulingissuesthroughout,includinghow thisschedulingaffectsloadbalancing.WealsodiscussrelatedmodificationstotheLinux CFS scheduler.Newcoveragecombinesdiscussionsof round-robinandpriorityscheduling,heterogeneousmultiprocessing,and Windows10scheduling.
• Chapter6:SynchronizationTools (previouslypartofChapter5,Process Synchronization)focusesonvarioustoolsforsynchronizingprocesses. Significantnewcoveragediscussesarchitecturalissuessuchasinstruction reorderinganddelayedwritestobuffers.Thechapteralsointroduceslockfreealgorithmsusingcompare-and-swap(CAS)instructions.Nospecific APIsarepresented;rather,thechapterprovidesanintroductiontorace conditionsandgeneraltoolsthatcanbeusedtopreventdataraces.Details includenewcoverageofmemorymodels,memorybarriers,andliveness issues.
• Chapter7:SynchronizationExamples (previouslypartofChapter5, ProcessSynchronization)introducesclassicalsynchronizationproblems anddiscussesspecific API supportfordesigningsolutionsthatsolve theseproblems.Thechapterincludesnewcoverageof POSIX namedand unnamedsemaphores,aswellasconditionvariables.Anewsectionon Javasynchronizationisincludedaswell.
• Chapter8:Deadlocks (previouslyChapter7)providesminorupdates, includinganewsectiononlivelockandadiscussionofdeadlockasan exampleofalivenesshazard.Thechapterincludesnewcoverageofthe Linux lockdep andthe BCC deadlock detector tools,aswellascoverage ofJavadeadlockdetectionusingthreaddumps.
• Chapter9:MainMemory (previouslyChapter8)includesseveralrevisionsthatbringthechapteruptodatewithrespecttomemorymanage-
mentonmoderncomputersystems.Wehaveaddednewcoverageofthe ARMv864-bitarchitecture,updatedthecoverageofdynamiclinklibraries, andchangedswappingcoveragesothatitnowfocusesonswappingpages ratherthanprocesses.Wehavealsoeliminatedcoverageofsegmentation.
• Chapter10:VirtualMemory (previouslyChapter9)containsseveralrevisions,includingupdatedcoverageofmemoryallocationon NUMA systems andglobalallocationusingafree-framelist.Newcoverageincludescompressedmemory,major/minorpagefaults,andmemorymanagementin LinuxandWindows10.
• Chapter11:Mass-StorageStructure (previouslyChapter10)addscoverageofnonvolatilememorydevices,suchasflashandsolid-statedisks. Hard-driveschedulingissimplified toshowonlycurrentlyusedalgorithms.Alsoincludedareanewsectiononcloudstorage,updatedRAID coverage,andanewdiscussionofobjectstorage.
• Chapter12,I/O (previouslyChapter13)updatesthecoverageof technologiesandperformancenumbers,expandsthecoverageof synchronous/asynchronousandblocking/nonblocking I/O,andaddsa sectiononvectored I/O.Italsoexpandscoverageofpowermanagement formobileoperatingsystems.
• Chapter13:File-SystemInterface (previouslyChapter11)hasbeen updatedwithinformationaboutcurrenttechnologies.Inparticular,the coverageofdirectorystructureshasbeenimproved,andthecoverageof protectionhasbeenupdated.Thememory-mappedfilessectionhasbeen expanded,andaWindows API examplehasbeenaddedtothediscussion ofsharedmemory.TheorderingoftopicsisrefactoredinChapter13and 14.
• Chapter14:File-SystemImplementation (previouslyChapter12)has beenupdatedwithcoverageofcurrenttechnologies.Thechapternow includesdiscussionsof TRIM andtheAppleFileSystem.Inaddition,the discussionofperformancehasbeenupdated,andthecoverageofjournalinghasbeenexpanded.
• Chapter15:FileSystemInternals isnewandcontainsupdatedinformationfrompreviousChapters11and12.
• Chapter16:Security (previouslyChapter15)nowprecedestheprotectionchapter.Itincludesrevisedandupdatedtermsforcurrentsecurity threatsandsolutions,includingransomwareandremoteaccesstools.The principleofleastprivilegeisemphasized.Coverageofcode-injectionvulnerabilitiesandattackshasbeenrevisedandnowincludescodesamples. Discussionofencryptiontechnologieshasbeenupdatedtofocusonthe technologiescurrentlyused.Coverageofauthentication(bypasswords andothermethods)hasbeenupdatedandexpandedwithhelpfulhints. Additionsincludeadiscussionofaddress-spacelayoutrandomizationand anewsummaryofsecuritydefenses.TheWindows7examplehasbeen updatedtoWindows10.
• Chapter17:Protection (previouslyChapter14)containsmajorchanges. Thediscussionofprotectionringsandlayershasbeenupdatedandnow
Preface xv
referstotheBell–LaPadulamodelandexploresthe ARM modelofTrustZonesandSecureMonitorCalls.Coverageoftheneed-to-knowprinciple hasbeenexpanded,ashascoverageofmandatoryaccesscontrol.SubsectionsonLinuxcapabilities,Darwinentitlements,securityintegrityprotection,system-callfiltering,sandboxing,andcodesigninghavebeenadded. Coverageofrun-time-basedenforcementinJavahasalsobeenadded, includingthestackinspectiontechnique.
• Chapter18:VirtualMachines (previouslyChapter16)includesadded detailsabouthardwareassistancetechnologies.Alsoexpandedisthe topicofapplicationcontainment,nowincludingcontainers,zones,docker, andKubernetes.Anewsectiondiscussesongoingvirtualizationresearch, includingunikernels,libraryoperatingsystems,partitioninghypervisors, andseparationhypervisors.
• Chapter19,NetworksandDistributedSystems (previouslyChapter17) hasbeensubstantiallyupdatedandnowcombinescoverageofcomputer networksanddistributedsystems.Thematerialhasbeenrevisedtobring ituptodatewithrespecttocontemporarycomputernetworksanddistributedsystems.The TCP/IP modelreceivesaddedemphasis,andadiscussionofcloudstoragehasbeenadded.Thesectiononnetworktopologieshasbeenremoved.Coverageofnameresolutionhasbeenexpanded andaJavaexampleadded.Thechapteralsoincludesnewcoverageofdistributedfilesystems,includingMapReduceontopofGooglefilesystem, Hadoop, GPFS,andLustre.
• Chapter20:TheLinuxSystem (previouslyChapter18)hasbeenupdated tocovertheLinux4.i kernel.
• Chapter21:TheWindows10System isanewchapterthatcoversthe internalsofWindows10.
• AppendixA:InfluentiaOperatingSystems hasbeenupdatedtoinclude materialfromchaptersthatarenolongercoveredinthetext.
SupportingWebsite
Whenyouvisitthewebsitesupportingthistextat http://www.os-book.com, youcandownloadthefollowingresources:
• Linuxvirtualmachine
• CandJavasourcecode
• Thecompletesetoffiguresandillustrations
• FreeBSD,Mach,andWindows7casestudies
• Errata
• Bibliography
NotestoInstructors
Onthewebsiteforthistext,weprovideseveralsamplesyllabithatsuggestvariousapproachesforusingthetextinbothintroductoryandadvancedcourses.
Asageneralrule,weencourageinstructorstoprogresssequentiallythrough thechapters,asthisstrategyprovidesthemostthoroughstudyofoperatingsystems.However,byusingthesamplesyllabi,aninstructorcanselecta differentorderingofchapters(orsubsectionsofchapters).
Inthisedition,wehaveaddedmanynewwrittenexercisesandprogrammingproblemsandprojects.Mostofthenewprogrammingassignments involveprocesses,threads,processscheduling,processsynchronization,and memorymanagement.SomeinvolveaddingkernelmodulestotheLinuxsystem,whichrequiresusingeithertheLinuxvirtualmachinethataccompanies thistextoranothersuitableLinuxdistribution.
Solutionstowrittenexercisesandprogrammingassignmentsareavailabletoinstructorswhohaveadoptedthistextfortheiroperating-system class.Toobtaintheserestrictedsupplements,contactyourlocalJohnWiley& Sonssalesrepresentative.YoucanfindyourWileyrepresentativebygoingto http://www.wiley.com/college andclicking “Who’smyrep?”
NotestoStudents
Weencourageyoutotakeadvantageofthepracticeexercisesthatappearatthe endofeachchapter.Wealsoencourageyoutoreadthroughthestudyguide, whichwaspreparedbyoneofourstudents.Finally,forstudentswhoareunfamiliarwith UNIX andLinuxsystems,werecommendthatyoudownloadand installtheLinuxvirtualmachinethatweincludeonthesupportingwebsite. Notonlywillthisprovideyouwithanewcomputingexperience,buttheopensourcenatureofLinuxwillallowyoutoeasilyexaminetheinnerdetailsofthis popularoperatingsystem.Wewishyoutheverybestofluckinyourstudyof operatingsystems!
ContactingUs
Wehaveendeavoredtoeliminatetypos,bugs,andthelikefromthetext.But, asinnewreleasesofsoftware,bugsalmostsurelyremain.Anup-to-dateerrata listisaccessiblefromthebook’swebsite.Wewouldbegratefulifyouwould notifyusofanyerrorsoromissionsinthebookthatarenotonthecurrentlist oferrata.
Wewouldbegladtoreceivesuggestionsonimprovementstothebook. Wealsowelcomeanycontributionstothebookwebsitethatcouldbeofuse tootherreaders,suchasprogrammingexercises,projectsuggestions,on-line labsandtutorials,andteachingtips.E-mailshouldbeaddressedto os-bookauthors@cs.yale.edu.
Acknowledgments
ManypeoplehavehelpeduswiththisTenthEdition,aswellaswiththe previousnineeditionsfromwhichitisderived.
TenthEdition
• RickFarrowprovidedexpertadviceasatechnicaleditor.
• JonathanLevinhelpedoutwithcoverageofmobilesystems,protection, andsecurity.
• AlexIonescuupdatedthepreviousWindows7chaptertoprovideChapter 21:Windows10.
• SarahDiesburgrevisedChapter19:NetworksandDistributedSystems.
• BrendanGreggprovidedguidanceonthe BCC toolset.
• RichardStallman(RMS)suppliedfeedbackonthedescriptionoffreeand open-sourcesoftware.
• RobertLoveprovidedupdatestoChapter20:TheLinuxSystem.
• MichaelShapirohelpedwithstorageand I/O technologydetails.
• RichardWestprovidedinsightonareasofvirtualizationresearch.
• ClayBreshearshelpedwithcoverageofIntelthread-buildingblocks.
• GerryHowsergavefeedbackonmotivatingthestudyofoperatingsystems andalsotriedoutnewmaterialinhisclass.
• JudiPaigehelpedwithgeneratingfiguresandpresentationofslides.
• JayGagneandAudraRissmeyerpreparednewartworkforthisedition.
• OwenGalvinprovidedtechnicaleditingforChapter11andChapter12.
• MarkWogahnhasmadesurethatthesoftwaretoproducethisbook(LATEX andfonts)worksproperly.
• RanjanKumarMeherrewrotesomeofthe LATEX softwareusedintheproductionofthisnewtext.
PreviousEditions
• Firstthreeeditions.Thisbookisderivedfromthepreviouseditions,the firstthreeofwhichwerecoauthoredbyJamesPeterson.
• Generalcontributions.Otherswhohelpeduswithpreviouseditions includeHamidArabnia,RidaBazzi,RandyBentson,DavidBlack,Joseph Boykin,JeffBrumfield,GaelBuckley,RoyCampbell,P.C.Capon,John Carpenter,GilCarrick,ThomasCasavant,BartChilds,AjoyKumarDatta, JoeDeck,SudarshanK.Dhall,ThomasDoeppner,CalebDrake,M.Rasit Eskicio ˘ glu,HansFlack,RobertFowler,G.ScottGraham,RichardGuy, MaxHailperin,RebeccaHartman,WayneHathaway,ChristopherHaynes, DonHeller,BruceHillyer,MarkHolliday,DeanHougen,MichaelHuang, AhmedKamel,MortyKewstel,RichardKieburtz,CarolKroll,Morty Kwestel,ThomasLeBlanc,JohnLeggett,JerroldLeichter,TedLeung,Gary Lippman,CarolynMiller,MichaelMolloy,EuripidesMontagne,Yoichi Muraoka,JimM.Ng,Banu ¨ Ozden,EdPosnak,BorisPutanec,Charles
Qualline,JohnQuarterman,MikeReiter,GustavoRodriguez-Rivera, CarolynJ.C.Schauble,ThomasP.Skinner,YannisSmaragdakis,Jesse St.Laurent,JohnStankovic,AdamStauffer,StevenStepanek,John Sterling,HalStern,LouisStevens,PeteThomas,DavidUmbaugh,Steve Vinoski,TommyWagner,LarryL.Wear,JohnWerth,JamesM.Westall,J. S.Weston,andYangXiang
• SpecifiContributions
◦ RobertLoveupdatedbothChapter20andtheLinuxcoveragethroughoutthetext,aswellasansweringmanyofourAndroid-relatedquestions.
◦ AppendixBwaswrittenbyDaveProbertandwasderivedfromChapter22oftheEighthEditionof OperatingSystemConcepts.
◦ JonathanKatzcontributedtoChapter16.RichardWestprovidedinput intoChapter18.SalahuddinKhanupdatedSection16.7toprovidenew coverageofWindows7security.
◦ PartsofChapter19werederivedfromapaperbyLevyandSilberschatz [1990].
◦ Chapter20wasderivedfromanunpublishedmanuscriptbyStephen Tweedie.
◦ CliffMartinhelpedwithupdatingthe UNIX appendixtocover FreeBSD.
◦ Someoftheexercisesandaccompanyingsolutionsweresuppliedby ArvindKrishnamurthy.
◦ AndrewDeNicolapreparedthestudentstudyguidethatisavailableon ourwebsite.SomeoftheslideswerepreparedbyMarilynTurnamian.
◦ MikeShapiro,BryanCantrill,andJimMauroansweredseveralSolarisrelatedquestions,andBryanCantrillfromSunMicrosystemshelped withthe ZFS coverage.JoshDeesandRobReynoldscontributedcoverageofMicrosoft’s NET.
◦ OwenGalvinhelpedcopy-editChapter18edition.
BookProduction
TheExecutiveEditorwasDonFowley.TheSeniorProductionEditorwasKen Santor.TheFreelanceDevelopmentalEditorwasChrisNelson.TheAssistant DevelopmentalEditorwasRyannDannelly.ThecoverdesignerwasTomNery. ThecopyeditorwasBeverlyPeavler.ThefreelanceproofreaderwasKatrina Avery.ThefreelanceindexerwasWordCo,Inc.TheAptaraLaTexteamconsistedofNeerajSaxenaandLavkush.
PersonalNotes
AviwouldliketoacknowledgeValerieforherlove,patience,andsupport duringtherevisionofthisbook.
Preface xix
PeterwouldliketothankhiswifeCarlaandhischildren,Gwen,Owen, andMaddie.
Gregwouldliketoacknowledgethecontinuedsupportofhisfamily:his wifePatandsonsThomasandJay.
AbrahamSilberschatz,NewHaven,CT PeterBaerGalvin,Boston,MA GregGagne,SaltLakeCity,UT
Contents
PARTONE OVERVIEW
Chapter1Introduction
1.1WhatOperatingSystemsDo4
1.2Computer-SystemOrganization7
1.3Computer-SystemArchitecture15
1.4Operating-SystemOperations21
1.5ResourceManagement27
1.6SecurityandProtection33
1.7Virtualization34
1.8DistributedSystems35
1.9KernelDataStructures36
1.10ComputingEnvironments40
1.11FreeandOpen-SourceOperating Systems46 PracticeExercises53 FurtherReading54
Chapter2Operating-SystemStructures
2.1Operating-SystemServices55
2.2UserandOperating-System Interface58
2.3SystemCalls62
2.4SystemServices74
2.5LinkersandLoaders75
2.6WhyApplicationsAre Operating-SystemSpecific77
2.7Operating-SystemDesignand Implementation79
2.8Operating-SystemStructure81
2.9BuildingandBootinganOperating System92
2.10Operating-SystemDebugging95
2.11Summary100 PracticeExercises101 FurtherReading101
PARTTWO PROCESSMANAGEMENT
Chapter3Processes
3.1ProcessConcept106
3.2ProcessScheduling110
3.3OperationsonProcesses116
3.4InterprocessCommunication123
3.5IPCinShared-MemorySystems125
3.6IPCinMessage-PassingSystems127
3.7ExamplesofIPCSystems132
3.8CommunicationinClient–ServerSystems145
3.9Summary153 PracticeExercises154 FurtherReading156
Contents
Chapter4Threads&Concurrency
4.1Overview160
4.2MulticoreProgramming162
4.3MultithreadingModels166
4.4ThreadLibraries168
4.5ImplicitThreading176
Chapter5CPUScheduling
5.1BasicConcepts200
5.2SchedulingCriteria204
5.3SchedulingAlgorithms205
5.4ThreadScheduling217
5.5Multi-ProcessorScheduling220
5.6Real-TimeCPUScheduling227
4.6ThreadingIssues188
4.7Operating-SystemExamples194
4.8Summary196 PracticeExercises197 FurtherReading198
5.7Operating-SystemExamples234
5.8AlgorithmEvaluation244
5.9Summary250 PracticeExercises251 FurtherReading254
PARTTHREE PROCESSSYNCHRONIZATION
Chapter6SynchronizationTools
6.1Background257
6.2TheCritical-SectionProblem260
6.3Peterson’sSolution262
6.4HardwareSupportfor Synchronization265
6.5MutexLocks270
6.6Semaphores272
6.7Monitors276
6.8Liveness283
6.9Evaluation284
6.10Summary286 PracticeExercises287 FurtherReading288
Chapter7SynchronizationExamples
7.1ClassicProblemsof Synchronization289
7.2Synchronization withintheKernel295
7.3POSIXSynchronization299
7.4SynchronizationinJava303
Chapter8Deadlocks
8.1SystemModel318
8.2DeadlockinMultithreaded Applications319
8.3DeadlockCharacterization321
8.4MethodsforHandlingDeadlocks326
8.5DeadlockPrevention327
7.5AlternativeApproaches311
7.6Summary314 PracticeExercises314 FurtherReading315
8.6DeadlockAvoidance330
8.7DeadlockDetection337
8.8RecoveryfromDeadlock341
8.9Summary343 PracticeExercises344 FurtherReading346
PARTFOUR MEMORYMANAGEMENT
Chapter9MainMemory
9.1Background349
9.2ContiguousMemoryAllocation356
9.3Paging360
9.4StructureofthePageTable371
9.5Swapping376
Chapter10VirtualMemory
10.1Background389
10.2DemandPaging392
10.3Copy-on-Write399
10.4PageReplacement401
10.5AllocationofFrames413
10.6Thrashing419
10.7MemoryCompression425
9.6Example:Intel32-and64-bit Architectures379
9.7Example:ARMv8Architecture383
9.8Summary384 PracticeExercises385 FurtherReading387
10.8AllocatingKernelMemory426
10.9OtherConsiderations430
10.10Operating-SystemExamples436
10.11Summary440 PracticeExercises441 FurtherReading444
PARTFIVE STORAGEMANAGEMENT
Chapter11Mass-StorageStructure
11.1OverviewofMass-Storage Structure449
11.2HDDScheduling457
11.3NVMScheduling461
11.4ErrorDetectionandCorrection462
11.5StorageDeviceManagement463
Chapter12I/OSystems
12.1Overview489
12.2I/OHardware490
12.3ApplicationI/OInterface500
12.4KernelI/OSubsystem508
12.5TransformingI/ORequeststo HardwareOperations516
11.6Swap-SpaceManagement467
11.7StorageAttachment469
11.8RAIDStructure473
11.9Summary485 PracticeExercises486 FurtherReading487
12.6STREAMS519
12.7Performance521
12.8Summary524 PracticeExercises525 FurtherReading526
PARTSIX FILESYSTEM
Chapter13File-SystemInterface
13.1FileConcept529
13.2AccessMethods539
13.3DirectoryStructure541
13.4Protection550
13.5Memory-MappedFiles555
13.6Summary560 PracticeExercises560 FurtherReading561
Chapter14File-SystemImplementation
14.1File-SystemStructure564
14.2File-SystemOperations566
14.3DirectoryImplementation568
14.4AllocationMethods570
14.5Free-SpaceManagement578
14.6EfficiencyandPerformance582
14.7Recovery586
14.8Example:TheWAFLFileSystem589
14.9Summary593 PracticeExercises594 FurtherReading594
Chapter15File-SystemInternals
15.1FileSystems597
15.2File-SystemMounting598
15.3PartitionsandMounting601
15.4FileSharing602
15.5VirtualFileSystems603
15.6RemoteFileSystems605
15.7ConsistencySemantics608
15.8NFS610
15.9Summary615 PracticeExercises616 FurtherReading617
PARTSEVEN SECURITYANDPROTECTION
Chapter16Security
16.1TheSecurityProblem621
16.2ProgramThreats625
16.3SystemandNetworkThreats634
16.4CryptographyasaSecurityTool637
16.5UserAuthentication648
Chapter17Protection
17.1GoalsofProtection667
17.2PrinciplesofProtection668
17.3ProtectionRings669
17.4DomainofProtection671
17.5AccessMatrix675
17.6ImplementationoftheAccess Matrix679
17.7RevocationofAccessRights682
17.8Role-BasedAccessControl683
16.6ImplementingSecurityDefenses653
16.7AnExample:Windows10662
16.8Summary664 FurtherReading665
17.9MandatoryAccessControl (MAC)684
17.10Capability-BasedSystems685
17.11OtherProtectionImprovement Methods687
17.12Language-BasedProtection690
17.13Summary696 FurtherReading697