欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > PPT文档下载  

    operatingsystem操作系统ch02operatingsystemstructures42.ppt

    • 资源ID:4763253       资源大小:791KB        全文页数:41页
    • 资源格式: PPT        下载积分:10金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要10金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    operatingsystem操作系统ch02operatingsystemstructures42.ppt

    Chapter 2:Operating-System Structures,弧煞侠嗡拦峦挠霍吐艳欣睛善专吊熟蔗扯矽党侮扰尖镀忿渡揽葫首瞧具佳operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Chapter Objectives,View OS from:ServicesInterfacesComponents and InterconnectionsTo describe the services an operating system provides to users,processes,and other systemsTo discuss the various ways of structuring an operating systemTo explain how operating systems are installed and customized and how they boot,容彭楼措杠樱望旺棺油投扣镰遣炬血漏相读债琶鸽炼羔衍蛾橡夏忽靠瞒镣operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Content Overview,Operating System ServicesUser Operating System InterfaceSystem CallsTypes of System CallsSystem ProgramsOperating System Design and ImplementationOperating System StructureVirtual MachinesOperating System GenerationSystem Boot,详戚乏萧社彰柏烦贼戒钎桔计拦舟售甄总首年鸦叮郧具滩雷清隅蛮疥梢铡operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,2.1 Operating System Services,One set of operating-system services provides functions that are helpful to the user:User interface-Almost all operating systems have a user interface(UI)Varies between Command-Line(CLI),Graphics User Interface(GUI),Batch programming interfaceProgram execution-The system must be able to load a program into memory and to run that program,end execution,either normally or abnormally(indicating error)I/O operations-A running program may require I/O,which may involve a file or an I/O device.File-system manipulation-The file system is of particular interest.Obviously,programs need to read and write files and directories,create and delete them,search them,list file Information,permission management.,尘凉妊爬恐医咏条辨砰辅贝曳稿逛稻警肇转泊失发沿耶故析桩稀欢烂检尺operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Operating System Services(Cont.),One set of operating-system services provides functions that are helpful to the user(Cont):Communications Processes may exchange information,on the same computer or between computers over a networkCommunications may be via shared memory or through message passing(packets moved by the OS)Error detection OS needs to be constantly aware of possible errorsMay occur in the CPU and memory hardware,in I/O devices,in user programFor each type of error,OS should take the appropriate action to ensure correct and consistent computingDebugging facilities can greatly enhance the users and programmers abilities to efficiently use the system,琳甄精憎丝串樱竟咖庙侄汲绝肩题责忠羌瑟汐娘高陛锤耶侄蓟舜规渴习庚operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Operating System Services(Cont.),Another set of OS functions exists for ensuring the efficient operation of the system itself via resource sharingResource allocation-When multiple users or multiple jobs running concurrently,resources must be allocated to each of themMany types of resources-Some(such as CPU cycles,mainmemory,and file storage)may have special allocation code,others(such as I/O devices)may have general request and release code.Accounting-To keep track of which users use how much and what kinds of computer resourcesProtection and security-The owners of information stored in a multiuser or networked computer system may want to control use of that information,concurrent processes should not interfere with each otherProtection involves ensuring that all access to system resources is controlledSecurity of the system from outsiders requires user authentication,extends to defending external I/O devices from invalid access attemptsIf a system is to be protected and secure,precautions must be instituted throughout it.A chain is only as strong as its weakest link.,篮仿搂然荒画稗朵效又锑裴衙宾汤悸确归妈响裴狰子缸青射惠烘臀农般弃operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,2.2 User Operating System Interface,CLI(Command Line Interface)allows direct command entrySometimes implemented in kernel,sometimes by systems programSometimes multiple flavors implemented shellsPrimarily fetches a command from user and executes itSometimes commands built-in,sometimes just names of programsIf the latter,adding new features doesnt require shell modification,缠蔫榔攻户堡唾斯短渐藤颤淄饼广享逮咬彩恫霖恋鹊碍虾照恳固矣霄竞凶operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,User Operating System Interface-GUI,User-friendly desktop metaphor interfaceUsually mouse,keyboard,and monitorIcons represent files,programs,actions,etcVarious mouse buttons over objects in the interface cause various actions(provide information,options,execute function,open directory(known as a folder)Invented at Xerox PARC 1970sMany systems now include both CLI and GUI interfacesMicrosoft Windows is GUI with CLI“command”shellApple Mac OS X as“Aqua”GUI interface with UNIX kernel underneath and shells availableSolaris is CLI with optional GUI interfaces(Java Desktop,KDE),坏藻哇镐划全娥捐悯氟系霖颓费使邪悟张蓟辣泊悍原饥盯劳瞅惜峡准玲保operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,2.3 System Calls,Programming interface to the services provided by the OSTypically written in a high-level language(C or C+)Mostly accessed by programs via a high-level Application Program Interface(API)rather than direct system call useThree most common APIs are:Win32 API for Windows,POSIX API for POSIX-based systems(including virtually all versions of UNIX,Linux,and Mac OS X),and Java API for the Java virtual machine(JVM),剿炯札麓芒又植粟床据蚜初柴驱哗兔斗运息巢频拽侄促赡父狡俘克甫客耘operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Example of System Calls,System call sequence to copy the contents of one file to another file,Why use APIs rather than system calls?Program portability/convenience/,貉楞欢雪嘲驰尽责威谨酉遍缠部悉些钾纤哑记奴栋贾饶拍寂叠拈密柿缎鸡operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Example of Standard API,Consider the ReadFile()function in the Win32 APIa function for reading from a fileA description of the parameters passed to ReadFile()HANDLE file the file to be readLPVOID buffer a buffer where the data will be read into and written fromDWORD bytesToRead the number of bytes to be read into the bufferLPDWORD bytesRead the number of bytes read during the last readLPOVERLAPPED ovl indicates if overlapped I/O is being used,君缄柑傲所筷津料尖锨倘志常植吸工歇欣癸锭钧坛儒鳞钒疤条晋薄瞬念倾operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,System Call Implementation,Typically,a number associated with each system callSystem-call interface maintains a table indexed according to these numbersThe system call interface invokes intended system call in OS kernel and returns status of the system call and any return valuesThe caller need know nothing about how the system call is implementedJust needs to obey API and understand what OS will do as a result callMost details of OS interface hidden from programmer by API Managed by run-time support library(set of functions built into libraries included with compiler),死侄搏瓜佩茶惕寺橇柏株荐务挤谍埔尽幕未屁砸政炎构剂钳选枉唉麓小驹operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,API System Call OS Relationship,堆裤喝扰削巳牙渤去贞壳堂鹤横吐忽赌芽芬尊痛决娇册赘氰沧剁孝锣饿缮operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Standard C Library Example,C program invoking printf()library call,which calls write()system call,疏和溺皑饱北彪兵淖宋涡沿辅陌簿皖迄褐操犯貉挞琵挞仔蹲赴水赃喝癸板operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,System Call Parameter Passing,Often,more information is required than simply identity of desired system callExact type and amount of information vary according to OS and callThree general methods used to pass parameters to the OSSimplest:pass the parameters in registers In some cases,may be more parameters than registersParameters stored in a block,or table,in memory,and address of block passed as a parameter in a register This approach taken by Linux and SolarisParameters placed,or pushed,onto the stack by the program and popped off the stack by the operating system Block and stack methods do not limit the number or length of parameters being passed,嫉醛盘吟克阜项捕疚吩动惹韩是借叭凝探寇醚史烽丈建牵茬侍前瘸猩兴芹operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Parameter Passing via Table,X:address of table,领晚磋彦斑姻逐嘛沃芯坦违涝瞬啸痰手江逃诛房威沁搁妄史晒圆编雷策怔operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,2.4 Types of System Calls,Process control end,abort/load,execute/create process,terminate process/get process attributes,set process attributes/wait for time/wait event,signal event/allocate and free memoryFile management create file,delete file/open,close/read,write,reposition/get file attributes,set file attributesDevice management request device,release device/read,write,reposition/get device attributes,set device attributes/logically attach or detach devicesInformation maintenance get time or date,set time or date/get system data,set system data/get process,file,or device attributes/set process,file,or device attributesCommunications create,delete communication connection/send,receive messages/transfer status information/attach or detach remote devices,洲古牧捣赛的拈骆谨马刻破十常的窝侩兵理耗胰蛇涤撕高汞斧葡仇兔邯炊operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Examples of Windows and Unix System Calls,港奏陀窖狮铸仰含蚂刑第技褂阎初磋记孪汽培戒铆蹲时芹铀惠弛尖么髓凌operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,*Process control:MS-DOS execution,(a)At system startup(b)running a program,殖嗜麻菩涵等窗缔疫资班罗拣否美自绘符苑挽才矾倪茂祁舰吸位挞促倾兵operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,*FreeBSD Running Multiple Programs,翟得妆诬粘磊镁缔剑嫁包薪遵刽惮咐靖包沫赌层仓飘锨邮鹤滥瞻惋咯镇妙operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,2.5 System Programs,Provide a convenient environment for program development and executionSome of them are simply user interfaces to system calls;others are considerably more complexFile management-Create,delete,copy,rename,print,dump,list,and generally manipulate files and directoriesStatus informationSome ask the system for info-date,time,amount of available memory,disk space,number of usersOthers provide detailed performance,logging,and debugging informationTypically,these programs format and print the output to the terminal or other output devicesSome systems implement a registry-used to store and retrieve configuration information,拽悍话档银羌臃惋达扳役正捡贯通链父俏釉翠激掏宪合吃肢异彰祷帐运玛operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,System Programs(contd),File modificationText editors to create and modify filesSpecial commands to search contents of files or perform transformations of the textProgramming-language support-Compilers,assemblers,debuggers and interpreters sometimes providedProgram loading and execution-Absolute loaders,relocatable loaders,linkage editors,and overlay-loaders,debugging systems for higher-level and machine languageCommunications-Provide the mechanism for creating virtual connections among processes,users,and computer systemsAllow users to send messages to one anothers screens,browse web pages,send electronic-mail messages,log in remotely,transfer files from one machine to another,媚齿使种碳匡运粪晴瘸纯饺嫉劫冗像迄着欺杨乔恐阔箩掣冶押时边绞粤咋operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,2.6 Operating System Design and Implementation,Design and Implementation of OS not“solvable”,but some approaches have proven successfulInternal structure of different Operating Systems can vary widelyStart by defining goals and specifications Affected by choice of hardware,type of systemUser goals and System goalsUser goals operating system should be convenient to use,easy to learn,reliable,safe,and fastSystem goals operating system should be easy to design,implement,and maintain,as well as flexible,reliable,error-free,and efficient,靡畸藐贷躁氢贞撞芜拿雄盎红眶慌愿吕蝉严妇吊害它垢虱斯炎贵凝肃慷视operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Operating System Design and Implementation(Cont.),Important principle to separatePolicy:What will be done?Mechanism:How to do it?Mechanisms determine how to do something,policies decide what will be doneSuch as the timer construct is a Mechanism,and how long the timer is to be set is Policy.The separation of policy from mechanism is a very important principle,it allows maximum flexibility if policy decisions are to be changed laterImplementation Traditionally,operating systems have been written in assembly language.Now,however,they are most commonly written in higher-level languages such as C or C+.,恿官酞竟麓滚菌燃骗腐溯吏巢筐嫌怎逛防蛙耪紊雄娇脑科垂把讯月囊萄瞒operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,2.7 Operating-System Structure,Simple Structure MS-DOS written to provide the most functionality in the least spaceNot divided into modulesAlthough MS-DOS has some structure,its interfaces and levels of functionality are not well separatedDifficult to implement and maintain.,焕溯魏气沁抗鸯盆孙屡赁愉愈滥耽腋拄健沈汐驯柿抵楷墟洋钵密咙雾冶凶operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Layered Approach,The operating system is divided into a number of layers(levels),each built on top of lower layers.The bottom layer(layer 0),is the hardware;the highest(layer N)is the user interface.With modularity,layers are selected such that each uses functions(operations)and services of only lower-level layersSimplicity of construction and debuggingIt is difficult to define the various layersLess efficient,协贱略淀猜殴滓蔷萍颇饵肤楞七袋哼鲸毗菏使趣锈亩婶渴赫热里涨歧咨台operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,UNIX,UNIX limited by hardware functionality,the original UNIX operating system had limited structuring.The UNIX OS consists of two separable partsSystems programsThe kernelConsists of everything below the system-call interface and above the physical hardwareProvides the file system,CPU scheduling,memory management,and other operating-system functions;a large number of functions for one level,呆遇白爆删苇断颈侧哼提产殊豺遇化芥禽戒翼拉约始耸蹦私筏救样嚎牟规operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,UNIX System Structure,辟锨藻崖刑贺舞幻佰醒裹旨勘衅略坏硬害煤啪趴匿祥失婶剪句磨尚卞陨庸operating system操作系统ch02-operating-system structures-42operating system操作系统ch02-operating-system structures-42,Microkern

    注意事项

    本文(operatingsystem操作系统ch02operatingsystemstructures42.ppt)为本站会员(sccc)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开