Free Essay

Memory Management

In:

Submitted By toopooe4u
Words 1317
Pages 6
Unix®, Linux®, Mac OS®, Windows® Operating Systems Comparison Paper.
Barbara Poe
Pos 355 Introduction to Operating Systems
11-10-14
William Davis

Unix®, Linux®, Mac OS®, Windows® Operating Systems Comparison Paper.

Memory management is the act of managing computer memory. The essential requirement of memory management is to provide ways to dynamically allocate portions of memory to programs at their request, and free it for reuse when no longer needed. The memory management system is one of the important parts of the operating system. Its basic function is to manage the memory hierarchy of RAM and secondary memory devices. There is always a need of more memory than physical memory. Memory management allows this to be done through the concept of virtual memory. Virtual memory can be many times larger than the physical memory. The most important task of memory management includes allocation and dealloacation of memory to the processes running on the system. Other requirements of memory management are relocation, protection, sharing, logical organization, and physical organization

Relocation
Stallings states, when an active process is swapped out of main memory to disk it would be quite limiting to specify that when it is next swapped back in, it must be placed in the same main memory region as before. Instead, we may need to relocate the process to a different area of memory (Stallings, 2015).

Protection
The main purpose of memory protection is to prevent a process from accessing memory that has not been allocated to it. This prevents a bug within a process from affecting other processes, or the operating system itself.

Sharing Shared memory is memory that may be accessed by multiple programs with the intent to provide communication among them or avoid redundant copies. Shared memory is an efficient way of passing data between programs.

Logical Organization
Logical Organization occurs because, according to Stallings, “Most programs are organized into modules, some of which are unmodifiable (read only, execute only) and some of which contain data that may be modified” (Stallings, 2015). The memory management is responsible for handling this logical organization that is different from the physical linear address space.

Physical Organization
Physical Organization is the organization of the two levels of memory. There is main memory, which has fast access, is high cost, and is volatile, meaning it does not have permanent storage. Then there is secondary memory which is slower and cheaper than main memory and is usually not volatile. Memory management systems handle moving information between these two levels of memory.

Now that a general understanding of memory management have been covered, next a comparison of memory management between the Unix/Linux, Mac OS and Windows operating systems will be done. Windows: has both physical and virtual memory. Memory is managed in pages, with processes demanding it as necessary. Memory pages are 4KB in size (both for physical and virtual memory); but you can also allocate memory in large (2-4MB, depending on architecture) pages for efficiency. In general, there ae very few things in common between physical and virtual memory. The Windows virtual memory manger controls how memory is allocated and how paging is performed. The memory manager is designed to operate over a variety of platforms and to use page sizes ranging from 4 Kbytes to 4 Kbytes. On 32-it (x86) architectures, the total addressable memory is 4GB divided equally into user pace and system space. Pages in system space can only be accessed from kernel mode; user-mode processes (application code) can only access data that is appropriately marked in user mode. There is one single 2GB system space that is mapped into the address space for all processes; each process also has its own 2GB user space.
Linux: memory management under Linux has two components. The first deals with allocating and freeing physical memory pages, groups of pages, and small blocks of RAM. The second handles virtual memory, which is memory-mapped into the address space of running processes. The two main aspects of Linux memory management: process is virtual memory and kernel memory allocation The Linux kernel memory capability manages physical main memory page frames. Its primary function is to allocate and deallocate frames for particular uses. The foundation of kernel memory allocation for Linux is the page allocation mechanism used for user virtual memory management. As in the virtual memory scheme, a buddy algorithm is used so that memory for the kernel can be allocated and deallocated in units of one or more pages. Virtual memory allows an operating system to escape the limitations of physical RAM. The virtual memory manager creates a logical address space (or “virtual” address space) for each process and divides it up into uniformly-sized chunks of memory called pages. The processor and its memory management unit (MMU) maintain a page table to map pages in the program’s logical address space to hardware addresses in the computer’s RAM. Unix: memory management on UNIX systems must keep track of several kinds of information. The page mappings for a particular process (the page table), the location of swapped pages on disk, and the state of the actual physical pages in memory. Because UNIX is intended to be machine independent, its memory management scheme will vary from one system to the next. Earlier versions of UNIX only used variable partitioning with no virtual memory scheme. Current versions of UNIX and Solaris make use of paged virtual memory Pages are swapped in when needed, and pages are swapped out when space needs to be made. Linux adopts a staged approach. Pages are stored in one of three separate lists in the main memory page cache
Mac OS: Organization of Memory in Mac OS when the Macintosh Operating System starts up it divides the available RAM into two broad sections. It reserves for itself a zone or partition of memory known as the system partition. The system partition always begins at the lowest addressable byte of memory (memory address 0) and extends upward. All memory outside the system partition is available for allocation to applications or other software components. The main part of the system partition is an area of memory known as the system heap. In general, the system heap is reserved for exclusive use by the operating system and other system software components, which load into it various items such as system resources, system code segments, and system data structures. The heap is located at the low memory end of your application partition and always expands (when necessary) toward high memory Hardware device drivers (stored as code resources of type 'DRVR') are loaded into the system heap when the driver is opened. In the Mac multitasking environment, each application is limited to a particular memory partition (whose size is determined by information in the 'size' resource of that application). If for some reason you need more memory than is currently available in your application heap, you can ask the operating system to let you use any available memory that is not yet allocated to any other application. This memory, known as temporary memory, is allocated from the available unused RAM; usually, that memory is not contiguous.
The Mac OS used a form of memory management that fueled criticism causing it to fall out of favor n modern systems, Addressing the areas of concerns lead Mac to change to the OS X
I have explained important concepts of memory management and compared the memory management system of Windows, Linux, UNIX, and Mac OS operating systems.

