Disclaimer: This essay is provided as an example of work produced by students studying towards a computer science degree, it is not illustrative of the work produced by our in-house experts. Click here for sample essays written by our professional writers.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.

Basic Memory Management Without Swapping Computer Science Essay

Paper Type: Free Essay Subject: Computer Science
Wordcount: 1068 words Published: 1st Jan 2015

Reference this

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.

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.

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

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]

 

Cite This Work

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Related Services

View all

DMCA / Removal Request

If you are the original writer of this essay and no longer wish to have your work published on UKEssays.com then please:

Related Services

Our academic writing and marking services can help you!

Prices from

£124

Approximate costs for:

  • Undergraduate 2:2
  • 1000 words
  • 7 day delivery

Order an Essay

Related Lectures

Study for free with our range of university lecture notes!

Academic Knowledge Logo

Freelance Writing Jobs

Looking for a flexible role?
Do you have a 2:1 degree or higher?

Apply Today!