Differences in memory management between Windows® and Linux® Windows and Linux are two of the most commonly used operating systems to date. Windows is used more by beginners and everyday computer users, while Linux is used more by advanced users and is dubbed the hackers operating system. Both the operating systems have their advantages and their disadvantages. This paper will be differentiate the two in the operating systems memory management aspect. Windows manages their virtual memory in a tree data structure. Each node in the tree is called a virtual address descriptors (VAD). Virtual memory descriptors mark each node on the tree as free, reserved, or committed virtual memory. A process beings with all addresses free which means they can be committed to memory or be reserved for future use. Before any free address can be used it has to first be allocated as reserved or committed. Linux uses a linked list data structure which is stored in the vm_area_struct structure and defined in .
The link list data begins search whenever a page is found and records the range of address, protection mode, and the direction in which it grows. If the number of entries becomes greater than 32, Linux will convert the linked list into a tree data structure depending on the current situation. Both Windows and Linux’s memory management systems distribute the process virtual address space in a similar manner. By using paging, Windows on 32bit systems will have access up to a 4GB of standalone logical address space and physical memory. The upper part of the address space is allocated with 2GB of memory for windows kernel-mode, while the lower part is also allocated with 2GB of memory for user-mode. While Linux can also access 4GB of physical memory the difference is the upper part is allocated with 1GB of memory for kernel-mode, while the lower part is allocated with 1GB for user-mode.
An important part in any memory management system is the page replacement system. Page replacement decides which memory pages to page out when a page of memory needs to be allocated. Windows uses cluster demand paging, which pages are brought in the memory when they are needed. It will also bring one through eight pages in memory simultaneously instead of bringing them one by one. Windows paging system uses a working set concept, which is determined by amount of memory assigned in the current process. It contains pages that are in the main memory which the size of the working set will be altered accordingly. The page replacement algorithm used for Windows is, “First in, First Out algorithm (F.I.F.O)”. Linux on the other hand uses demand paging so any pages no needed will not be swapped into the memory.
Therefore, pages not being used will be avoided and not be read. It will also lessen the amount of physical memory and the time used to swap the pages. Linux also uses valid and non-valid bits to identify between pages that are in memory and disk. The page replacement algorithm used for Linux is, “Least Recently Used algorithm (L.R.U)”. While both Windows and Linux have their advantages and disadvantages in the operating system. They both have complex memory management systems which fulfills the users need when choosing an OS. With time we can only imagine the complexity of the future memory management systems in both Windows and Linux.
Felixbytow. (2012, July 08). FAQ/LinkedLists. Retrieved from KernelNewbies:
Kath, R. (1993, January 20). Managing Virtual Memory. Retrieved from Microsoft:
Rparrett. (2012, 08 22). About Memory Management. Retrieved from Windows:
Rusling, D. A. (1996-1999). Memory Management. Retrieved from TLDP: