Lecture Operating system principles - Chapter 7: Memory management

After studying this chapter, you should be able to: Discuss the principal requirements for memory management, understand the reason for memory partitioning and explain the various techniques that are used, understand and explain the concept of paging,. | Chapter 7 Memory Management Basic requirements of Memory Management Memory Partitioning Paging Segmentation Memory Management The principal operation of memory management is to bring processes into main memory for execution by the processor. A program must be loaded into main memory to be executed. Memory Management Memory needs to be allocated to ensure a reasonable supply of ready processes to consume available processor time Otherwise, for much of the time all of the processes will be waiting for I/O and the processor will be idle. The need for memory management Memory is cheap today, and getting cheaper But applications are demanding more and more memory, there is never enough! Memory Management involves swapping blocks of data from secondary storage. Memory I/O is slow compared to CPU The OS must cleverly time the swapping to maximise the CPU’s efficiency Memory Management Requirements Relocation Protection Sharing Logical organisation Physical organisation . | Chapter 7 Memory Management Basic requirements of Memory Management Memory Partitioning Paging Segmentation Memory Management The principal operation of memory management is to bring processes into main memory for execution by the processor. A program must be loaded into main memory to be executed. Memory Management Memory needs to be allocated to ensure a reasonable supply of ready processes to consume available processor time Otherwise, for much of the time all of the processes will be waiting for I/O and the processor will be idle. The need for memory management Memory is cheap today, and getting cheaper But applications are demanding more and more memory, there is never enough! Memory Management involves swapping blocks of data from secondary storage. Memory I/O is slow compared to CPU The OS must cleverly time the swapping to maximise the CPU’s efficiency Memory Management Requirements Relocation Protection Sharing Logical organisation Physical organisation Relocation The programmer does not know where the program will be placed in memory when it is executed, it may be swapped to disk and return to main memory at a different location (relocated) But, OS knows because it is managing memory and is responsible for bringing this process into main memory Relocation Addressing The processor and OS must be able to translate the memory references found in the code of the program into actual physical memory addresses (to be discussed) Protection Processes should not be able to reference memory locations in another process without permission. Impossible to check absolute addresses at compile time because the location of a program in main memory is unpredictable. Must be checked at run time by the processor. Sharing Allow several processes to access the same portion of memory Better to allow each process executing the same program access to the same copy of the program rather than have their own separate copy Processes that are cooperating on

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.