当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec16_mainmemory

资源类别:文库,文档格式:PDF,文档页数:21,文件大小:389.92KB,团购合买
点击下载完整版文档(PDF)

CHAPTER 8:MAIN MEMORY

CHAPTER 8: MAIN MEMORY

CHAPTER 8:MEmory mAnagement o Background o Swapping o Contiguous Memory allocation o Paging o Structure of the Page Table o Segmentation o Example:The Intel Pentium

CHAPTER 8: MEMORY MANAGEMENT  Background  Swapping  Contiguous Memory Allocation  Paging  Structure of the Page Table  Segmentation  Example: The Intel Pentium

OBJECTIVES o To provide a detailed description of various ways of organizing memory hardware o To discuss various memory-management techniques,including paging and segmentation oTo provide a detailed description of the Intel Pentium,which supports both pure segmentation and segmentation with paging

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

BACKGROUND o Program must be brought(from disk)into memory and placed within a process for it to be run o Main memory and registers are only storage CPU can access directly o Register access in one CPU clock (or less) o Main memory can take many cycles o Cache sits between main memory and CPU registers o Protection of memory required to ensure correct operation

BACKGROUND  Program must be brought (from disk) into memory and placed within a process for it to be run  Main memory and registers are only storage CPU can access directly  Register access in one CPU clock (or less)  Main memory can take many cycles  Cache sits between main memory and CPU registers  Protection of memory required to ensure correct operation

BASE AND LIMIT REGISTERS o A pair of base and limit registers define the logical address space 0 operating system 256000 process 300040 300040 base process 420940 120900 limit process 880000 1024000

BASE AND LIMIT REGISTERS  A pair of base and limit registers define the logical address space

HW ADDRESS PROTECTION WITH BASE AND LIMIT REGISTERS base base limit address yes yes CPU no no trap to operating system monitor-addressing error memory

HW ADDRESS PROTECTION WITH BASE AND LIMIT REGISTERS

PREPARING PROGRAM FOR EXECUTION o Program Transformations Translation (Compilation) Linking 。Loading Iranslation Linking Loading Execution source object module 1 module 1 source objcet load load module 2 module 2 module module (in secondary (in main memory) memory) source objcet module n module n 7

PREPARING PROGRAM FOR EXECUTION  Program Transformations  Translation (Compilation)  Linking  Loading 7

PROGRAM TRANSFORMATIONS o Translation source written in symbolic programming language conversion of symbolic instructions into machine specific form o Linking complex systems made up by multiple modules resolving of external references to other modules conversion from logical addresses to physical memory locations o Loading transfer of code from disk to main memory 8

PROGRAM TRANSFORMATIONS  Translation  source written in symbolic programming language  conversion of symbolic instructions into machine specific form  Linking  complex systems made up by multiple modules  resolving of external references to other modules  conversion from logical addresses to physical memory locations  Loading  transfer of code from disk to main memory 8

BINDING OF INSTRUCTIONS AND DATA TO MEMORY o Address binding of instructions and data to memory addresses can happen at three different stages 0 Compile time:If memory location known a priori, absolute code can be generated;must recompile code if starting location changes Load time:Must generate relocatable code if memory location is not known at compile time Execution time:Binding delayed until run time if the process can be moved during its execution from one memory segment to another.Need hardware support for address maps (e.g.,base and limit registers)

BINDING OF INSTRUCTIONS AND DATA TO MEMORY  Address binding of instructions and data to memory addresses can happen at three different stages  Compile time: If memory location known a priori, absolute code can be generated; must recompile code if starting location changes  Load time: Must generate relocatable code if memory location is not known at compile time  Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another. Need hardware support for address maps (e.g., base and limit registers)

MULTISTEP PROCESSING OF A USER PROGRAM source program compiler or compile assembler time object module other object modules linkage editor load load module time system library loader dynamically loaded system library in-memory binary executio dynamic linking time (run memory image time)

MULTISTEP PROCESSING OF A USER PROGRAM

点击下载完整版文档(PDF)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共21页,试读已结束,阅读完整版请下载
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有