• Introduction to Memory Management
• Comparison of Windows NT & Linux:
Diarmuid Ryan (11363776)
• Windows Memory Management System
Songjun Lin (12251990)
• Linux Memory Management System
Windows Version (Diarmuid)
Virtual Memory/Address Space
Linux Version (Songjun Lin)
Structure of Memory Management
Virtual Memory/Address Space Paging
Introduction to Memory Management in Linux & Windows:
Memory management is important in all operating systems, ...view middle of the document...
Whether it is a page or process depends on the memory management system. Older systems did not use paging. When paging is used it is the pages that are swapped when a page fault occurs. The page that is swapped out of memory is decided by the page replacement algorithm. A page fault is when a program tries to use a page not currently in memory but on disk, when a page fault occurs it triggers swapping.
As most of these concepts have multiple implementations which are selected individually by a given operating system, thus they will be discussed in the context of Windows NT and Linux as part of describing the memory management systems for these operating systems.
The first version of Windows NT (version 3.1) was released by Microsoft on 27th July 1993 and provides the basis for most of Microsoft’s modern Operating Systems. It has been upgraded to version 6.x and remained at version 6.x since the release of Windows Vista. It has formed the basis for Microsoft Operating Systems from Windows 2000 to Windows 8.1 (version 6.3), Windows Server 2012 and even Windows Phone 8’s kernel is now NT .
Despite being released after the initial Windows NT, Windows 95, 98 and ME are not NT based, they are instead based on MS-DOS.
As with all Operating Systems, 32 bit Windows can address up to 4 gigabytes of memory and 64 bit windows can address up to 8 terabytes of memory (although on many Windows releases the limit on physical memory can be significantly lower than this ). The Windows NT Memory Manager operates with pages, basic blocks of data of which the size can be either “small” or “large”. The definition of small and large vary based on the processor architecture. Please see the chart below. Larger page sizes reduce the number of entries needed in the small cache that is the Translation Lookaside Buffer.
Windows maintains a page table for each process for the purpose of translating virtual addresses into their corresponding physical addresses, the addresses of physical pages. Virtual addresses are defined only in the context of the current process and cannot refer to that defined by another process while physical addresses refer directly to the physical location in the memory. This memory is split in two between the system and process(es). By default the system takes half of this on 32-Bit Windows (2 Gb) and the other half is allocated for use by the process. This can however be changed to restrict the system to 1 Gb and allow 3 Gb for the process in the case of memory intensive applications if the 32-Bit Windows is launched with a /3Gb switch using a system called 4-Gigabyte Tuning . On 64-Bit Windows, 32-Bit applications can have access to near 4Gb using the same system.
The Windows NT group of Operating Systems uses a dynamically allocated pagefile for overflow memory management. This pagefile is located on disk and is used for storing less frequently accessed objects allowing the RAM to be utilised by more active...