东南大学:《操作系统概念 Operating System Concepts》课程教学资源(PPT课件讲稿)08 Main Memory(主讲:张柏礼)

8. Main Memory ●●● ●●●● ●●●●● ●●●● ●●0●● Objectives ●●●0 ●●●● o To provide a detailed description of various ways f organizing memory hardware To discuss various memory-management techniques, including paging and segmentation o To provide a detailed description of the Intel Pentium, which supports both pure segmentation and segmentation with paging
2 8. Main Memory ⚫ Objectives ⚫ To provide a detailed description of various ways of organizing memory hardware ⚫ To discuss various memory-management techniques, including paging and segmentation ⚫ To provide a detailed description of the Intel Pentium, which supports both pure segmentation and segmentation with paging

●●● 8. Main Memory ●●●● ●●●●● ●●●● 8.1 Background ●●0●● ●●●● ●●●● 8.2 Swapping 8.3 Contiguous Memory Allocation o8.4 Paging 8.5 Structure of the Page Table ●86 Segmentation e8. 7 Example: The Intel Pentium
3 8. Main Memory ⚫ 8.1 Background ⚫ 8.2 Swapping ⚫ 8.3 Contiguous Memory Allocation ⚫ 8.4 Paging ⚫ 8.5 Structure of the Page Table ⚫ 8.6 Segmentation ⚫ 8.7 Example: The Intel Pentium

8. 1 Background ●●● ●●●● ●●●●● ●●●● ●●0●● Memory is central to the operation of a. ●●●● modern computer system o Main memory and registers are only storage CPU can access directl Program must be brought (from disk) into memory e Instruction-execution cycle CPU fetches an instruction from memory according to the value of the program counter o The instruction is then decoded and may cause operands to be fetch from memory After the instruction has been executed the results may be stored back in memory
4 8.1 Background ⚫ Memory is central to the operation of a modern computer system ⚫ Main memory and registers are only storage CPU can access directly ⚫ Program must be brought (from disk) into memory ⚫ Instruction-execution cycle ⚫ CPU fetches an instruction from memory according to the value of the program counter ⚫ The instruction is then decoded and may cause operands to be fetch from memory ⚫ After the instruction has been executed, the results may be stored back in memory

8. 1 Background ●●● ●●●● ●●●●● ●●●● Speed of accessing memory ●●0●● ●●●0 Register access in one cycle of CPU clock o Main memory access can take many cycles o Cache sits between main memory and CPU registers to accommodate a speed difference
5 8.1 Background ⚫ Speed of accessing memory ⚫ Register access in one cycle of CPU clock ⚫ Main memory access can take many cycles ⚫ Cache sits between main memory and CPU registers to accommodate a speed difference

8. 1 Background ●●● ●●●● ●●●●● ●●●● ●●0●● Memory address ●●●0 ●●●● e Memory consist of a larger array of words or bytes, each with its own address We do ignore how a program generates a memory address o We are interested only in the sequence of memory address
6 8.1 Background ⚫ Memory address ⚫ Memory consist of a larger array of words or bytes, each with its own address ⚫ We do ignore how a program generates a memory address ⚫ We are interested only in the sequence of memory address

8. 1 Background ●●● ●●●● ●●●●● ●●●● ●●0●● Protection of memory address ●●●● ●●●● Need to o Protect the operating system from access by user processes o Protect the user process from others o Firstly need to make sure that each process has separate memory space o Need to determine the range of legal address of process o Need to ensure that the process can access only these legal addresses
7 8.1 Background ⚫ Protection of memory address ⚫ Need to ⚫ Protect the operating system from access by user processes ⚫ Protect the user process from others ⚫ Firstly need to make sure that each process has separate memory space ⚫ Need to determine the range of legal address of process ⚫ Need to ensure that the process can access only these legal addresses

8. 1 Background ●●● ●●●● ●●●●● ●●●● o a pair of base and limit ●●0●● ▲鱼 0 registers define the operating address space system o The base register hold 256000 the smallest legal process physical memory 300040 address 300040 base ● The limit register process specifies the size of the 420940 120900 range limit o The cPu hardware process compare every address 880000 generated in user mode with the registers 1024000
8 8.1 Background ⚫ A pair of base and limit registers define the address space ⚫ The base register hold the smallest legal physical memory address ⚫ The limit register specifies the size of the range ⚫ The CPU hardware compare every address generated in user mode with the registers

8. 1 Background ●●● ●●●● ●●●●● ●●●● ●●0●● Address binding ●●●0 ●●●● The normal procedure of a process o The processes on the disk that are waiting to be brought into memory for execution form input queue Select one process in the input queue and load the process into memory It accesses instructions and data from memory o As the process terminates, its memory space is declared available
9 8.1 Background ⚫ Address binding ⚫ The normal procedure of a process ⚫ The processes on the disk that are waiting to be brought into memory for execution form input queue ⚫ Select one process in the input queue and load the process into memory ⚫ It accesses instructions and data from memory ⚫ As the process terminates, its memory space is declared available

