操作系统PPT课件.ppt_第1页
操作系统PPT课件.ppt_第2页
操作系统PPT课件.ppt_第3页
操作系统PPT课件.ppt_第4页
操作系统PPT课件.ppt_第5页
已阅读5页,还剩295页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

操作系统 OperatingSystem 计算机科学与技术系教授 孙辉博士 操作系统课程的主要内容及学习目的 一 主要内容 2 进程管理及处理机调度 1 操作系统概述及相关的背景知识介绍 3 存储管理及虚拟内存管理 5 文件管理 4 设备管理 二 学习目的 2 通过学习 了解系统编程的方法 3 学习系统程序设计中的思考方式和处理问题的技巧 提高程序设计能力和计算机应用能力 1 通过系统学习操作系统知识 深入了解其工作原理和计算机运作过程 更好地使用操作系统 4 为后续相关课程打下基础 三 主要参考书 5 JimMauroRichardMcDougall Solaris内核结构 冯锐等译 机械工业出版社 4 陈莉君 深入分析Linux内核源代码 人民邮电出版社 1 WilliamStallings OperatingSystemsInternalsandDesignPrinciples操作系统 精髓与设计原理 第五版 影印版 电子工业出版社 2006 3 本课程教材 2AbrahamSilberschatz PeterGalvin GregGagneOPERATINGSYSTEMCONCEPTS 操作系统概念 第六版 影印版 高等教育出版社 2002 5 3孙钟秀主编 操作系统教程 第三版 高等教育出版社 2003年8月 附电子讲稿 Chapter1IntroductionofOperatingSystem 操作系统概述 Mainpoints 1计算机系统的基本知识 2操作系统的基本概念 3操作系统的发展 4操作系统的主要成就 5现代操作系统的特征 6典型的操作系统简介 计算机系统概述 1 1ComputerSystemOverview hardware Processor 中央处理器 MainMemory 主存储器 物理内存 ReferredtoasrealmemoryorprimarymemoryVolatile 多变性 I Omodules 输入 输出设备 secondarymemorydevices 辅助存储器 外存 communicationsequipmentterminalsSystembus 系统总线 communicationamongprocessors memory andI Omodules 1 1 1BasicElements 计算机的基本元素 Top LevelComponents 1 1 2ProcessorRegisters 处理器寄存器 1 1 3InstructionCycle 指令执行周期 InstructionFetchExecute InstructionRegister 程序执行例 START FetchNextInstruction ExecuteInstruction HALT FetchCycle ExecuteCycle 1 1 4DirectMemoryAccess DMA 直接存储器存取 I OexchangesoccurdirectlywithmemoryProcessorgrantsI OmoduleauthoritytoreadfromorwritetomemoryRelievestheprocessorresponsibilityfortheexchangeProcessorisfreetodootherthings ClassesofInterrupts中断的分类 InterruptHandler中断处理 InterruptCycle中断周期 Interrupts中断的概念 1 1 5Interrupts 1 2OperatingSystemOverview software 操作系统概述 1 Aprogramthatcontrolstheexecutionofapplicationprograms 2 Aninterfacebetweenapplicationsandhardware 1 2 1OperatingSystem操作系统定义 一个控制应用程序的执行的程序 应用程序和计算机硬件之间的接口 OperatingSystem FunctionssamewayasordinarycomputersoftwareItisprogramthatisexecutedOperatingsystemrelinquishes 释放 controloftheprocessortoexecuteotherprograms 操作系统控制整个计算机的运行 但与一般的控制机制相比 有如下两点不同 操作系统作为资源管理器 1 2 2OperatingSystemObjectives操作系统设计的目标 Convenience 方便 MakesthecomputermoreconvenienttouseEfficiency 效率 AllowscomputersystemresourcestobeusedinanefficientmannerAbilitytoevolve 扩展能力 Permiteffectivedevelopment testing andintroductionofnewsystemfunctionswithoutinterferingwithservice 1 2 3LayersofComputerSystem 操作系统设计者面对的是计算机硬件 程序员面对的是操作系统和应用系统 最终用户面对的是应用程序 Programdevelopment 程序开发 EditorsanddebuggersProgramexecution 程序运行 AccesstoI Odevices 访问I O设备 Controlledaccesstofiles 控制访问文件 Systemaccess 系统访问 1 2 3ServicesProvidedbytheOperatingSystem操作系统提供的服务 Errordetectionandresponse 错误检测和响应 internalandexternalhardwareerrorsmemoryerrordevicefailuresoftwareerrorsarithmeticoverflowaccessforbiddenmemorylocationsoperatingsystemcannotgrantrequestofapplication Accounting 统计 collectstatisticsmonitorperformanceusedtoanticipatefutureenhancementsusedforbillingusers PortionofoperatingsystemthatisinmainmemoryContainsmost frequentlyusedfunctionsAlsocalledthenucleus 1 2 4Kernel内核 内核是操作系统最基本的部分 也可以认为 操作系统的一种定义就是内核 本程课程所介绍的操作系统即为内核 1 2 5EvolutionofanOperatingSystem操作系统的易扩展性 Hardwareupgradesandnewtypesofhardware 硬件的升级和新硬件的出现 Newservices 新的服务 Fixes 纠正错误 1 3EvolutionofOperatingSystems操作系统的发展 SimpleBatchSystems 简单批处理系统 SerialProcessing 串行处理 Multiprogramming 多道程序批处理系统 TimeSharing 分时系统 1 4MajorAchievements操作系统的主要成就 Processes 进程 MemoryManagement 内存管理 Informationprotectionandsecurity 信息保护和安全 Schedulingandresourcemanagement 调度和资源管理 Systemstructure 系统结构 1 5CharacteristicsofModernOperatingSystems 现代操作系统的特征 Microkernelarchitecture 微内核结构 Multithreading 多线程 Symmetricmultiprocessing 对称多处理 Distributedoperatingsystems 分布式 Object orienteddesign 面向对象 1 6典型操作系统 1 6 1WINDOWS2000操作系统 1 6 2UINX操作系统 MigrationofOperating SystemConceptsandFeatures Chapter2ProcessDescriptionandControl 进程描述和控制 2 1ProcessDescription 进程描述 进程的各种定义 三进程迸发执行动画 Aprocessisaprograminexecution processexecutionmustprogressinsequentialfashion CanbecharacterizedbyitstraceAprocessrequiresresources whicharemanagedbytheoperatingsystemTheOSinterleavestheexecutionofseveralprocessestomaximizeprocessorutilizationOSsupportsInterProcessCommunication IPC andusercreationofprocesses 2 2ProcessStates 进程状态及转换 一个进程的生命期可以划分为一组状态 这些状态刻划了整个进程 进程的状态反映进程执行过程的变化 进程的状态转换是一个非常复杂的过程 从一种状态到另一种状态的转换除了要使用不同的控制过程 有时还要借助于硬件触发器才能完成 从上面的三进程的例子可看到 由于有几个进程同时在运行 在某一时刻 不同的进程有不同的状态 如正在运行的进程 等待运行的进程 还有等待I O设备的进程 所以 进程的状态及转换是一个重要的概念 2 2 1Two StateProcessModel ProcessmaybeinoneoftwostatesRunning 运行 Not running 不运行 两状态的进程模型 2 2 2QueuingDiagram Dispatcher 分派程序 Programthatassignstheprocessortooneprocessoranother 分派CPU给一个个进程 Preventsasingleprocessfrommonopolizingprocessortime 防止一个进程独占CPU时间 Processor Enter Queue Dispatch Exit Pause Queuingdiagram 两状态进程队列图 2 2 35ProcessStates 进程的5种状态 Asaprocessexecutes itchangesstate New 新建 Theprocessisbeingcreated Running Instructionsarebeingexecuted Waitingorblocked Theprocessiswaitingforsomeeventtooccur Ready Theprocessiswaitingtobeassignedtoaprocess TerminateorExit Theprocesshasfinishedexecution 运行 等待或阻塞 就绪 DiagramofProcessState 新建进程允许进入就绪队列 就绪 新建 I O或事件完成 进程从阻塞队列转入就绪队列 运行 请求I O或其它资源 进程转入阻塞队列中 中断 进程调度 等待 结束 2 2 4Examplefor3Processes 三个进程运行状态转换的例子 UsingTwoQueues 两个队列 就绪队列和单一阻塞队列 使用单一阻塞队列 当队列中有大量的进程 导致效率下降 因为如果系统释放一个资源 要搜索整个阻塞队列 分类型的多个阻塞队列模型 2 2 5SuspendedProcesses ProcessorisfasterthanI OsoallprocessescouldbewaitingforI OSwaptheseprocessestodisktofreeupmorememoryBlockedstatebecomessuspendstatewhenswappedtodiskTwonewstatesBlocked suspendReady suspend 挂起的进程 进程的挂起就是进程被交换到外存中 OneSuspendState 等待事件 进程转入阻塞状态 等待的事件发生 进程转入就绪状态 阻塞进程被挂起 挂起的就绪进程被激活 进入就绪队列 2 2 6ReasonsforProcessSuspension SwappingTheoperatingsystemneedstoreleasesufficientmainmemorytobringinaprocessthatisreadytoexecute 操作系统需要更多的主存空间 以调入并执行处于就绪状态的进程 OtherOSreasonTheoperatingsystemmaysuspendabackgroundorutilityprocessoraprocessthatissuspectedofcausingaproblem 操作系统可能挂起后台进程或工具程序进程 或者因导致问题而已经挂起的进程 Interactiveuserrequest Ausermaywishtosuspendexecutionofaprogramforpurposesofdebuggingorinconnectionwiththeuseofaresource 用户可能希望挂起一个进程的执行 目的是为了调试或者与一个资源的使用进行连接 ReasonsforProcessSuspension TimingAprocessmaybeexecutedperiodically e g anaccountingorsystemmonitoringprocess andmaybesuspendedwhilewaitingforthenexttimeinterval 一个进程可能会周期性地执行 如计账程序或系统监控程序 而且可能在等待下一个时间间隔被挂起 ParentprocessrequestAparentprocessmaywishtosuspendexecutionofadescendenttoexamineormodifythesuspendedprocess ortocoordinatetheactivityofvariousdescendents 父进程可能会希望挂起后代进程的执行 以检查或修改挂起的进程 或者协调不同后代进程之间的行为 2 3 1ProcessCreation Submissionofabatchjob 新的作业 Userlogson 用户登录 Createdtoprovideaservicesuchasprinting 提供新的服务 Processcreatesanotherprocess 现有进程生成 2 3ProcessCreationandTermination进程的创建与终止 2 3 2ProcessTermination BatchjobissuesHaltinstruction 批处理指令 Userlogsoff 用户退出 Quitanapplication 结束应用程序 Errorandfaultconditions 硬件错误 进程的终止 2 3 3ReasonsforProcessTermination Normalcompletion 正常完成 Timelimitexceeded 超过时限 Memoryunavailable 无可用存储器 Boundsviolation 越界 Protectionerror 保护错误 examplewritetoread onlyfile 如写只读文件 Arithmeticerror 算术错误 Timeoverrun 时间超出 processwaitedlongerthanaspecifiedmaximumforanevent 终止进程的原因 ReasonsforProcessTermination I Ofailure I O失败 Invalidinstruction 无效指令 happenswhentrytoexecutedataPrivilegedinstruction 特权指令 只有操作系统才能使用 Datamisuse 数据误用 Operatingsystemintervention 操作员或操作系统干涉 suchaswhendeadlockoccurs 如出现死锁 Parentterminatessochildprocessesterminate 父进程终止子进程 Parentrequest 父进程请求 2 4OperatingSystemControlStructures 进程控制结构 2 4 1OperatingSystemControlStructures InformationaboutthecurrentstatusofeachprocessandresourceTablesareconstructedforeachentitytheoperatingsystemmanages Memory I O File Processes MemoryTables I OTables FileTables Process1 Process2 ProcessN ProcessesTable ProcessImage UserdataUserprogramSystemstackPCB OSControlStructures 2 4 2ProcessControlBlock PCB 进程控制块 Informationassociatedwitheachprocess Processstate 进程状态 Programcounter 程序计数寄存器 CPUregisters CPU寄存器 CPUschedulinginformation CPU调度信息 Memory managementinformation 内存管理信息 Accountinginformation 记账信息 I Ostatusinformation I O状态信息 ProcessContext cont Hardwarecontext 寄存器上下文 programcounterstackpointerprocessorstatuswordmemorymanagementregistersFPUregistersMachineregisterssavedinuarea sprocesscontrolblock PCB duringcontextswitchtoanotherprocess 2 4 5ProcessAddressSpace Kerneladdressspace 0 x7fffffff 0 xffffffff 2 4 6用户进程的虚拟地址 2 4 7BigPicture Data Text shared Kernelstack uarea Data Text shared Kernelstack uarea Data Text shared Kernelstack uarea kernelmemory 2 4 8ControlInformation Uarea Partofuserspace abovestack typicallymappedtoafixedaddress containsinfoneededwithrunning CanbeswappedProccontainsinfoneededwhennotrunning Notswappedout traditionallyfixedsizetable UareaandProcstructures UAreaPCB HWcontextpointertoprocreal effectiveidsargs returnvaluesorerrorstocurrentsyscall Signalinfofiledescriptortablecontrollingterminalvnode ProcstructureprocessIDandgroupuareapointerprocessstatequeuepointers scheduler sleep etc Prioritymemorymanagementinfoflags UserCredentials Everyuserisassignedauniqueuserid uid andgroupid gid Superuser root hasuid 0andgid 0everyprocessbotharealandeffectivepairofIds effectiveid filecreationandaccess realid sendingsignals Sendersreal effective receiversreal 2 5ProcessScheduling 进程调度概念简介 2 5 1ProcessSchedulingQueues Jobqueue setofallprocessesinthesystem Readyqueue setofallprocessesresidinginmainmemory readyandwaitingtoexecute Devicequeues setofprocesseswaitingforanI Odevice Processmigrationbetweenthevariousqueues ReadyQueue I ODeviceQueues 2 5 2ProcessScheduling 2 6 3Schedulers Long termscheduler jobschedulerselectswhichprocessesshouldbebroughtintothereadyqueue invokedinfrequently seconds minutes controlsthedegreeofmultiprogrammingMedium termschedulerallocatesmemoryforprocess invokedperiodicallyorasneeded Short termscheduler CPUschedulerselectswhichprocessshouldbeexecutednextandallocatesCPU invokedfrequently ms 2 6ChangeofProcessState进程切换 ChangeofProcessState SavecontextofprocessorincludingprogramcounterandotherregistersUpdatetheprocesscontrolblockoftheprocessthatiscurrentlyrunningMoveprocesscontrolblocktoappropriatequeue ready blockedSelectanotherprocessforexecution 进程切换 上下文切换 ChangeofProcessState UpdatetheprocesscontrolblockoftheprocessselectedUpdatememory managementdatastructuresRestorecontextoftheselectedprocess 进程切换 CPUContextSwitch 2 6 2WhentoSwitchaProcess ClockinterruptprocesshasexecutedforthemaximumallowabletimesliceI OinterruptMemoryfaultmemoryaddressisinvirtualmemorysoitmustbebroughtintomainmemory 何时进行进程切换 WhentoSwitchaProcess TraperroroccurredmaycauseprocesstobemovedtoExitstateSupervisorcallsuchasfileopen ExecutionoftheOperatingSystem Non processKernelexecutekerneloutsideofanyprocessoperatingsystemcodeisexecutedasaseparateentitythatoperatesinprivilegedmodeExecutionWithinUserProcessesoperatingsystemsoftwarewithincontextofauserprocessprocessexecutesinprivilegedmodewhenexecutingoperatingsystemcode ExecutionoftheOperatingSystem Process BasedOperatingSystemmajorkernelfunctionsareseparateprocessesUsefulinmulti processorormulti computerenvironment 2 6 4ProcessCreation AssignauniqueprocessidentifierAllocatespacefortheprocessInitializeprocesscontrolblockSetupappropriatelinkagesEx addnewprocesstolinkedlistusedforschedulingqueueCreateofexpandotherdatastructuresEx maintainanaccountingfile 进程创建的过程 2 7ProcessandThread进程与线程 2 7 1Process的特点 Resourceownership processisallocatedavirtualaddressspacetoholdtheprocessimage 资源所有权 分配虚拟地址空间保存进程映像及对处理器 其它进程 文件和I O资源的存取进行了保护 Scheduling execution followsanexecutionpaththatmaybeinterleavedwithotherprocesses 调度 执行 沿着某一执行路径执行 并与其它进程交替进行 Thesetwocharacteristicsaretreatedindependentlybytheoperatingsystem 对操作系统来说 这两种特性是分开的 将进程的第2个特征与第1个特征分开 单独设计具有第2个特征的结构 这就导致了线程的出现 Athread orlightweightprocess isabasicunitofCPUutilization itconsistsof programcounterregistersetstackspaceAthreadshareswithitspeerthreadsits codesectiondatasectionoperating systemresourcescollectivelyknowasatask Atraditionalorheavyweightprocessisequaltoataskwithonethread 2 7 2Thread 线程 Thread Anexecutionstate running ready etc SavedthreadcontextwhennotrunningHasanexecutionstackPer threadstaticstorageforlocalvariablesAccesstothememoryandresourcesofitsprocessallthreadsofaprocesssharethis Threads SuspendingaprocessinvolvessuspendingallthreadsoftheprocesssinceallthreadssharethesameaddressspaceTerminationofaprocess terminatesallthreadswithintheprocess IntroductiontoThreads ThreadControlBlock UserStack UserStack KernelStack KernelStack UserAddressSpace UserAddressSpace ProcessControlBlock ProcessControlBlock Thread Single ThreadedProcessModel MultithreadedProcessModel ThreadControlBlock UserStack KernelStack Thread ThreadControlBlock UserStack KernelStack Thread 2 7 3BenefitsofThreads Takeslesstimetocreateanewthreadthanaprocess 创造线程比进程的时间少 Lesstimetoterminateathreadthanaprocess 结束一个线程比进程的时间少 Lesstimetoswitchbetweentwothreadswithinthesameprocess 线程切换比进程切换更省时间 Sincethreadswithinthesameprocesssharememoryandfiles theycancommunicatewitheachotherwithoutinvokingthekernel 线程在同一个进程中 共享相同的内存和文件 它们之间的通信不用内核干涉 所以更节省时间 线程的优势 2 7 4Multithreading OperatingsystemsupportsmultiplethreadsofexecutionwithinasingleprocessMS DOSsupportsasinglethreadUNIXsupportsmultipleuserprocessesbutonlysupportsonethreadperprocessWindows2000 Solaris Linux Mach andOS 2supportmultiplethreads UsesofThreadsinaSingle UserMultiprocessingSystem Foregroundtobackgroundwork 前台和后台操作 Asynchronousprocessing 异步处理 Speedexecution 加速执行 Modularprogramstructure 模块化程序结构 2 7 5ThreadStates StatesassociatedwithachangeinthreadstateSpawn 产生 SpawnanotherthreadBlockUnblockFinishDeallocateregistercontextandstacks 2 7 6RemoteProcedureCallUsingThreads 按顺序执行 依次等待来自每个服务器的响应 RemoteProcedureCallUsingThreads 并行执行 同时等待来自每个服务器的响应 2 7 7User LevelThreads AllthreadmanagementisdonebytheapplicationThekernelisnotawareoftheexistenceofthreads 优点 线程切换无需内核干涉 节省了在两种模式下的开销 调度算法是程序专用的 不会扰乱底层的操作系统调度程序 可以在任何操作系统下运行 缺点 许多系统调用会阻塞 如果一个线程进行系统调用 则整个进程中的所有线程都会被阻塞 多线程技术不能利用多处理器技术 内核一次只把一个进程分配给一个处理器 用户级线程 2 7 9CombinedApproaches ExampleisSolarisThreadcreationdoneintheuserspaceBulkofschedulingandsynchronizationofthreadsdoneintheuserspace User LevelandKernel LevelThreads 2 7 10RelationshipBetweenThreadsandProcesses Threads Process Description ExampleSystems 1 1 Eachthreadofexecutionisauniqueprocesswithitsownaddressspaceandresources TraditionalUNIXimplementations M 1 Aprocessdefinesanaddressspaceanddynamicresourceownership Multiplethreadsmaybecreatedandexecutedwithinthatprocess WindowsNT Solaris OS 2 OS 390 MACH RelationshipBetweenThreadsandProcesses Threads Process Description ExampleSystems 1 M Athreadmaymigratefromoneprocessenvironmenttoanother Thisallowsathreadtobeeasilymovedamongdistinctsystems Ra Clouds Emerald M M CombinesattributesofM 1and1 Mcases TRIX 2 7 11CategoriesofComputerSystems SingleInstructionSingleData SISD singleprocessorexecutesasingleinstructionstreamtooperateondatastoredinasinglememorySingleInstructionMultipleData SIMD eachinstructionisexecutedonadifferentsetofdatabythedifferentprocessors CategoriesofComputerSystems MultipleInstructionSingleData MISD asequenceofdataistransmittedtoasetofprocessors eachofwhichexecutesadifferentinstructionsequence NeverimplementedMultipleInstructionMultipleData MIMD asetofprocessorssimultaneouslyexecutedifferentinstructionsequencesondifferentdatasets ParallelProcessorArchitectures SymmetricMultiprocessing KernelcanexecuteonanyprocessorTypicallyeachprocessordoesself schedulingformthepoolofavailableprocessorthreads MultiprocessorOperatingSystemDesignConsiderations SimultaneousconcurrentprocessesorthreadsSchedulingSynchronizationMemoryManagementReliabilityandFaultTolerance 2 7 12Microkernels SmalloperatingsystemcoreContainsonlyessentialoperatingsystemsfunctionsManyservicestraditionallyincludedintheoperatingsystemarenowexternalsubsystemsdevicedriversfilesystemsvirtualmemorymanagerwindowingsystemsecurityservices BenefitsofaMicrokernelOrganization UniforminterfaceonrequestmadebyaprocessAllservicesareprovidedbymeansofmessagepassingExtensibilityAllowstheadditionofnewservicesFlexibilityNewfeaturesaddedExistingfeaturescanbesubtracted BenefitsofaMicrokernelOrganization PortabilityChangesneededtoportthesystemtoanewprocessorischangedinthemicrokernel notintheotherservicesReliabilityModulardesignSmallmicrokernelcanberigorouslytested BenefitsofMicrokernelOrganization DistributedsystemsupportMessagearesentwithoutknowingwhatthetargetmachineisObject orientedoperatingsystemComponentsareobjectswithclearlydefinedinterfacesthatcanbeinterconnectedtoformsoftware MicrokernelDesign Low levelmemorymanagementmappingeachvirtualpagetoaphysicalpageframeInter processcommunicationI Oandinterruptmanagement 2 7 13Windows2000ProcessandItsResources Windows2000ProcessObject Windows2000ThreadObject Windows2000ThreadStates ReadyStandby 备用 线程被选择下一次在一个特定的处理器上运行 线程在该状态下等待直到该处理器可用 RunningWaitingTransition 一个线程在等待后 如果准备好运行但资源不可用时 进行该状态 Terminated Windows2000ThreadStates 2 7 14Solaris Processincludestheuser saddressspace stack andprocesscontrolblockUser levelthreadsLightweightprocessesKernelthreads SolarisMultithreadedArchitectureExample ProcessStructureinTraditionalUNIXandSolaris SolarisThreadExecution SynchronizationSuspensionPreemptionYielding SolarisUser LevelThreadandLWPStates 2 7 15LinuxProcess stask struct StateSchedulinginformationIdentifiersInterprocesscommunicationLinksTimesandtimersFilesystemVirtualmemoryProcessor specificcontext LinuxStatesofaProcess RunningInterruptableUninterruptableStoppedZombie Concurrency MutualExclusionandSynchronization 并发性 互斥与同步 Chapter3 3 1进程并发的概念 操作系统设计的核心问题是进程和线程的管理 1 多道程序技术 管理单处理器中的多个进程 2 多处理技术 管理多处理系统中的多个进程 3 分布处理技术 管理多台分布式计算机系统中多个进程的执行 在单处理器中 进程交替执行 在多处理器中 进程不但能交替执行 还能重叠执行 这些都表现出并发执行的外部特征 Communicationamongprocesses 进程间的通信 Sharingandcompetingforresources 资源共享与竞争 Synchronizationofmultipleprocesses 多进程同步 Allocationofprocessortime 分配处理器时间 3 1 1并发执行中操作系统要处理的问题 3 1 2DifficultieswithConcurrency Sharingglobalresources 全局资源的共享充满了风险 Managementofallocationofresources 操作系统很难最佳地分配资源 Programmingerrorsdifficulttolocate 定位程序设计错误非常困难 进程并发带来的困难 Example RaceConditions TwoprocesseswanttoaccesssharedmemoryatsametimeSolution SynchronizeAccess 3 1 3进程并发执行带来的问题的 例 设有堆栈S 栈指针top 栈中存放内存中相应的数据块地址 设有两个程序段getaddr top 和reladdr blk getaddr top 从给定的top所指栈中取出相应的内存数据块地址 reladdr blk 将内存数据块地址blk放入椎栈中

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论