Basic Memory Management Without Swapping Computer Science Essay

Program execution is the main propose of computer system .During execution programs are together with the data they access with in main memory. To keep track of what memory is in use and what memory is free is called memory management. Allocate the free memory to the process when any process needed the free space and de-allocates it when they don’t need the free space.

Ideally, programmers want memory that is

Fast

Large

Nonvolatile

There are two classes of memory management systems, those that transfer processes to and from disk during execution are the swapping or paging .And those that don’t are the simple and might find this scheme in embedded device, phone, smart card, or PDA.

Basic Memory Management without Swapping or Paging

There are three simple ways of organizing memory, operating system with one user process.

How to divide memory

Two approaches are one divide the memory into fix equal partitions and the other is partition size can be loaded into any other partition.

Equal-sized partitions

Any unused space in the partition is wasted called internal fragmentation. And process which is larger than partition cannot be run.

Fixed size partitions

In fixed partition processes are in queues that are fits in it, but some partitions may be idle because jobs are available in small partitions and only the large partition free.

Memory management in Operating systems

Linux Memory Management:

There are two main component of Linux memory management.

The first one component is to assign and freeing the space, after using the physical memory.

Read also  Concepts And Technology Of Data Etl Computer Science Essay

The second component deals with virtual memory.

Physical memory management

Linux divide its physical memory into three different parts because it has different hardware characteristics. These three parts are the following:

Zone DMA

Zone NORMAL

Zone HIGHMEM.

Page allocator is the primary physical memory manger in Linux. For every zone separate allocator is exist which allocate and freeing the space for the zone. The allocator uses the Buddy system to keep all records about physical pages which is available at the time in memory.

Memory splitting into Buddy system

Virtual memory management

There are many types of virtual memory regions in Linux. Backing store for the region is the first property of this memory. Which describe the pages region that from where it is to come. Mostly region is back by nothing which represents the demand-zero memory.

Windows Memory Management:

The window provide many ways to the application for using memory like virtual memory, heaps, memory mapped files and thread local storage.

Virtual memory

VirtualAlloc() is the method which is used to allocate the virtual memory and virtualFree() method is use to de-allocate the space into virtual memory. The virtual address in which the memory is allocated through these functions applications are enable.

They operate on multiple pages which are in memory and the starting address must be greater than 0*10000.

Heaps

Applications used the memory space also through heap. In this environment address space is already reserve. When API process is start (also called initialized) it creates the 1-MB default heap.

Read also  Black Box And White Box Comparison Computer Science Essay

Memory mapping Files

The third way of using the memory space is the memory mapping files. Through this way two processes can share the memory space .In virtual memory two files share the same file.

Thread Local storage

Thread local storage is another way for applications to using memory space. For using memory space this provide two methods. This is given below:

Dynamic method

Static method[1]

Memory management in windows and Linux

Windows

Process:

A process is an EXE file in windows when a program is running it is a process. In windows there is several processes can also work at a time but by implementing memory management system. Process manager share its memory resources to each process that’s way multiple processes can also be start at a time in windows.

2.Segments registers in WIN32:

Segments registers are implemented in win32 while debugging.

a)CS

b)DS

c)SS

in 32 bit mode segment registers are also implemented in Intel microprocessors. Virtual memory base address and blocks are described in descriptive table. These segments can be read only and sometime read/write. Segments can be in 4GB. There are two segments

1)code

2)data

3.Memory-Mapped Files

In case if you think you have less memory for your memory management

Windows provide memory management mapped files.

4.physical memory

Physical memory is most important resource of a computer system. Windows memory manger is responsible to populate memory of system

Shared among processes if desired.

[2]

Linux

1.Virtual memory management system

Linux use virtual memory management system. The bit of the processor that perform this transaction is the memory management unit

Read also  Devoted For Multi Vendor Network

2.Large Address Spaces

Physical memory is always less then virtual memory always in the system; The operating system makes the system appear if it has a large memory than it actually has.

3.Protection

in system every process has its own virtual address space. The processes that are running at a time cannot effect to virtual address Also allow memory against writing is always protected by , the hardware virtual memory mechanisms This protects code and data from being overwritten by rogue applications.

4.Fair Physical Memory Allocation

Exact and fare share policy of the physical memory in the system is done by memory subsystem management

5.Shared Virtual Memory

Separate address space is allow to each process by the shared virtual memory. if there are several processes are running at a time in a system then it will fairly allocate virtual memory to them

6.Memory Mapping

Image and data files are mapped by the memory mapping in the system address space. every process create link to the virtual address space for a process

[3]

Order Now

Order Now

Type of Paper
Subject
Deadline
Number of Pages
(275 words)