资源描述:
《Chapter 1Introduction》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Chapter1IntroductionContents1.1Whatisanoperatingsystem(OS)?1.2HistoryofOS1.3TheOSzoo1.4OSconcept1.5ThefunctionsofOS1.6Systemcalls1.7OSstructure2Operatingsystem(OS)ThejobofOS:Toprovideuserprogramswithabetter,simpler,cleaner,modelofthecomputerTohandlemanagingalltheresources(on
2、eormoreprocessors,somemainmemory,disks,printers,akeyboard,amouse,adisplay,networkinterfaces,andvariousotherinput/outputdevices.)3Twomodesofoperation(运行模式)ofcomputers:Kernelmode(内核态,也称管态、核心态)Usermode(用户态)TheOSrunsinkernelmode,itcanaccesstoallthehardwareandcanexecuteanyinstruc
3、tionthemachineiscapableofexecuting.Therestofthesoftwarerunsinusermode,inwhichonlyasubsetofthemachineinstructionsisavailable.4WheretheOSfitsin51.1WhatisanOS1.1.1TheOSasanextendedmachineTop-downview1.1.2TheOSasaresourcemanagerBottom-upview61.1.1TheOSasanextendedmachineTheOSpr
4、ovidesabstractions(抽象)toapplicationprograms.Goodabstractionsturnanearlyimpossibletaskintotwomanageableones.Thefirstone:defineandimplementtheabstractionsThesecondone:usetheseabstractionstosolvetheproblemathand7OneofthemajortasksoftheOSistohidethehardwareandpresentprograms(and
5、theirprogrammers)withnice,clean,elegant,consistent,abstractionstoworkwithinstead.8OSturnsuglyhardwareintobeautifulabstractions91.1.2TheOSasaresourcemanagerFromthisview,OSisdesignedtomanageallthepiecesofacomplexsystem.ThejobofOSistoprovideforanorderlyandcontrolledallocationof
6、theprocessors,memories,andI/Odevicesamongthevariousprograms.10Resourcemanagementincludesmultiplexingresourcesintwodifferentways:timemultiplexing(时分复用)Forexample:CPU,printerspacemultiplexing(空分复用)Forexample:mainmemory,disk11操作系统(OS)的定义资源管理的观点操作系统是控制和管理计算机软、硬件资源,合理地组织计算机的工作流程,
7、以及方便用户使用的程序集合。本质123用户的观点操作系统是配置在计算机硬件上的第一层软件,是对硬件系统的第一次扩充。121.2HistoryofOSSinceoperatingsystemshavecloselytiedtothearchitectureofthecomputersonwhichtheyrun,wewilllookatsuccessivegenerationsofcomputerstoseewhattheiroperatingsystemswerelike.131.2.1Thefirstgeneration:vacuumtub
8、esInthisgeneration,allprogrammingwasdoneinabsolutemachinelanguage,orevenwor