西安电子科技大学:《操作系统 Operating Systems》课程教学资源(PPT课件讲稿)Chapter 04 Memory Management

Operating Systems Chapter 4: Memory Management E 4.1 Basic memory management 4.2 Swapping(交换) 43 irtual memory(虚拟内存) H 4.4 Page replacement algorithms H 4.5 Design issues for paging systems E 4.6 Implementation issues 47 Segmentation(分段) Gao Haichang, Software School, Xidian University 3
Operating Systems Gao Haichang , Software School, Xidian University 3 Chapter 4: Memory Management 4.1 Basic memory management 4.2 Swapping (交换) 4.3 Virtual memory (虚拟内存) 4.4 Page replacement algorithms 4.5 Design issues for paging systems 4.6 Implementation issues 4.7 Segmentation (分段)

Operating Systems Memory Management c Ideally programmers want memory that is A large t fast 口 non volatile Memory hierarchy(层次) H small amount of fast, expensive memory -cache E some medium-speed medium price main memory H gigabytes ofslow, cheap disk storage G Memory manager handles the memory hierarchy Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 4 Memory Management Ideally programmers want memory that is large fast non volatile Memory hierarchy (层次) small amount of fast, expensive memory – cache some medium-speed, medium price main memory gigabytes of slow, cheap disk storage Memory manager handles the memory hierarchy

Operating Systems Basic memory management G Memory Management Systems can be divided into two classes: H That move processes back and forth between main memory and disk during execution(swapping and paging) That do not ce Program expand to fill the memory available to hold them Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 5 Basic Memory Management Memory Management Systems can be divided into two classes: That move processes back and forth between main memory and disk during execution (swapping and paging). That do not. Program expand to fill the memory available to hold them

Operating Systems Gs Monoprogramming without Swapping or Paging OXFFF Operating Device system in drivers in ROm ROM ser program ser User program Operating Operating system in system in RAM RAM Three simple ways of organizing memory an operating system with one user process (a) formally used on mainframes and minicomputers but is really used any more (b)used on some palmtop computers and embedded systems (c)used by early PC(MS-DOS), where the portion of the system in the ROM is called the bios Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 6 Monoprogramming without Swapping or Paging Three simple ways of organizing memory - an operating system with one user process - (a) Formally used on mainframes and minicomputers but is really used any more. - (b) used on some palmtop computers and embedded systems. - (c) used by early PC (MS-DOS), where the portion of the system in the ROM is called the BIOS

Operating Sy Multiprogramming with Fixed Partitions Multiple input queues H口 Partition 44 Partition 4 Partition 3 Single Partition 3 input queue H Partition 2 Partition 2 200K Partition 1 100K erating gratin stem Fixed memory partitions H separate input queues for each partition H single input queue Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 7 Multiprogramming with Fixed Partitions Fixed memory partitions separate input queues for each partition single input queue

Modeling multiprogramming Operam tting Systems 20%/0 wait 100 980 50%I/o wait 60 80%I/o wait 012345678910 Degree of multiprogramming CPU utilization as a function of number of processes in memory Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 8 Modeling Multiprogramming CPU utilization as a function of number of processes in memory Degree of multiprogramming

Modeling multiprogramming tting Systems c Suppose a computer has 32MB of memory, with the os taking up 16MB and each user program taking up 4MB H These sizes allow 4 programs to be in memory at once. With an 80% average lO wait. we have a cPu utilization of 1-0.8460% H Adding another 1 6MB of memory allow 8 programs, thus raising the CPU utilization to 83% w Adding yet another 1 6MB of memory allow 12 programs, only increase CPU utilization to 93% ..97 Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 9 Modeling Multiprogramming Suppose a computer has 32MB of memory, with the OS taking up 16MB and each user program taking up 4MB. These sizes allow 4 programs to be in memory at once. With an 80% average I/O wait, we have a CPU utilization of 1-0.8^4≈60%. Adding another 16MB of memory allow 8 programs, thus raising the CPU utilization to 83%. Adding yet another 16MB of memory allow 12 programs, only increase CPU utilization to 93%. …97% …