References
Stallings W, Operating Systems: Internals and Design Principles, Eighth Edition Published by Prentice Hall. Copyright © 2015 by Pearson Education, Inc. http://blogs.msdn.com/b/tims/archive/2010/10/28/pdc10-mysteries-of-windows-memory-management-revealed-part-one.aspx http://coding.answers.com/linux/a-guide-to-understanding-the-linux-operating-system compute r- science-essay.php#ixzz3HXx5CRMs

http://www.mindfiresolutions.com/mindfire/Mac_Memory_Manager.pdf

Similar Documents

Premium Essay

Memory Management

...Memory Management Requirements Kari Amenhauser POS/355 May 11, 2015 Karen Clark Memory Management Memory management is important when working with computers. Memory management is where the computer divides memory to accommodate multiple processes. Memory needs to be redistributed to help with the processor so that programs can run smoother and faster. The requirements for memory management are, relocation, protection, sharing, logical organization, and physical organization. First, there is relocation, when a program is running, it may be swapped around to different locations, such as being moved over to the disk and then returned to the main memory. From there it can run quickly while other processes can be going on. Next is protection, processes are not allowed to reference memory locations without permission. This helps keep programs and processes safe if they are sensitive and should not be accessed by an unauthorized user. Memory protection must be fulfilled by the processor not the operating system. Sharing allows multiple processes access to the same portion of memory. In other words, it is better to let each process access the same copy of the program, rather than each process have its’ own version. Which would make the processor speeds slow down and the computer itself would run a lot slower. With logical organization, all programs are written in modules. Modules can be written by itself and complied by itself. Meaning if you write a program, you can create...

Words: 446 - Pages: 2

Premium Essay

Memory Management

...Memory Management Requirements POS/355-BSB February 2013 Memory Management Requirements. Memory management is an important part of the computer system. The correct amounts of memory need to be available for different functions at the same time so not to slow the processor too much. Relocation, protection sharing, physical organization, and logical organization all are key components in memory management. Relocation is the first we will talk about, this is when main memory is swapped out and relocated to different addresses also in the main memory, for instance when using a multiple processor system. This allows the processors to work with specific amounts of memory for each task and not be bogged down. Memory protection sharing, this is when multiple systems and or processes need to use the same areas of memory as each other and will then share it with the areas needed so these systems may use it at the same time. Physical organization is where the main and secondary memory is located so it can access other systems directly. It must be in a specific place to allow this access without having to go through other parts of the system to get to the parts it needs most often. Logical organization is done by putting things in an order so the system knows where to find them quickly and easily. This allows programs to access memory without hesitation or conflict. When the logical organization...

Words: 318 - Pages: 2

Free Essay

Memory Management

...Memory Management Requirements Memory management requirement is important to operating systems. The memory management function is to manage the computer’s primary memory storage. Since all new computers and laptops run multiple programs at any one time, it is imperative to manage what programs can run in the main memory or RAM and which programs can be swapped to secondary memory storage. Using memory management techniques and virtual memory systems process can efficiently manage an operating system. The quality of these techniques or systems can have an extensive effect on the overall system performance of the operating system. Memory management methods such as single allocation, partitioned allocation, paged memory management, and segmented memory management are processes that are used to determine how memory is distributed through different processes. This process decides which program gets a space of the main memory, when the program can get the space, and how much memory space is available for each program. Single contiguous allocation is the easiest memory management method. The entire computer’s memory, except for the operating systems reserved memory, is available to a single application. Any operating system that uses single contiguous allocation can still multi-task by swapping the contents of memory to switch among applications. A partitioned allocation splits the main memory into multiple main memory partitions. In addition, each partition may contain information...

