软硬件系统编程PPT (21).pdf
《软硬件系统编程PPT (21).pdf》由会员分享,可在线阅读,更多相关《软硬件系统编程PPT (21).pdf(16页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、处理器管理处理器管理 Processor Processor managementmanagement Processor management Processor management is also called job management or process management.It main function is:Distribute the processor,and control and manage its operation.Determines who can use CPU and how to use it When multiple users request
2、 to use CPU at the same time,it determines who can or cannot use,and what the execution order should be.Reasons for processor management:“Concurrent execution”of multiple programs is adopted by modern computers.2 Concurrence execution is Multiple programs operate at the same period of time.3 About C
3、oncurrence execution Given that there is only one CPU,how to do this?1.Execution of multitasks Execution of multitasks in computer has two approaches:Parallel execution Concurrent execution 4 1 1)Parallel execution Each program is executed in a specific order.Suppose a program contains three segment
4、s:input(I),calculate(C),and output(P),parallel execution of it should be:5 Input segment 1 Calculate 1 Output 1 Input segment 2 Output 2 Calculate 2 E.g.Execute the following statements S1:a=x+b S2:b=a-3 S3:c=b+1 Execution order of the above statements must be:6 Example of parallel execution S1 S2 S
5、3 Features of parallel execution:Execute in order Enjoy all system resources solely during execution Execution results are reproducible 7 2)Concurrence execution Input Input segment 1segment 1 calculate calculate segment 1segment 1 Output Output segment 1segment 1 Input Input segment 2segment 2 calc
6、ulate calculate segment 2segment 2 Output Output segment 2segment 2 Input Input segment 3segment 3 Input Input segment 4segment 4 calculate calculate segment 3segment 3 calculate calculate segment 4segment 4 Output Output segment 3segment 3 Output Output segment 4segment 4 Multiple programs are oper
7、ating at the same period of time E.g.Execute the following statements S1:a=x+1 S2:b=y-3 S3:c=a+b Execution order of the above statements can be:8 Example of concurrent execution:S1 S3 S2 Example of concurrent execution:Assume:Program A:Do operation of N=N+1 at each execution;Program B:Do operation o
8、f Print(N)at each execution,and then let N=0.Assume N=n at a time There will be three orders of execution:Execute A first,then B,the result of N will be:n+1,n+1,0 Execute B first,then A,the result of N will be:n,0,1 Execute Print(N)of B first,then A,then N=0 of B,the result of N will be:n,n+1,0 The
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 软硬件系统编程PPT 21 软硬件 系统 编程 PPT 21
限制150内