Wednesday, October 23, 2019
Memory Management Requirements
When talking about memory management, it is important to first understand what it is. When operating in a uniprogramming system, the main memory, commonly referred to as random access memory (RAM), is divided into two different parts. The first part is assigned to the operating system (OS), while the second part is assigned to the program currently being executed. When operating in a multiprogramming system, the OS portion must further be subdivided to accommodate multiple processes being executed simultaneously. This subdivision is done dynamically be the OS and that is what is referred to as memory management. Memory management is intended to fulfill a set list of requirements. These requirements are: relocation, protection, sharing, logical organization, and physical organization. This paper will cover each requirement individually. Relocation When a program executes, it is not always the only process accessing the main memory. There are generally many different processes that need access. And so, these processes get swapped around to keep active processes in the main memory in order to maximize the processor usage. When a process gets swapped out for another process, and will need to return, it is not realistic to expect that it will return to its original location in the main memory. This is where relocation plays a vital role. As processes get swapped out, and then back in, relocation moves them around to ensure that there is enough room for everyone to play. Protection Protection refers to maintaining the integrity of a process. A process cannot access a function of another process without specific permission before hand. As swapping and relocation occur, the likelihood of corrupting a process with another one increases. Protection refers to the protocols that keep that from happening. Sharing Sometimes multiple processes may need to access the same portion of main memory. In instances where processes are executing the same program, it is advantageous to allow them to access the same copy of the program, rather than them each having their own. Sharing has a delicate balance that it shares with protection. That is why control over sharing capabilities is very important. Local Organization Both main memory and secondary memory are organized as linear. This creates a conflict, because most programs are organized into modules. Local organization helps the OS and computer effectively deal with programs and data that are organized into modules. This provides a number of benefits. Modules can then be written and compiled independently, protection can be provided in the form of read/execute only modules, and it allows for easy sharing among modules. Physical Organization Physical organization is the core concept in memory management. To understand physical organization, you must first understand the two layers of memory in a system. Main memory refers to memory that is intended for quick processing, and is volatile, meaning that is loses all data when power is not applied. The second of these layers is referred to as secondary memory, which is slower, but is intended for long term storage. Because the programmer of a user program cannot possible know how much memory is available at the time of execution, and that there may be insufficient memory, the responsibility of managing physical organization belongs to the system. Memory Management Requirements When talking about memory management, it is important to first understand what it is. When operating in a uniprogramming system, the main memory, commonly referred to as random access memory (RAM), is divided into two different parts. The first part is assigned to the operating system (OS), while the second part is assigned to the program currently being executed. When operating in a multiprogramming system, the OS portion must further be subdivided to accommodate multiple processes being executed simultaneously. This subdivision is done dynamically be the OS and that is what is referred to as memory management. Memory management is intended to fulfill a set list of requirements. These requirements are: relocation, protection, sharing, logical organization, and physical organization. This paper will cover each requirement individually. Relocation When a program executes, it is not always the only process accessing the main memory. There are generally many different processes that need access. And so, these processes get swapped around to keep active processes in the main memory in order to maximize the processor usage. When a process gets swapped out for another process, and will need to return, it is not realistic to expect that it will return to its original location in the main memory. This is where relocation plays a vital role. As processes get swapped out, and then back in, relocation moves them around to ensure that there is enough room for everyone to play. Protection Protection refers to maintaining the integrity of a process. A process cannot access a function of another process without specific permission before hand. As swapping and relocation occur, the likelihood of corrupting a process with another one increases. Protection refers to the protocols that keep that from happening. Sharing Sometimes multiple processes may need to access the same portion of main memory. In instances where processes are executing the same program, it is advantageous to allow them to access the same copy of the program, rather than them each having their own. Sharing has a delicate balance that it shares with protection. That is why control over sharing capabilities is very important. Local Organization Both main memory and secondary memory are organized as linear. This creates a conflict, because most programs are organized into modules. Local organization helps the OS and computer effectively deal with programs and data that are organized into modules. This provides a number of benefits. Modules can then be written and compiled independently, protection can be provided in the form of read/execute only modules, and it allows for easy sharing among modules. Physical Organization Physical organization is the core concept in memory management. To understand physical organization, you must first understand the two layers of memory in a system. Main memory refers to memory that is intended for quick processing, and is volatile, meaning that is loses all data when power is not applied. The second of these layers is referred to as secondary memory, which is slower, but is intended for long term storage. Because the programmer of a user program cannot possible know how much memory is available at the time of execution, and that there may be insufficient memory, the responsibility of managing physical organization belongs to the system.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.