Words: 619 - Pages: 3

Free Essay

Memory Management

...computers need system memory to operate and require a method of management to insure the proper handling of the data stored within it. Memory management involves relocation, protection, sharing, logical organization, and physical organization of the data. Without proper memory management page faults would climb out of control and data could become corrupted or lost. As a process waits for its turn with the CPU the operating system may move the process out of the main system memory into the page file and back again into main memory. When it is moved around it may not be in the same memory address as it was before it was relocated. This is where memory management comes into play as it helps the operating system translates the memory references found in the processes code to the physical address of the program in the main system memory. Processes also need the protection from other processes for interfering with its operation. In this case process cannot access or reference memory addresses without permission. This is handled by the computers processor as the operate system cannot predict every memory reference that all running programs will make (Stallings, 2009). Sharing of system memory is another technique used by memory management. If you have many processes accessing the same program, allowing all processes to access the same memory address instead of requiring each process to have its own memory space will free up system memory. The part where memory management comes into play...

Words: 747 - Pages: 3

Free Essay

Memory Management

...Memory management requirements can be broken up into five different sections: Relocation, Protection, Sharing, Local organization, and Physical organization. Many online resources confirm these exact requirements and seem to have the same information published so it is difficult to find something unique. It will be necessary to use information from the referenced textbook to explain memory management requirements. In a multiprogramming system, relocation is the act of moving a process into different areas of memory from which it began. To maximize efficiency, processes move into and out of main memory. Relocation therefore is essential for moving the process into available memory while keeping the memory reference information up to date. Protection of memory is best understood as preventing unwanted access to processes resident in memory and allowing authorized access only to the level allowed when permission is granted. It is important to understand that the physical processor and not the operating system is responsible for protecting memory since the operating system cannot always be scanning for memory reference violations (Stallings, 2012). Sharing capabilities are essential to reduce the amount of wasted or duplicated data in memory. Stallings stated, “The memory management system must therefore allow controlled access to shared areas of memory without compromising essential protection” (p. 309). In addition, shared memory is one of the fastest methods used for interprocess...

Words: 545 - Pages: 3

Free Essay

Memory Management Requirements

...Memory Management Requirements POS/355 Introduction to Operating Systems March 3, 2014 Paul Rouk Introduction The main memory of a computer is divided into two categories; the operating system and programs that are currently being executed. Memory management itself is the task of subdivision. There are also four basic requirements to memory management which include; relocation, protection, sharing, logical organization and physical organization. Relocation Main memory is generally shared among a number of various processes. Since programmers cannot know in advance what other programs will be using the main memory when their program is executed thus creates the need for having the ability to swap processes in and out of the main memory. During swapping it is possible that the memory may be placed within different memory regions. Protection Each process should be protected against unwanted interference by other processes. This means programs in other processes should not be able to reference memory locations in a process for reading or writing purposes without permission. Since the operating system is unable to anticipate all of the memory references that a program will make it is important; the hardware rather than the software must satisfy the memory protection requirements. Sharing When it comes to sharing the protection mechanism must have the flexibility to allow several processes to access the same portion of the main memory. The memory management system...

Words: 400 - Pages: 2

Free Essay

Memory Management

...Memory Management Paper Scott Wells University of Phoenix Memory Management Paper There are six memory management requirements that will discussed in this paper. Those requirements are relocation, protection, sharing, logical organization, and physical organization. Memory management is the act of managing the computer’s memory, this basically means the steps necessary to provide ways of allocating portions of memory to programs at their request and feeing it up for reuse when no longer needed (Stallings, 2012). This management system is critical to the computer system. In order for memory management to multi-task it must utilize and deal with the six requirements of memory management. The first one of these requirements utilized is the relocation of memory. Relocation of memory pertains to programs that are swapped from the memory during different stages of processing (Stallings, 2012). In the virtual memory programs must be able to switch and reside in different parts of memory at different times. Once memory has been swapped out it will not always be replaced back into the same part of the memory. Memory management should be able to relocate programs in memory to handle memory references so they always relocate to the right location of the memory. In order for this process of memory swapping to work right there must be some type of address translation. This leads to the next requirement of memory management which is protection. Protection refers to protecting...

