Computer Science
Memory Management
Memory management is the process of controlling and coordinating computer memory, assigning portions called blocks to various running programs to optimize overall system performance. It involves managing primary memory and secondary memory, and ensuring that the right processes have access to the right resources at the right time.
Written by Perlego with AI-assistance
Related key terms
1 of 5
7 Key excerpts on "Memory Management"
- eBook - PDF
- Abraham Silberschatz, Peter B. Galvin, Greg Gagne(Authors)
- 2013(Publication Date)
- Wiley(Publisher)
Part Three Memory Management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be at least partially in main memory during execution. To improve both the utilization of the CPU and the speed of its response to users, a general-purpose computer must keep several pro- cesses in memory. Many memory-management schemes exist, reflect- ing various approaches, and the effectiveness of each algorithm depends on the situation. Selection of a memory-management scheme for a sys- tem depends on many factors, especially on the hardware design of the system. Most algorithms require hardware support. This page is intentionally left blank 7 C H A P T E R Main Memory In Chapter 6, we showed how the CPU can be shared by a set of processes. As a result of CPU scheduling, we can improve both the utilization of the CPU and the speed of the computer’s response to its users. To realize this increase in performance, however, we must keep several processes in memory—that is, we must share memory. In this chapter, we discuss various ways to manage memory. The memory- management algorithms vary from a primitive bare-machine approach to paging and segmentation strategies. Each approach has its own advantages and disadvantages. Selection of a memory-management method for a specific system depends on many factors, especially on the hardware design of the system. As we shall see, many algorithms require hardware support, leading many systems to have closely integrated hardware and operating-system Memory Management. CHAPTER OBJECTIVES • To provide a detailed description of various ways of organizing memory hardware. • To explore various techniques of allocating memory to processes. • To discuss in detail how paging works in contemporary computer systems. 7.1 Background As we saw in Chapter 1, memory is central to the operation of a modern computer system. Memory consists of a large array of bytes, each with its own address. - eBook - PDF
- Abraham Silberschatz, Peter B. Galvin, Greg Gagne(Authors)
- 2020(Publication Date)
- Wiley(Publisher)
Part Four Memory Management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be at least partially in main memory during execution. Modern computer systems maintain several processes in memory during system execution. Many memory-management schemes exist, reflecting various approaches, and the effectiveness of each algorithm varies with the situation. Selection of a memory-management scheme for a system depends on many factors, especially on the system’s hardware design. Most algorithms require some form of hardware support. 9 C H A P T E R Main Memory In Chapter 5, we showed how the CPU can be shared by a set of processes. As a result of CPU scheduling, we can improve both the utilization of the CPU and the speed of the computer’s response to its users. To realize this increase in performance, however, we must keep many processes in memory—that is, we must share memory. In this chapter, we discuss various ways to manage memory. The memory- management algorithms vary from a primitive bare-machine approach to a strategy that uses paging. Each approach has its own advantages and disad- vantages. Selection of a memory-management method for a specific system depends on many factors, especially on the hardware design of the system. As we shall see, most algorithms require hardware support, leading many systems to have closely integrated hardware and operating-system Memory Management. CHAPTER OBJECTIVES • Explain the difference between a logical and a physical address and the role of the Memory Management unit (MMU) in translating addresses. • Apply first-, best-, and worst-fit strategies for allocating memory contigu- ously. • Explain the distinction between internal and external fragmentation. • Translate logical to physical addresses in a paging system that includes a translation look-aside buffer (TLB). • Describe hierarchical paging, hashed paging, and inverted page tables. - eBook - PDF
Input/output System Of Minicomputers: I/o Software Of Pdp Computers
I/O Software of PDP Computers
- Jingxuan Xue(Author)
- 1989(Publication Date)
- World Scientific(Publisher)
Chapter 3 Memory Management AND ADDRESS MAPPING Section 1. Overview of Memory Management Memory is one of the computer resources for which the user processes compete strongly. So Memory Management now has become the key point of the management of the computer resources. Its performance, on a comparatively large scale, determines the working efficiency of the whole system. When there was no multi-programming, there was only one user process using the computer resources. There were no such problems as memory allocation and memory protection. With time, software engineers would discover that their programs needed more memory space, and they would realize the necessity of multi-programming which requires separation and protection of user processes co-resident in memory at the same time. In PDP-11/20 the addressing capability was only 32K words. With the introduction of the 11/40 and 11/45, 18-bit addressing was made possible. Later on, with the 11/70, it became possible to have 22-bit address lengths. So after the introduction of multi-programming, the memory manage-ment becomes necessary, which have three functions as follows [1,2,3]. 1. Memory allocation. Under the multi-programming environment, the user processes are unable to allocate the memory space directly in their own source code. Each user process is assembled, linked and debugged independently, not knowing beforehand when and where it will be installed and run in the memory. So the.user processes have neither the rights nor the ability to allocate the memory space for themselves. It is the memory 35 36 IIO System of Minicomputers management unit that is responsible for allocating the memory space to as many user processes as possible, while they co-exist in the memory at the same time. This also guarantees the efficient utilization of the memory space. - eBook - PDF
System Software And Software Systems: Execution Support Environment
Concepts and Methodology
- Daniela L Rus, Teodor Rus(Authors)
- 1994(Publication Date)
- World Scientific(Publisher)
Chapter 10 Memory Management system — micro level The hierarchy of the system software discussed in Chapter 1 placed the Memory Management System, MMS, immediately above the Process Management System. This is because, unless a process possesses some main memory, there is very little it can do. It certainly cannot execute since there is no memory to contain the program and data for the processor to access them. It cannot perform I/O operations because these operations are executed through buffers in main memory. Thus, in order to execute a computing task, a process must first be allocated the necessary main memory. The MMS is the subsystem of the operating system which accomplishes the task of managing the memory for the various processes present in the system at a given time. There are two levels of Memory Management: • Micro level: the MMS moves programs and data between various levels of the physical memory hierarchy. • Macro level: the MMS performs the algorithms which implement the policies for Memory Management among the users of the computer installation. Because the users of the computer system are always represented by the processes created to execute their programs, the policies for Memory Management are the poli-cies for allocating memory to the various processes in the system. These policies are established by the administrators of the computer installation. Therefore, the algorithms chosen to implement these policies change with the administrators. This chapter is concerned mainly with micro level Memory Management. 251 252 Memory Management system 10.1 Memory hierarchy As seen in Chapter 2, the memory of a computer installation consists of the hardware mechanisms which facilitate information storage, preservation, and retrieval. It can be referred to as a predefined data type and is usually organized on three levels: main memory, secondary memory, and cache memory. 10.1.1 Main memory This is the internal memory of the computer. - eBook - ePub
C++ High Performance
Master the art of optimizing the functioning of your C++ code, 2nd Edition
- Björn Andrist, Viktor Sehr(Authors)
- 2020(Publication Date)
- Packt Publishing(Publisher)
7
Memory Management
After reading the previous chapters, it should no longer come as a surprise that the way we handle memory can have a huge impact on performance. The CPU spends a lot of time shuffling data between the CPU registers and the main memory (loading and storing data to and from the main memory). As shown in Chapter 4 , Data Structures , the CPU uses memory caches to speed up access to memory, and programs need to be cache-friendly in order to run quickly.This chapter will reveal more aspects of how computers work with memory so that you know which things must be considered when tuning memory usage. In addition, this chapter covers:- Automatic memory allocation and dynamic Memory Management.
- The life cycle of a C++ object and how to manage object ownership.
- Efficient Memory Management. Sometimes, there are hard memory limits that force us to keep our data representation compact, and sometimes, we have plenty of memory available but need the program to go faster by making Memory Management more efficient.
- How to minimize dynamic memory allocations. Allocating and deallocating dynamic memory is relatively expensive and, at times, we need to avoid unnecessary allocations to make the program run faster.
We will start this chapter by explaining some concepts that you need to understand before we dig deeper into C++ Memory Management. This introduction will explain virtual memory and virtual address spaces, stack memory versus heap memory, paging, and swap space.Computer memory
The physical memory of a computer is shared among all the processes running on a system. If one process uses a lot of memory, the other processes will most likely be affected. But from a programmer's perspective, we usually don't have to bother about the memory that is being used by other processes. This isolation of memory is due to the fact that most operating systems today are virtual memory operating systems, which provide the illusion that a process has all the memory for itself. Each process has its own virtual address space - Qiu Yi, Xiong Puxiang, Tianlong Zhu(Authors)
- 2020(Publication Date)
- Auerbach Publications(Publisher)
8 Memory ManagementIn a computing system, there are usually two types of memory space: internal memory space and external memory space. The internal memory is quick to access and can be accessed randomly according to the variable address. It is what we usually called RAM (random-access memory) and can be understood as the computer's memory. In the external memory, the content stored is relatively fixed, and the data will not be lost even after the power is turned off. It is what we usually called ROM (read-only memory) and can be understood as the hard disk of the computer.In a computer system, variables and intermediate data are generally stored in RAM, and they are only transferred from RAM to the CPU for calculation when needed. The memory size required by some data needs to be determined according to the actual situation during the running of the program, which requires the system to have the ability to dynamically manage the memory space. The user asks the system to allocate a block of memory, and then the system selects a suitable memory space to allocate for the user. After the user finishes using it, the memory space is released back to the system, which enables the system to recycle the memory space.This chapter introduces two kinds of Memory Management methods in RT-Thread, namely dynamic memory heap management and static memory pool management. After reading this chapter, readers will understand the Memory Management principle and usage of RT-Thread.Memory Management Features
Since timing is critical in real-time systems, the requirements to the Memory Management are much higher than those in general-purpose operating systems:- Time for allocating memory must be deterministic. The general Memory Management algorithm is to find a free memory block that fits the size of the data to be stored and then store the data therein. The time it takes to find such a free block of memory is uncertain. But for real-time systems, non-deterministic timing in memory allocation is unacceptable because a real-time system, as the name implies, requires deterministic timing of its task responses and it can't be done without a deterministic memory allocator.
- No longer available |Learn more
- Viktor Sehr, Bjorn Andrist(Authors)
- 2018(Publication Date)
- Packt Publishing(Publisher)
Memory Management
After reading the previous chapters, it should no longer come as a surprise that the way we handle memory can have a huge impact on the performance. The CPU spends a lot of time shuffling data between the CPU registers and the main memory (loading and storing data to and from the main memory). As shown in Chapter 4 , Data Structures , the CPU uses memory caches to speed up the access of memory, and the programs need to be cache-friendly in order to run quickly. This chapter will reveal more aspects of how computers work with memory so that we know which things must be considered when tuning memory usage. We will discuss automatic memory allocation and dynamic Memory Management, and look at the life cycle of a C++ object. Sometimes there are hard memory limits that force us to keep our data representation compact, and sometimes we have plenty of memory available but need the program to go faster by making the Memory Management more efficient. Allocating and deallocating dynamic memory is relatively expensive and, at times, we need to avoid unnecessary allocations to make the program run faster.We will start this chapter by explaining some concepts that we need to understand before we dig deeper into C++ Memory Management. This introduction will explain virtual memory and virtual address space, stack memory versus heap memory, paging, and swap space.Passage contains an image
Computer memory
The physical memory of a computer is shared among all the processes running on a system. If one process uses a lot of memory, the other processes will most likely be affected. But from a programmer's perspective, we usually don't have to bother about the memory that is being used by other processes. This isolation of memory is due to the fact that most operating systems today are virtual memory operating systems, which provide the illusion that a process has all the memory for itself. Each process has its own virtual address space
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.






