欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    原版的操作系统_精髓与设计原理_第5版chapter01.pdf

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

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

    原版的操作系统_精髓与设计原理_第5版chapter01.pdf

    Computer System OverviewChapter 1Chapter 11Operating SystemOperating SystemEl ih h df Exploits the hardware resources of one or more processors Provides a set of services to system usersMdd I/O Manages secondary memory and I/O devices2Basic ElementsBasic Elements Processor Processor Main Memory volatilevolatile referred to as real memory or primary memory I/O modulesI/O modules secondary memory devices communications equipmentq p terminals System bus communication among processors,memory,and I/O modules3ProcessorProcessorTili Two internal registers Memory address register(MAR)Specifies the address for the next read or write Memory buffer register(MBR)Memory buffer register(MBR)Contains data written into memory or receives data read from memory y I/O address registerI/O buffer register I/O buffer register4Top Level ComponentsTop-Level ComponentsCPUMain MemoryPCMARIRMBRySystemBusInstruction012InstructionInstructionIRMBRI/O ARI/O BRDataDataDataExecutionunitI/O Modulen-2n-1DataBuffersPC=Program counterIR=Instruction registerMAR=Memory address registerFigure 1.1 Computer Components:Top-Level ViewMAR Memory address registerMBR=Memory buffer registerI/O AR=Input/output address registerI/O BR=Input/output buffer register5gu e.Copu e Copo es:opeve V ewProcessor RegistersProcessor RegistersUi ibli t User-visible registers Enable programmer to minimize main-fbti i ii tmemory references by optimizing register useCldi Control and status registers Used by processor to control operating of the processor Used by privileged operating-system routines to control the execution of programs6User Visible RegistersUser-Visible RegistersMbfd bhil May be referenced by machine language Available to all programs-application programs and system programs Types of registersypes oeg s e s Data Address Address Index Segment pointerSegment pointer Stack pointer7User Visible RegistersUser-Visible RegistersAddRi Address Registers Index Involves adding an index to a base value to get an address Segment pointer When memory is divided into segments,yg,memory is referenced by a segment and an offset Stack pointer Points to top of stack8pControl and Status RegistersControl and Status RegistersPCt(PC)Program Counter(PC)Contains the address of an instruction to be fetched Instruction Register(IR)Contains the instruction most recently fetched Program Status Word(PSW)Condition codes Interrupt enable/disable Supervisor/user modeSupervisor/user mode9Control and Status RegistersControl and Status RegistersCdi iC dFl Condition Codes or Flags Bits set by the processor hardware as a result of operations Examplesp es Positive result Negative resultNegative result Zero OverflowOverflow10Instruction ExecutionInstruction ExecutionT Two steps Processor reads instructions from memory Fetches Processor executes each instructionProcessor executes each instruction11Instruction CycleInstruction Cycle12Instruction Fetch and ExecuteInstruction Fetch and ExecuteThfhh ii The processor fetches the instruction from memory Program counter(PC)holds address of the instruction to be fetched nextthe instruction to be fetched next Program counter is incremented after each fetch13Instruction RegisterInstruction Register Fetched instruction is placed in the instruction Fetched instruction is placed in the instruction register Categories Categories Processor-memory Transfer data between processor and memory Transfer data between processor and memory Processor-I/O Data transferred to or from a peripheral device Data processing Arithmetic or logic operation on datal Control Alter sequence of execution14Characteristics of a Hypothetical Machine15Example of Program ExecutionExample of Program Execution16Direct Memory Access(DMA)I/Ohdili h I/O exchanges occur directly with memory Processor grants I/O module authority to read from or write to memoryread from or write to memory Relieves the processor responsibility for the exchange17InterruptsInterruptsIhlif h Interrupt the normal sequencing of the processor Most I/O devices are slower than the processorprocessor Processor must pause to wait for device18Classes of InterruptsClasses of Interrupts19Program Flow of Control Without Interrupts20Program Flow of Control With Interrupts,Short I/O WaitUserI/OProgramProgramI/OCommand14WRITECommand2aWRITEInterruptHandler2b5END3aWRITE3b(b)Interrupts;short I/O wait21(b)Interrupts;short I/O waitProgram Flow of Control With Interrupts;Long I/O Wait22Interrupt HandlerInterrupt HandlerPiilI/O Program to service a particular I/O device Generally part of the operating system23InterruptsInterruptsSdhlf Suspends the normal sequence of execution24Interrupt CycleInterrupt Cycle25Interrupt CycleInterrupt CyclePhk fi Processor checks for interrupts If no interrupts fetch the next instruction pfor the current programIfi tt idid If an interrupt is pending,suspend execution of the current program,and execute the interrupt-handler routine26Timing Diagram Based on Short I/O Wait27Timing Diagram Based on Short I/O Wait28Simple Interrupt ProcessingSimple Interrupt Processing29Changes in Memory and Registers for an Interrupt30Changes in Memory and Registers for an Interrupt31Multiple InterruptsMultiple InterruptsDibl i tthili tt i Disable interrupts while an interrupt is being processed32Multiple InterruptsMultiple InterruptsD fiiitifi tt Define priorities for interrupts33Multiple InterruptsMultiple Interrupts34MultiprogrammingMultiprogrammingPhtht Processor has more than one program to execute The sequence the programs are executed depend on their relative priority and whether they are waiting for I/O After an interrupt handler completes,After an interrupt handler completes,control may not return to the program that was executing at the time of thethat was executing at the time of the interrupt35Memory HierarchyMemory HierarchyFibi Faster access time,greater cost per bit Greater capacity,smaller cost per bitpy,p Greater capacity,slower access speed36Memory HierarchyMemory Hierarchy37Going Down the HierarchyGoing Down the HierarchyDibi Decreasing cost per bit Increasing capacitygpy Increasing access time Decreasing frequency of access of the memory by the processory yp Locality of reference38Secondary MemorySecondary MemoryNl il Nonvolatile Auxiliary memoryyy Used to store program and data files39Disk CacheDisk CacheAifid A portion of main memory used as a buffer to temporarily to hold data for the disk Disk writes are clustered Disk writes are clustered Some data written out may be referenced again.The data are retrieved rapidly from the software cache instead of slowly from disk40Cache MemoryCache MemoryIi ibli Invisible to operating system Increase the speed of memorypy Processor speed is faster than memory dspeed Exploit the principle of localitypppy41Cache MemoryCache Memory42Cache MemoryCache MemoryCififi Contains a copy of a portion of main memory Processor first checks cacheIft fd ihth blk f If not found in cache,the block of memory containing the needed information is moved to the cache and delivered to the processorp43Cache/Main Memory SystemCache/Main Memory SystemMemoryLineaddress0120123Block(K words)NumberTagBlockC-1Block Length(K Wd)(K Words)(a)CachenBlock2n-1WordLength(b)Main memoryFigure 1.17 Cache/Main-Memory StructureFigure 1.17 Cache/Main Memory StructureCache Read OperationCache Read Operation45Cache DesignCache DesignChi Cache size Small caches have a significant impact on performanceperformance Block size The unit of data exchanged between cache and main memoryLblk ihiilb bilif Larger block size more hits until probability of using newly fetched data becomes less than the probability of reusing data that have to beprobability of reusing data that have to be moved out of cache46Cache DesignCache DesignMifi Mapping function Determines which cache location the block will occupy Replacement algorithmReplacement algorithm Determines which block to replaceld()li h Least-Recently-Used(LRU)algorithm47Cache DesignCache DesignW ili Write policy When the memory write operation takes place Can occur every time block is updatedCoccu eve ye b ocs upd ed Can occur only when block is replaced Minimizes memory write operations Minimizes memory write operations Leaves main memory in an obsolete state48Programmed I/OProgrammed I/OI/Od lfth I/O module performs the action,not the processor Sets appropriate bits in the I/O status register No interrupts occur Processor checks status untilProcessor checks status until operation is complete49Interrupt Driven I/OInterrupt-Driven I/OPi i tt dhI/O Processor is interrupted when I/O module ready to exchange data Processor saves context of Processor saves context of program executing and begins executing interrupt-handlergp No needless waiting Consumes a lot of processor time pbecause every word read or written passes through the processor50Direct Memory AccessDirect Memory AccessTfblk f d t Transfers a block of data directly to or from memory An interrupt is sent when the transfer is complete Processor continues with other work51

    注意事项

    本文(原版的操作系统_精髓与设计原理_第5版chapter01.pdf)为本站会员(asd****56)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

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




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开