何谓重定位? 把在装入时对目标程序中指令和数据的变换过 程称为重定位。 地址变换是在装入时一次完成的,以后不再改 变,故称为静态重定位。 将目标模块装入内存后,并不立即把装入模块 中的相对地址转换为绝对地址,而是把这种地 址转换推迟到程序执行时进行,在硬件地址变 换机构的支持下,随着对每条指令或数据的访 问自动进行地址变换,故称为动态重定位
• 何谓重定位? 把在装入时对目标程序中指令和数据的变换过 程称为重定位。 • 地址变换是在装入时一次完成的,以后不再改 变,故称为静态重定位。 • 将目标模块装入内存后,并不立即把装入模块 中的相对地址转换为绝对地址,而是把这种地 址转换推迟到程序执行时进行,在硬件地址变 换机构的支持下,随着对每条指令或数据的访 问自动进行地址变换,故称为动态重定位
Protectiono保护) Base register starting address for the process · Bounds register ending location of the process These values are set when the process is loaded
Protection(保护) • Base register – starting address for the process • Bounds register – ending location of the process • These values are set when the process is loaded
Relative address Process Control Bkc Base Register Adder Program Absolute Bounds register Comparator addre Data Interrupt t operating system Stack Process image in maIn memory Figure 7. 8 Hardware Support for Relocation
Programs in other processes should not be able to reference memory locations in a process for reading or writing purposes without permission。(其他进程中的程序不能为未经授 权的读或写访问这个进程的存储器单元 Note that, the memory protection requirement must be satisfied by the processor(hardware) rather than os(software). This is because the operating system cannot anticipate all of the memory references that a program will make.(注意,存储器 保护要求必须由处理器(硬件)来满足,而不是 由操作系统(软件)满足。这是因为操作系统不 能预测一个程序可能产生的所有存储器访问)
• Programs in other Processes should not be able to reference memory locations in a process for reading or writing purposes without permission。(其他进程中的程序不能为未经授 权的读或写访问这个进程的存储器单元 ) • Note that,the memory protection requirement must be satisfied by the processor (hardware) rather than OS(software). This is because the operating system cannot anticipate all of the memory references that a program will make.(注意,存储器 保护要求必须由处理器(硬件)来满足,而不是 由操作系统(软件)满足。这是因为操作系统不 能预测一个程序可能产生的所有存储器访问)
Sharing(共享 Allow several processes to access the same portion of memory允许多个进程 访间主存的同一部分) Better to allow each process(person) access to the same copy of the program rather than have their own separate copy(允许每个进程访问该程序的同一个 副本要优于让它们有自己单独的副本)
• Allow several processes to access the same portion of memory(允许多个进程 访问主存的同一部分 ) • Better to allow each process (person) access to the same copy of the program rather than have their own separate copy(允许每个进程访问该程序的同一个 副本要优于让它们有自己单独的副本 ) Sharing(共享)