Words: 663 - Pages: 3

Free Essay

Memory Management

...Memory Management March 7, 2014 Memory Management Memory is one of the basic elements on a computer system. The memory allows the user to store data and programs. Memory management is the controlling, coordination and management of the computer memory (). The different memory types a computer has are a cache, main memory, and a disk used for virtual memory. Managing this memory will allow the user to access information faster. The memory management system is on the most important parts in the operating system. In this essay will be discussing the differences in memory management between Windows and Linux base operating system. Windows has implemented several technologies, for both resource allocation and security("Windows Memory Management", 2008). One of these technologies is Dynamic Allocation Space Layout Randomization, which all dynamically adjusts according to operation requirements. Windows uses virtual address space to make that could be bigger or smaller than the physical memory on the computer. Windows memory manager has two first-in-rank responsibilities("Windows Memory Management", 2008). The first is to translate, or map, a process’s virtual address space into physical memory so that when a thread is running in the context of that process reads or writes to the virtual address space, the correct physical address is referenced ("Windows Memory Management", 2008). This minimizes hackers’ threats to the computer system. Second on is paging some of the...

Words: 616 - Pages: 3

Free Essay

Memory Management

...Memory management Memory management for a computer in its simplest form is the act of managing memory for a computer. The goal of this management is to allow the most efficient method of allocating portions of memory to processes requesting memory and the ability to release this memory when no longer needed. This management process is critical to the operation and processing speed of the computer. Without proper management of memory the computer can cause slow response times, program segmentation faults, and possible loss of data. One memory management technique is know as Virtual Memory. This technique involves the use of both software and hardware. This technique is also an integral part of modern computing. The virtual memory maps the memory addresses used by a program, known as virtual addresses, to physical addresses of computer memory. This allows for the process or task to seemingly access memory as a contiguous portion of memory. The operating system manages the virtual addresses so that the process does not need to handle this. The process just assumes its accessing physical memory. The benefit of this technique is that it frees applications from having to manage shared memory and possibly increase security because of memory isolation. “Virtual memory makes the system appear to have more memory than it actually has by sharing it between competing processes as they need it.” (Rusling, 1996-1999, Chapter 3) An important concept in memory management is the concept...

Words: 559 - Pages: 3

Premium Essay

Memory Management

...COURSE TITLE: OPERATING SYSTEM 1 COURSE CODE: CMP 307 TOPIC: MEMORY MANAGEMENT DATE SUBMITTED: 15 – 02 – 2016 LECTURER IN CHARGE: DR ADESHINA MEMORY MANAGEMENT Memory management is the functionality of an operating system which handles or manages primary memory. Memory management keeps track of each and every memory location either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status. Memory management provides protection by using two registers, a base register and a limit register. The base register holds the smallest legal physical memory address and the limit register specifies the size of the range. For example, if the base register holds 300000 and the limit register is 1209000, then the program can legally access all addresses from 300000 through 411999. Instructions and data to memory addresses can be done in following ways Compile time -- When it is known at compile time where the process will reside, compile time binding is used to generate the absolute code. Load time -- When it is not known at compile time where the process will reside in memory, then the compiler generates re-locatable code. Execution time -- If the process can be moved during its execution from one memory segment to another, then binding must be delayed to be done at run...

Words: 2862 - Pages: 12

Free Essay

Memory Management

...Memory Management Paper Gene Cotton POS/355 Terance Carlson 10/06/2014 The act of managing computer memory is known as memory management. This system is also known for allocating memory for certain programs as requested. Managing the memory properly is vital to any CPU system. If the there isn’t enough memory to run a program or application then the CPU may freeze or fail. There are two types of memory allocations systems that are commonly used Virtual Memory and Garbage Collection. Virtual Memory systems separate memory from physical addresses to distinguish between the amounts of RAM used efficiently through disk swapping. Basically the quality of the virtual manager can positively or negatively impact the overall CPU performance. The Garbage collection system is a distribution and or redistribution of the computer memory cores for a program or application. Usually this is maintained and managed at the programming level. The downside to Garbage collection is it may take up a large amount of total processing time and this also can affect the outcome of CPU performance. With memory management systems on multi-tasking operating systems the virtual memory programs must be able to be launched from different parts of the memory at any given time. So relocation is very important and is a requirement. The reason behind this is that when a program is closed or swapped back into memory it may not always be transitioned back to same place it came from. Most virtual memory...

