ImageVerifierCode 换一换
格式:PPTX , 页数:38 ,大小:525.26KB ,
资源ID:4173435      下载积分:5 金币
验证码下载
登录下载
邮箱/手机:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/4173435.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  
声明  |  会员权益     获赠5币     写作写作

1、填表:    下载求助     索取发票    退款申请
2、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
3、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
4、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
5、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【天****】。
6、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
7、本文档遇到问题,请及时私信或留言给本站上传会员【天****】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。

注意事项

本文(进程管理英文.pptx)为本站上传会员【天****】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4008-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

进程管理英文.pptx

1、Chapter 4:ProcessesnProcess ConceptnProcess SchedulingnOperation on ProcessesnCooperating ProcessesnInterprocess CommunicationProcess ConceptnAn operating system executes a variety of programs:nBatch system jobsnTime-shared systems user programs or tasksnTextbook uses the terms job and process almos

2、t interchangeably.nProcess a program in executionnA process includes:nprogram counternstack ndata sectionProcess Conceptn国内学术界较为一致的定义:进程是一个具有一定独立功能的程序,关于某个数据集合的一次可以并发执行的运行活动。nFrom Wikipedia In computing,a process is an instance of a computer program that is being sequentially executed by a computer

3、system that has the ability to run several computer programs concurrently.Process ConceptnA single computer processor executes one or more instructions at a time(per clock cycle),one after the other.nTo allow users to run several programs at once,single-processor computer systems can perform multipr

4、ogramming and time-sharing.nUsing more than one physical processor on a computer,permits true simultaneous execution of more than one stream of instructions from different processes.nConcurrency is the term generally used to refer to several independent processes sharing a single processornSimultane

5、ously(or parallel)is used to refer to several processes,each with their own processor.Process vs.ProgramnDynamic/staticnprocess is a program in execution,so it is dynamic,nprogram is a passive collection of instuctions,so it is a static entity.nLify cyclenprocess has a life cycle.It is an active ent

6、ity in the sense that it can be created,executed,and terminated during its lifetime.nProgram can exist forever.nStructurenprocess=program+data+PCBnEach process is represented in the OS by a process control block(PCB),it contains all information associated with a specific process.Process vs.ProgramnN

7、o one-to-one mapping between processes and programsncan have mulitple processes of the same programnone process can invoke multiple programsnProcess is the basic unit of being scheduled and resource allocation from the viewpoint of OS,while program can not be run without process creation.nProcess ca

8、n be executed concurrently or simultaneously.Process StatenAs a process executes,it changes statennew:The process is being created.nrunning:Instructions are being executed.nwaiting:The process is waiting for some event to occur.nready:The process is waiting to be assigned to a processor.nterminated:

9、The process has finished execution.Diagram of Process Statenewreadyrunningwaiting/blockedterminatedadmittedI/O or event completionscheduler dispatchI/O or event waitinterruptexitProcess Control Block(PCB)Information associated with each process:nProcess state nProgram counternCPU registers nCPU sche

10、duling informationnMemory-management informationnAccounting informationnI/O status informationProcess Control Block(PCB)CPU Switch From Process to ProcessChapter 4:ProcessesnProcess ConceptnProcess SchedulingnOperation on ProcessesnCooperating ProcessesnInterprocess CommunicationProcess SchedulingPr

11、ocess Scheduling QueuesnJob queue set of all processes in the system.nReady queue set of all processes residing in main memory,ready and waiting to execute.nDevice queues set of processes waiting for an I/O device.Process migration between the various queues.Ready Queue And Various I/O Device Queues

12、Representation of Process SchedulingSchedulersnLong-term scheduler(or job scheduler)selects which processes should be brought into the ready queue.长程调度(或作业调度)长程调度(或作业调度)nShort-term scheduler(or CPU scheduler)selects which process should be executed next and allocates CPU.短程调度(或短程调度(或CPU调度)调度)Additio

13、n of Medium Term SchedulingSchedulers(Cont.)nShort-term scheduler is invoked very frequently (milliseconds)(must be fast).调用频率高调用频率高nLong-term scheduler is invoked very infrequently (seconds,minutes)(may be slow).调用频率不高调用频率不高nThe long-term scheduler controls the degree of multiprogramming.长程调度控制了多道程

14、序的长程调度控制了多道程序的“道数道数”nProcesses can be described as either:nI/O-bound process spends more time doing I/O than computations,many short CPU bursts.nCPU-bound process spends more time doing computations;few very long CPU bursts.Context Switch上下文切换上下文切换nWhen CPU switches to another process,the system mus

15、t save the state of the old process and load the saved state for the new process.nContext-switch time is overhead;the system does no useful work while switching.nTime dependent on hardware support.Process CreationnParent process creates children processes,which,in turn create other processes,forming

16、 a tree of processes.nResource sharingnParent and children share all resources.nChildren share subset of parents resources.nParent and child share no resources.nExecutionnParent and children execute concurrently.nParent waits until children terminate.Process Creation(Cont.)nAddress spacenChild dupli

