Lecture Operating system concepts (9/ed) - Chapter 8: Main Memory
Số trang: 71
Loại file: ppt
Dung lượng: 4.66 MB
Lượt xem: 10
Lượt tải: 0
Xem trước 8 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
In this chapter, the following content will be discussed: Background, swapping, contiguous memory allocation, segmentation, paging, structure of the page table, example: The Intel 32 and 64-bit Architectures, example: ARM Architecture.
Nội dung trích xuất từ tài liệu:
Lecture Operating system concepts (9/ed) - Chapter 8: Main Memory Chapter 8: Main MemoryOperating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and 64-bit Architectures Example: ARM ArchitectureOperating System Concepts – 9th Edition 8.2 Silberschatz, Galvin and Gagne ©2013 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 pagingOperating System Concepts – 9th Edition 8.3 Silberschatz, Galvin and Gagne ©2013 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 Memory unit only sees a stream of addresses + read requests, or address + data and write requests Register access in one CPU clock (or less) Main memory can take many cycles, causing a stall Cache sits between main memory and CPU registers Protection of memory required to ensure correct operationOperating System Concepts – 9th Edition 8.4 Silberschatz, Galvin and Gagne ©2013 Base and Limit Registers A pair of base and limit registers define the logical address space CPU must check every memory access generated in user mode to be sure it is between base and limit for that userOperating System Concepts – 9th Edition 8.5 Silberschatz, Galvin and Gagne ©2013 Hardware Address ProtectionOperating System Concepts – 9th Edition 8.6 Silberschatz, Galvin and Gagne ©2013 Address Binding Programs on disk, ready to be brought into memory to execute form an input queue Without support, must be loaded into address 0000 Inconvenient to have first user process physical address always at 0000 How can it not be? Further, addresses represented in different ways at different stages of a program’s life Source code addresses usually symbolic Compiled code addresses bind to relocatable addresses i.e. “14 bytes from beginning of this module” Linker or loader will bind relocatable addresses to absolute addresses i.e. 74014 Each binding maps one address space to anotherOperating System Concepts – 9th Edition 8.7 Silberschatz, Galvin and Gagne ©2013 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)Operating System Concepts – 9th Edition 8.8 Silberschatz, Galvin and Gagne ©2013 Multistep Processing of a User ProgramOperating System Concepts – 9th Edition 8.9 Silberschatz, Galvin and Gagne ©2013 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 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 Logical address space is the set of all logical addresses generated by a program Physical address space is the set of all physical addresses generated by a programOperating System Concepts – 9th Edition 8.10 Silberschatz, Galvin and Gagne ©2013 Memory-Management Unit (MMU) Hardware device that at run time maps virtual to physical address Many methods possible, covered in the rest of this chapter To start, consider simple scheme ...
Nội dung trích xuất từ tài liệu:
Lecture Operating system concepts (9/ed) - Chapter 8: Main Memory Chapter 8: Main MemoryOperating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and 64-bit Architectures Example: ARM ArchitectureOperating System Concepts – 9th Edition 8.2 Silberschatz, Galvin and Gagne ©2013 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 pagingOperating System Concepts – 9th Edition 8.3 Silberschatz, Galvin and Gagne ©2013 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 Memory unit only sees a stream of addresses + read requests, or address + data and write requests Register access in one CPU clock (or less) Main memory can take many cycles, causing a stall Cache sits between main memory and CPU registers Protection of memory required to ensure correct operationOperating System Concepts – 9th Edition 8.4 Silberschatz, Galvin and Gagne ©2013 Base and Limit Registers A pair of base and limit registers define the logical address space CPU must check every memory access generated in user mode to be sure it is between base and limit for that userOperating System Concepts – 9th Edition 8.5 Silberschatz, Galvin and Gagne ©2013 Hardware Address ProtectionOperating System Concepts – 9th Edition 8.6 Silberschatz, Galvin and Gagne ©2013 Address Binding Programs on disk, ready to be brought into memory to execute form an input queue Without support, must be loaded into address 0000 Inconvenient to have first user process physical address always at 0000 How can it not be? Further, addresses represented in different ways at different stages of a program’s life Source code addresses usually symbolic Compiled code addresses bind to relocatable addresses i.e. “14 bytes from beginning of this module” Linker or loader will bind relocatable addresses to absolute addresses i.e. 74014 Each binding maps one address space to anotherOperating System Concepts – 9th Edition 8.7 Silberschatz, Galvin and Gagne ©2013 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)Operating System Concepts – 9th Edition 8.8 Silberschatz, Galvin and Gagne ©2013 Multistep Processing of a User ProgramOperating System Concepts – 9th Edition 8.9 Silberschatz, Galvin and Gagne ©2013 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 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 Logical address space is the set of all logical addresses generated by a program Physical address space is the set of all physical addresses generated by a programOperating System Concepts – 9th Edition 8.10 Silberschatz, Galvin and Gagne ©2013 Memory-Management Unit (MMU) Hardware device that at run time maps virtual to physical address Many methods possible, covered in the rest of this chapter To start, consider simple scheme ...
Tìm kiếm theo từ khóa liên quan:
Hệ điều hành Hệ điều hành nâng cao Operating System Computer System Organization Operating System Structures Main MemoryTài liệu liên quan:
-
Giáo trình Lý thuyết hệ điều hành: Phần 1 - Nguyễn Kim Tuấn
110 trang 458 0 0 -
173 trang 278 2 0
-
175 trang 276 0 0
-
Giáo trình Nguyên lý các hệ điều hành: Phần 2
88 trang 276 0 0 -
Giáo trình Nguyên lý hệ điều hành (In lần thứ ba): Phần 1 - PGS.TS. Hà Quang Thụy
98 trang 255 0 0 -
Đề tài nguyên lý hệ điều hành: Nghiên cứu tìm hiểu về bộ nhớ ngoài trong hệ điều hành Linux
19 trang 249 0 0 -
Bài thảo luận nhóm: Tìm hiểu và phân tích kiến trúc, chức năng và hoạt động của hệ điều hành Android
39 trang 235 0 0 -
Giáo trình Hệ điều hành: Phần 2
53 trang 223 0 0 -
Phần III: Xử lý sự cố Màn hình xanh
3 trang 209 0 0 -
Bài thuyết trình nhóm môn Hệ điều hành: Tìm hiểu về cách quản lý tệp
17 trang 204 0 0