Words: 400 - Pages: 2

Free Essay

Memory Management

...Memory Management Requirements Cynthia Thompson POS/355 July 27, 2015 E’ Forrest Boyd Memory Management Requirements. Memory management is essential to a computer system. Memory management is the location of memory for a system that helps transmit information to programs when need it. It is the center of memory organization. Including the main memory and secondary memory. Main memory being smaller and less permanent, leaving the secondary memory being larger and for long term memory. The memory management requirements are relocation, protection, sharing, logical organization, and physical organization. To begin, relocation is to remove or uninstall a program once it is established in the main memory and then reinstalling it to a different part of the main memory. These programs are usually unknown and easy to swap. Next, protection that ties in with relocation. Relocation, especially unpredictable relocations, weakens the protection by swapping programs to different areas. Protection prevents all interference whether intentional or not. The requirement of protections helps keep everything running smoothly. Enforces specific programs to run their own specific instructions and denies access if not. And before programs run, they are checked. When it comes to sharing it makes the protection be flexible. Although, sharing allows access without with out threatening the protection, making it possible. Sharing gives you the ability to work...

Words: 457 - Pages: 2

Free Essay

Memory Management Requirements

...Memory Management Requirements Main memory is an important part in a computer system because the operating system and many user applications must input into the main memory before the execution stage begins. The effectiveness of memory management affects the efficiency of the computer system. Efficient amount of memory must be obtainable to reduce the quantity of processor idle time while the computer’s devices are arranging to react. Effect memory management consists of a series of important requirements, which are relocation, protection, sharing, logical and physical organization. Relocation Once a source code is translated into an object code, there is no indication were loading of the code will occur when a program asks for it to execute. The code may even reside in a different portion of the memory every time the run is executed (Stallings, 2012). Program occasionally will switch in and out of memory and reside in different physical locations at different times. Physical addresses to the instructions and data values in programs are impossible to assign by the translator. Precise physical addresses must be located once the program code and data are loaded by the processor and operating system (Stallings, 2012). Memory management decides where instructions and data are located and relocation is a method of changing the logical address to physical address (AW-BC, 2013). Protection Once two programs occupy memory simultaneously, the programs can interfere with each other...

Words: 549 - Pages: 3

Free Essay

Memory Management Requirements

...Memory Management Requirements Effective memory management is vital for multiprogramming. The first goal of memory management is to pack in main memory as many processes as possible, and in order to meet this goal, there are five requirements a memory management system needs to satisfy. These requirements include the following: 1. Relocation In a multiprogramming system, the available main memory is shared among a number of processes. It is not possible for the programmer to know which programs will be already running in the memory while writing the code. In addition, swapping is important to move processes in and out of main memory to maximize processor utilization by providing a large pool of ready processes to execute. Once the program is swapped out to disk, it would be quite limiting to specify that when it is next swapped back in, it must be placed in the same memory region as before. Instead, we may need to relocate the process to a different area of memory. The operating system will need to know the location of process control information and the execution stack, as well as the entry point to begin execution of the program for this process. In addition, however, the processor must deal with memory references within the program. The processor hardware and the operating system software must be able to translate the memory references found in the code of the program into actual physical memory addresses, reflecting the current location of the program in the main memory...

Words: 552 - Pages: 3

Free Essay

Memory Management

...Memory Management Requirements Memory Management In this paper I will discuss the memory management requirements for Operating Systems. The memory management requirements in operating systems are relocation, sharing, protection logical organization, and physical organization. Memory Management Requirements Main memory is an important part in a computer system because the operating system and many user applications must input into the main memory before the execution stage begins. The effectiveness of memory management affects the efficiency of the computer system. Efficient amount of memory must be obtainable to reduce the quantity of processor idle time while the computer’s devices are arranging to react. Effect memory management consists of a series of important requirements, which are relocation, protection, sharing, logical and physical organization. Relocation Relocation is a basic requirement of memory management. For simplification purposes let us assume that the process image occupies a contiguous region of main memory. The operating system need to know the location of: Process control information; Execution stack; Entry point to begin the execution of a program. The ‘Processor’ must deal with memory references within the program. The ‘Branch instructions’ contain an address to reference the instruction to be executed next. Then the ‘Data reference instructions’ contain the address of the byte or word of data referenced. Sharing Any protection mechanism...

Words: 678 - Pages: 3