Operating Systems G> Analysis of Multiprogramming System Performance CPU Arrival minutes Processes Job time needed 1234 1000 CPU idle 10:10 4322 CPU busy 20364959 10:15 CPU/process. 20. 18. 16.1 1020 2.0 3Ir Job 1 finishe 9 8 31 9 2 Job 2 starts 8 3 9 3 15 2022 27.628231.7 Time(relative to job 1's arrival) (a) Arrival and work requirements of 4 jobs g(b)CPU utilization for 1-4 jobs with 80%I0 wait e()Sequence of events as jobs arrive and finish i note numbers show amount of CPU time jobs get in each interval Gao Haichang, Software School, Xidian University 10
Operating Systems Gao Haichang , Software School, Xidian University 10 Analysis of Multiprogramming System Performance (a) Arrival and work requirements of 4 jobs (b) CPU utilization for 1 – 4 jobs with 80% I/O wait (c) Sequence of events as jobs arrive and finish note numbers show amount of CPU time jobs get in each interval

Operating Systems Relocation and protection g Cannot be sure where program will be loaded in memory t address locations of variables code routines cannot be absolute w must keep a program out of other processes' partitions g Use base and limit values i address locations added to base value to map to physical addr address locations larger than limit value is an error Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 11 Relocation and Protection Cannot be sure where program will be loaded in memory address locations of variables, code routines cannot be absolute must keep a program out of other processes’ partitions Use base and limit values address locations added to base value to map to physical addr address locations larger than limit value is an error

Operating Systems Base and Limit register limit relocation register register logical physical address yes address CPU memory no trap; addressing error Gao Haichang, Software School, Xidian University 12
Operating Systems Gao Haichang , Software School, Xidian University 12 Base and Limit register
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《网页设计》课程教学资源:课程教学大纲.doc
- 《人工智能技术导论》课程教学资源(PPT课件讲稿)第3章 图搜索与问题求解.ppt
- 清华大学:TCP and Congestion Control(1).pptx
- 清华大学:域内路由选择(PPT课件讲稿)Intra-domain routing.pptx
- 山东大学:IPv6试商用的进展和挑战(PPT讲稿,网络与信息中心:秦丰林).pptx
- 克里特大学:The Application of Artificial Neural Networks in Engineering and Finance.ppt
- 关键词抽取、社会标签推荐及其在社会计算中的应用.pptx
- 《数据库系统原理》课程PPT教学课件(SQLServer)第12章 并发控制.ppt
- 《计算机组成原理》课程教学资源(PPT课件讲稿)第2章 运算方法和运算器.ppt
- 《数据科学》课程教学资源(PPT课件讲稿)第2章 数据预处理.ppt
- 西安理工大学:面向主题的服务(PPT讲稿)综合集成支撑平台业务化——互联网信息化(平台、内容、服务).ppt
- 中国科学技术大学:《数据结构》课程教学资源(PPT课件讲稿)第三章 线性表.pps
- 《计算机网络》课程PPT教学课件(Windows)第09讲 DNS服务.ppt
- 《软件工程》课程教学资源(PPT课件讲稿)第12章 软件开发工具StarUML及其应用.ppt
- 西华大学:《电子商务概论》课程教学资源(PPT课件讲稿)第7章 电子商务物流.ppt
- 中国科学技术大学:《嵌入式操作系统 Embedded Operating Systems》课程教学资源(PPT课件讲稿)第六讲 死锁及其处理.ppt
- 电子科技大学:《网络安全与网络工程》课程教学资源(PPT课件讲稿)第六章 杂凑函数(主讲:聂旭云).ppt
- 某高校计算机专业课程教学大纲合集(汇编).pdf
- 上海交通大学:操作系统安全(PPT课件讲稿)操作系统安全 OS Security(邹恒明).pps
- 《Computer Networking:A Top Down Approach》英文教材教学资源(PPT课件讲稿,3rd edition)Chapter 5 Link Layer and LANs.pps
- 中国水利水电出版社:《单片机原理及应用》课程PPT教学课件(C语言版)第8章 单片机系统扩展(主编:周国运).ppt
- 《Photoshop基础教程与上机指导》教学资源(PPT讲稿)第18章 扫描和修饰图像.ppt
- 西安电子科技大学:《现代密码学》课程教学资源(PPT课件讲稿)第二章 流密码(主讲:董庆宽).pptx
- 北京大学:《高级软件工程》课程教学资源(PPT课件讲稿)第一讲 软件与软件开发.ppt
- 东南大学:《数据结构》课程教学资源(PPT课件讲稿)第七章 图.ppt
- 《The C++ Programming Language》课程教学资源(PPT课件讲稿)Lecture 02 Procedure-Based Programming.ppt
- 《数据库原理与应用》课程PPT教学课件(SQL Server)第9章 存储过程和触发器.ppt
- 合肥学院:《数据库原理与应用》课程教学资源(PPT课件)第1章 数据库系统概述(主讲:叶潮流).ppt
- 北京大学软件研究所:高级软件工程(PPT讲稿)云计算与平台即服务.ppt
- 香港科技大学:深度学习导论(PPT讲稿)Introduction to Deep Learning.pptx
- 香港中文大学:《Topics in Theoretical Computer Science》课程教学资源(PPT课件讲稿)量子计算 Quantum computing.pptx
- 《数字图像处理》课程PPT教学课件(讲稿)第二章 图像获取、显示和表示.ppt
- 《Web编程实用技术教程》课程教学资源(PPT课件讲稿)第5章 MFC WinSock类的编程.ppt
- 电子工业出版社:《计算机网络》课程教学资源(第五版,PPT课件讲稿)第五章 运输层.ppt
- 《神经网络 Neural Networks》课程教学资源(PPT课件讲稿)Ch 8 Artificial Neural networks.pptx
- PROGRAMMING METHDOLODGY AND SOFTWARE ENGINEERING(PPT讲稿)C Programming Review.ppt
- 计算机网络技术基础(PPT课件讲稿).ppt
- 《网络搜索和挖掘关键技术 Web Search and Mining》课程教学资源(PPT讲稿)Lecture 13 Matrix Factorization and Latent Semantic Indexing.ppt
- 多媒体技术及应用(PPT讲稿)多媒体音频技术.ppt
- 山东大学:《微机原理及单片机接口技术》课程教学资源(PPT课件讲稿)第四章 指令系统及汇编语言程序设计(4.1-4.4).ppt