Virtual Memory Essay

Submitted By wonki
Words: 1039
Pages: 5

Memory Management
POS355
Memory Management

Memory management is quintessential to systems needing to multitask. This is necessary as the system needs to be able to allocate to running programs specific memory locations and then swap or remove designations based on what is running and needed at any particular time. Modern systems are running many different programs at a time and most are to keep the operating system functioning and secure. You then add on to that the needs of the user and the programs they will open and close. This make memory management even more important. The basic requirements of memory management are address mapping and relocation, protection and sharing, application organization and finally virtual memory organization.

In the first requirement, address mapping and relocation, you would start with the control block. This part of memory is where the process control information is held. All other information for the process is held in increasing address values from the control block. After the control block is the entry point for the program and the program instructions themselves. This section includes branch instruction and a reference to the data section of the allocated memory for the program that is running. That reference points to the next section which is the data. Then finally the stack. Essentially this all breaks down to locations for control information, stack execution and code entries. All of this requires the system running the process to know where to find these things and the order in which it can be found as well as relocating these, as processes are used, closed or sitting idle. The average Windows 7 system will run between 50 and 75 processes at any given time. Most of these are used in the overall running of the OS. Others are processes that are loaded at boot for specific programs such as the antivirus, local firewall and others that either the user or the program writer would like to see running immediately for easy, quick access to the program.

Next we look at protection and sharing. This part is a bit simpler. Protection is talking about keeping a designated section of memory isolated to a specific process. If a reference to a memory location from one process is actually pointing at a section allocated for a different process the result can cause bad or unintended actions. This is one of the ways viruses and malware will introduce themselves to a specific process. In the case of the Zeroaccess Trojan, a reference to the location of explorer.exe by the infection allows it to “take control” of and seed itself into the explorer process. As you may know this process controls most of what is seen by the end user in a Windows environment giving the infection control over what the end user sees. Although protection works well in keeping the processes used by Word from using memory that is used by Outlook it can be manipulated by both good and bad processes. This leads into sharing. In module based coding a single library can be used by several processes. It is common for the library to be loaded only once and then used by many processes. The processor usually controls access to these libraries as to avoid having collisions and fragmentation.

Application organization is next. Memory is organized in a linear fashion meaning memory locations are in effect seen from 1 to 10. Most modern programing works in a modular based environment which is not linear. This is effectively seen as more of a 3 dimensional space. As stated before a single library can be loaded once into memory and used by many applications. While processors have attempted to move into this 3-D format memory has not yet crossed this boundary. This has led to the need of a supporting feature, or mechanism, to allow for this type of coding. This is known as segmentation. Segmentation breaks a program up into several