Comparison of Memory Management Systems of Bsd, Windows, and Linux

Only available on StudyMode
  • Topic: Virtual memory, Paging, Memory management
  • Pages : 14 (4548 words )
  • Download(s) : 401
  • Published : November 1, 2011
Open Document
Text Preview
Comparison of Memory Management Systems of BSD, Windows, and Linux Gaurang Khetan Graduate Student, Department of Computer Science, University of Southern California, Los Angeles, CA. December 16, 2002

This paper is a study of memory management systems of an operating system. We begin with a brief introduction to memory management systems and then we compare the memory management systems of reallife operating systems - BSD4.4, Windows 2000 and Linux 2.4



based on it. Moreover, it is very well documented in [12]. Windows 2000 was chosen since it is a very popular operating system for use as a desktop especially with beginners, and has now evolved into a mature operating system. Linux [4] 2.4 was chosen because it is growing more and more popular by the day, and seems to have an important place in the future. We will not be much interested in the performance characteristics of these systems in this paper, instead our focus will be on their design and architecture.

In this paper, we will be comparing the Memory Management (MM) Sub-Systems of these operating systems - BSD 4.4, Linux 2.4 and Windows 2000. BSD 4.4 was chosen since it is a representative Unix version including important operating system design principles, and today many operating systems like FreeBSD [3], NetBSD [5] and OpenBSD [6] are 1


Memory Management Systems

The Memory Management System is one of the important core parts of an operating system. Its basic function is to manage the memory hierarchy of RAM and hard disks available on a machine. Its important tasks include allocation and deallocation of memory

to processes taking care of logistics,and implementation of Virtual Memory by utilizing hard disk as extra RAM. The Memory system should be optimized as far as possible, since its performance greatly affects the overall performance and speed of the system.

2.1 Virtual Memory
An important concept in the context of MM Systems is Virtual Memory. Back in the early days of computing, researchers sensed the ever growing memory requirements of application programs, so the idea of Virtual Memory was born. The idea is to provide an application program the illusion of the presence of a very large amount of memory available for its use. The kernel will provide such a facility by making use of secondary storage - the hard disk - to fulfill the extra space requirements. [13] For the virtual memory system to work, we require some mapping function which will perform address translation, converting the virtual address to the physical address. The virtual address is the address which the application uses to refer to a memory location, and the physical address is the actual memory location passed out to the local memory bus. This function is generally one of Paging, or Segmentation, or both - depending on the kernel, processor architecture and its state.

Figure 1: Page table

2.2 Paging
In Paging, the address space (both virtual and real) is divided into fixed-sized (though they can be multiplesized [14]) pages. The pages can be individually manipulated, and placed at different places in the physical memory and the hard disk. The address translation is actually done by the Memory Management Unit (MMU) of the processor by the use of a Page 2

Table, as shown in Figure 1. Page tables specify the mapping between virtual pages and physical pages i.e. which virtual memory page currently occupies which physical page. The MMU converts the virtual memory address to a physical address which consists of a page frame number and an offset within that page. Protection can be applied on an page by page basis. Since the virtual address space is huge compared to the physical memory, we must use the hard disk to store pages which cannot be stored in the physical memory. Associated with each virtual page in the page table is a bit to denote whether the page is present in the physical memory or not. If the page is...
tracking img