17、cate of parent.nChild has a program loaded into it.nUNIX examplesnfork system call creates new processnexeclp system call used after a fork to replace the process memory space with a new program.A Tree of Processes On A Typical UNIX SystemProcess TerminationnProcess executes last statement and asks

18、the operating system to delete it(exit).nProcess resources are deallocated by operating system.nOutput data from child to parent(via wait).nParent may terminate execution of children processes nChild has exceeded超过超过 allocated resources.nTask assigned to child is no longer required.nParent is exitin

19、g.nOperating system does not allow child to continue if its parent terminates.nCascading termination.级联终止级联终止Cooperating ProcessesnIndependent process cannot affect or be affected by the execution of another process.nCooperating process can affect or be affected by the execution of another processnA

20、dvantages of process cooperationnInformation sharingnComputation speed-upnModularitynConvenienceProducer-Consumer ProblemnParadigm for cooperating processes,producer process produces information that is consumed by a consumer process.nunbounded-buffer places no practical limit on the size of the buf

21、fer.无界缓冲没有对缓冲区大小的限制无界缓冲没有对缓冲区大小的限制nbounded-buffer assumes that there is a fixed buffer size.有界缓冲对缓冲区大小作了限定有界缓冲对缓冲区大小作了限定Bounded-Buffer Shared-Memory SolutionnShared datavar n;type item=;var buffer.array 0.n1 of item;in,out:0.n1;nProducer process repeatproduce an item in nextpwhile in+1 mod n=out do

22、no-op;buffer in:=nextp;in:=in+1 mod n;until false;Bounded-Buffer(Cont.)nConsumer process repeatwhile in=out do no-op;nextc:=buffer out;out:=out+1 mod n;consume the item in nextc until false;nSolution is correct,but can only fill up n1 buffer.ThreadsnA thread(or lightweight process)is a basic unit of

23、 CPU utilization;it consists of:nprogram counternregister setnstack spacenA thread shares with its peer threads its:ncode sectionndata sectionnoperating-system resourcescollectively know as a task.整体作为一个任务整体作为一个任务Threads(Cont.)nIn a multiple threaded task,while one server thread is blocked and waiti

24、ng,a second thread in the same task can run.nCooperation of multiple threads in same job confers higher throughput and improved performance.nApplications that require sharing a common buffer(i.e.,producer-consumer)benefit from thread utilization.nThreads provide a mechanism that allows sequential pr

25、ocesses to make blocking system calls while also achieving parallelism.nKernel-supported threads(Mach and OS/2).nUser-level threads;supported above the kernel,via a set of library calls at the user level.nHybrid approach implements both user-level and kernel-supported threads(Solaris 2).混合处理实现用户级和内核

26、支持线程Interprocess Communication-IPCnMechanism for processes to communicate and to synchronize their actions.nMessage system processes communicate with each other without resorting to shared variables.nIPC facility provides two operationsnsend(message)message size fixed or variablenreceive(message)nIf

27、 P and Q wish to communicate,they need to:nestablish a communication link between themnexchange messages via send/receivenImplementation of communication linknphysical(e.g.,shared memory,hardware bus)nlogical(e.g.,logical properties)Implementation QuestionsnHow are links established?nCan a link be a

28、ssociated with more than two processes?nHow many links can there be between every pair of communicating processes?nWhat is the capacity of a link??nIs the size of a message that the link can accommodate fixed or variable?nIs a link unidirectional or bi-directional?Direct CommunicationnProcesses must

29、 name each other explicitly显式显式:nsend(P,message)send a message to process Pnreceive(Q,message)receive a message from process QnProperties of communication linknLinks are established automatically.nA link is associated with exactly one pair of communicating processes.nBetween each pair there exists e

30、xactly one link.nThe link may be unidirectional,but is usually bi-directional.Indirect CommunicationnMessages are directed and received from mailboxes.nEach mailbox has a unique id.nProcesses can communicate only if they share a mailbox.nProperties of communication linknLink established only if proc

31、esses share a common mailbox nA link may be associated with many processes.nEach pair of processes may share several communication links.nLink may be unidirectional.nal or bi-directional.nOperationsncreate a new mailboxnsend and receive messages through mailboxndestroy a mailboxTypes of MailboxnPriv

32、ate Mailbox:owner-Receive other user-SendnPublic Mailbox:owned by OSnShared Mailbox:created by a process,the ownership and privilege be passed to other processesSynchronizationnBlocking send:sender blocked until the message is receivednNonblocking send:send the message and resume operationnBlocking

33、receive:receiver blocked until a message is availablenNonblocking receive:receiver retrieves either a valid message or nullBufferingnQueue of messages attached to the link;implemented in one of three ways.1.Zero capacity 0 messages Sender must wait for receiver.2.Bounded capacity finite length of n messages Sender must wait if link full.3.Unbounded capacity infinite length Sender never waits.Exception Conditions Error RecoverynProcess terminates 进程终止进程终止nLost messages 消息丢失消息丢失nScrambled Messages 消息受损消息受损HomeworknP113 n4.1n4.4n4.6

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服