8. 1 Background ●●● ●●●● ●●●●● ●●●● o Address may be represented in different way.080 ●●●● g Address are generally sym bolic addresses in source program E.g. goto loop1 o A com piler will typically bind these symbolic addresses to re-ocatable addresses E.g. 14: 14 bytes from the beginning of this module The linkage editor or loader will in turn bind the re locatable addresses to absolute addresses 0x00074014 Each bind is a mapping from a address space to another
10 8.1 Background ⚫ Address may be represented in different way E.g. ⚫ Address are generally symbolic addresses in source program ▪ E.g. goto loop1 ⚫ A compiler will typically bind these symbolic addresses to re-locatable addresses ▪ E.g. 14: 14 bytes from the beginning of this module ⚫ The linkage editor or loader will in turn bind the relocatable addresses to absolute addresses ▪ 0x0007 4014 Each bind is a mapping from a address space to another

●●● source ●●●● ●●●●● progre ●●●● ●●0●● ●●●● ●●●● Multi-step Processing of compiler or comple assembler tir Ime a User Program object module other module linkage editor load module time system library loader dynamically loaded system library in-memory execution dynamic binary linking time(run memory time Image
11 Multi-step Processing of a User Program
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《高级语言程序设计》课程教学资源(试卷习题)试题三(无答案).doc
- 《数字图像处理》课程教学资源(PPT课件)第五章 代数运算.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)类和对象 Class and Object.ppt
- Detecting Evasion Attack at High Speed without Reassembly.ppt
- 《数字图像处理》课程教学资源(PPT课件)第七章 图像分割.ppt
- 中国科学技术大学:《信息论与编码技术》课程教学资源(PPT课件讲稿)第2章 离散信源及其信息测度.pptx
- 清华大学出版社:《计算机网络安全与应用技术》课程教学资源(PPT课件讲稿)第6章 黑客原理与防范措施.ppt
- 大连工业大学:《数据结构》课程教学资源(PPT课件讲稿,共十章,路莹).pps
- 哈尔滨工业大学:词义消歧(PPT讲稿)Word sense disambiguation.ppt
- 香港城市大学:Adaptive Random Test Case Prioritization(PPT讲稿).pptx
- 《单片机原理及接口技术》课程教学资源(PPT课件)第7章 AT89C51单片机系统扩展 7.4 数据存储器的扩展 7.5 I/O口的扩展.ppt
- 《计算机组装与维护》课程教学资源(PPT课件讲稿)第16章 常见计算机故障解决案例.ppt
- 《计算机组装与维护》课程教学资源(PPT讲稿)第九章 计算机软件维护.ppt
- 对外经济贸易大学:《电子商务概论 Electronic Commerce》课程教学资源(PPT课件讲稿)第八章 电子支付与网络银行.pptx
- 西安电子科技大学:《Mobile Programming》课程PPT教学课件(Android Programming)Lecture 04 Activity, Intent and UI.pptx
- 中国科学技术大学:《网络信息安全 NETWORK SECURITY》课程教学资源(PPT课件讲稿)第九章 网络攻击.ppt
- 《面向对象建模技术》课程教学资源(PPT课件讲稿)第11章 UML与RUP.ppt
- 上海交通大学:IT项目管理(PPT讲稿)讲座5 目标、范围管理与需求工程.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)设计模式 Design Patterns(1).ppt
- 《算法分析与设计》课程教学资源(PPT课件讲稿)第六章 基本检索与周游方法(一般方法).ppt
- 中国科学技术大学:《高级操作系统 Advanced Operating System》课程教学资源(PPT课件讲稿)第四章 分布式进程和处理机管理.ppt
- Network Alignment(PPT讲稿)Treating Networks as Wireless Interference Channel.pptx
- 虚拟存储(PPT课件讲稿)Virtual Memory.ppt
- 《计算机组成原理》课程教学资源(PPT课件讲稿)第二章 电子计算机中信息的表示及其运算.ppt
- 中国科学技术大学:《算法设计与分析》课程教学资源(PPT课件讲稿)第一部分 概率算法(黄刘生).ppt
- 《程序设计语言原理》课程教学资源(PPT课件讲稿)形式语义学 Formal Semantics.ppt
- MSC Software Corporation:Dynamic System Modeling, Simulation, and Analysis Using MSC.EASY5(Advanced Class).ppt
- SVM原理与应用(PPT讲稿).pptx
- 安徽理工大学:《汇编语言》课程教学资源(PPT课件讲稿)第二章 80x86计算机组织.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)设计模式 Design Pattern(3).ppt
- 《C语言程序设计》课程教学资源(PPT课件讲稿)第2章 数据类型与常用库函数.ppt
- 山东大学:《数据结构》课程教学资源(PPT课件讲稿)第5章 堆栈(STACKS)Restricted version of a linear list.ppt
- 澳门大学:统计机器翻译领域适应性研究 Domain Adaptation for Statistical Machine Translation Master Defense.pptx
- 北京大学:《高级软件工程》课程教学资源(PPT课件讲稿)第九讲 静态代码的可信性分析概述.ppt
- 《C语言程序设计》课程教学资源(PPT课件讲稿)第10章 指针.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)分布对象 Distributed Objects(1).ppt
- 四川大学:《操作系统 Operating System》课程教学资源(PPT课件讲稿)Chapter 1 Computer System Overview.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第一章 导引与基本数据结构.ppt
- 《结构化程序设计》课程教学资源(PPT课件讲稿)第4章 VB控制结构.ppt
- 香港城市大学:PERFORMANCE ANALYSIS OF CIRCUIT SWITCHED NETWORKS(PPT讲稿).pptx