Overlays e Keep in memory only those instructions and data that are needed at any given time.(只是在内存中保留那些在特定时间 所需要的指令和数据) Needed when process is larger than amount of memory alllocated to it.(当进程比所分配的内存大时,覆盖是必需的) Implemented by user, no special support needed from operating system, programming design of overlay structure is complex.(由用户执行,不需要操作系统的特别支持,覆盖结 构的程序设计很复杂。) Applied Operating System Concepts 96 Silberschatz, Galvin, and Gagne @1999
Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts 9.6 Overlays • Keep in memory only those instructions and data that are needed at any given time.(只是在内存中保留那些在特定时间 所需要的指令和数据) • Needed when process is larger than amount of memory allocated to it.(当进程比所分配的内存大时,覆盖是必需的) • Implemented by user, no special support needed from operating system, programming design of overlay structure is complex.(由用户执行,不需要操作系统的特别支持,覆盖结 构的程序设计很复杂。)
Logical vs Physical Address Space The concept of a logical address space that is bound to a separate physical address space is central to proper memory management.(逻辑地址空间的概念同物理地址空间想关联,它是 正确内存管理的中心。) Logical address- generated by the CPU; also referred to as virtual address.(逻辑地址一由cPU产生;也叫做虚拟空间 Physical address- address seen by the memory unit. (4 理地址一内存设备所读入的地址) Logical and physical addresses are the same in compile-time and load-time address-binding schemes; logical (virtual) and physical addresses differ in execution-time address-binding scheme.(逻辑和物理地址在编译时期和装入时期的地址绑定策略是 相同的,而在执行时间的地址绑定策略是不同的。) Applied Operating System Concepts 97 Silberschatz, Galvin, and Gagne @1999
Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts 9.7 Logical vs. Physical Address Space • The concept of a logical address space that is bound to a separate physical address space is central to proper memory management.(逻辑地址空间的概念同物理地址空间想关联,它是 正确内存管理的中心。) – Logical address – generated by the CPU; also referred to as virtual address.(逻辑地址—由CPU产生;也叫做虚拟空间 。) – Physical address – address seen by the memory unit.(物 理地址—内存设备所读入的地址) • Logical and physical addresses are the same in compile-time and load-time address-binding schemes; logical (virtual) and physical addresses differ in execution-time address-binding scheme.(逻辑和物理地址在编译时期和装入时期的地址绑定策略是 相同的,而在执行时间的地址绑定策略是不同的。)
Memory-Management Unit MMU) ° Hardware device that maps virtual to physical address..(硬件 把虚拟地址映射到物理地址) In MMUscheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.(在MMU策略中,基址寄存器中的值在其送入内 存的时候被加入到由一个用户进程所产生的每个地址中。) The user program deals with logical addresses; it never sees the real/ physical addresses.(用户程序所对应到的是逻辑地址 物理地址对它从来都不可见。) Applied Operating System Concepts 98 Silberschatz, Galvin, and Gagne @1999
Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts 9.8 Memory-Management Unit (MMU) • Hardware device that maps virtual to physical address.(硬件 把虚拟地址映射到物理地址) • In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.(在MMU策略中,基址寄存器中的值在其送入内 存的时候被加入到由一个用户进程所产生的每个地址中。) • The user program deals with logical addresses; it never sees the real physical addresses.(用户程序所对应到的是逻辑地址 ,物理地址对它从来都不可见。)
Swapping A process can be swapped temporarily out of memory to a backing store, and then brought back into memory for continued execution.(一个进程可以暂时被交换到内存外的一个 备份区,随后可以被换回内存继续执行。) e Backing store -fast disk large enough to accommodate copies of all memory images for all users; must provide direct access to these memory images.(备份区一是一个固定 的足够大的可以容纳所有用户内存映像的拷贝;对于可以让这些内 存映像直接存取。) Applied Operating System Concepts 9 Silberschatz, Galvin, and Gagne @1999
Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts 9.9 Swapping • A process can be swapped temporarily out of memory to a backing store, and then brought back into memory for continued execution.(一个进程可以暂时被交换到内存外的一个 备份区,随后可以被换回内存继续执行。) • Backing store – fast disk large enough to accommodate copies of all memory images for all users; must provide direct access to these memory images.(备份区—是一个固定 的足够大的可以容纳所有用户内存映像的拷贝;对于可以让这些内 存映像直接存取。)
Swapping Roll out, roll in-swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executed.(滚入,滚出 交换由于基于优先级的算法而不同,低优先级的进程被换出, 这样高优先级的进程可以被装入和执行。) Major part of swap time is transfer time; total transfer time is directly proportional to the amount of memory swapped.(交换时 间的主要部分是转移时间,总的转移时间直接同交换的内存的数一 量成比例。) Modified versions of swapping are found on many systems, 1. e, UNIX and Microsoft windows.(在许多系统如:UNIX Windows中,可以找到一些被修正过的交换措施。) Applied Operating System Concepts 9.10 Silberschatz, Galvin, and Gagne @1999
Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts 9.10 Swapping Roll out, roll in – swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executed.(滚入,滚出 —交换由于基于优先级的算法而不同,低优先级的进程被换出, 这样高优先级的进程可以被装入和执行。) Major part of swap time is transfer time; total transfer time is directly proportional to the amount of memory swapped.(交换时 间的主要部分是转移时间,总的转移时间直接同交换的内存的数 量成比例。) Modified versions of swapping are found on many systems, i.e., UNIX and Microsoft Windows.(在许多系统如:UNIX, Windows中,可以找到一些被修正过的交换措施。)