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