Operating System Memory Management

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Page |1

OPERATING SYSTEM MEMORY MANAGEMENT

Students name:

Institution Affiliation:

Course:

Professors name:

Date of Submission:
Page |2

INTRODUCTION
An important part of Memory Management is the allocation of memory blocks to various

operating processes in order to improve overall system performance. Memory locations can

be tracked using this technique no matter if they are assigned to a process or are free.

Memory allocation is determined by this method. It also maintains track of the total amount

of memory that can be allotted to a single application. If some memory is freed or

unallocated, it updates the status suitably because it keeps track of everything.

Management of a system's primary memory is called memory management. It guarantees that

the operating system (OS), programs, and other running processes have the memory they

need to carry out their tasks by managing and allocating blocks of memory space. Memory

management is an important aspect of this process because it accounts for the physical

memory device's capacity restrictions, redistributing unused memory or creating virtual

memory to make up the difference. The goal of memory management is to ensure that the

CPU can quickly and easily retrieve the instructions and data it needs to carry out the

different tasks at hand.

Three layers of management are involved in memory management: hardware, operating

system, and application/program At each level, the various management tools work together

to ensure that the memory is available and efficient.

Memory Management-Hardware Management

Hardware-based memory management. RAM chips and CPU memory caches are two of the

most important physical components in terms of memory management at the hardware level

(L1, L2 and L3). In terms of physical management, the memory management unit (MMU) is

mostly in charge of the processor's memory and caching functions. Translating logical

addresses into physical addresses is one of the MMU's most critical functions. As a general
Page |3

rule, the MMU is built into the CPU, although it may also be deployed as a separate

integrated circuit.

Memory management-Operating System

Memory must be allotted to user applications in the operating system and reused by other

programs when no longer necessary. Both aspects of virtual memory systems allow the

operating system to pretend that the computer has more memory than it really has and that

each application has the machine's memory to itself.

Specific memory blocks are allocated (and constantly redistributed) to particular processes at

the OS level when the demands for CPU resources fluctuate. The OS transfers processes

between memory and storage devices (hard disk or SSD) on a constant basis to accommodate

the allocation process, keeping track of each memory location and its allocation state.

Process memory allocation is managed by the operating system, which also controls which

processes get memory resources and at what time. To accommodate additional processes, an

operating system may make use of swapping. Using swapping, the OS momentarily removes

a running process from main memory and places it in secondary storage, freeing up memory

for use by other running processes. When the moment is right, the operating system will put

the original process back into memory.

The operating system is also responsible for managing operations when the computer's

physical memory runs out. This is when virtual memory, a form of pseudo-memory that's

allocated from a storage device set up to mimic the computer's main memory, is used. It's

possible for the operating system to allocate virtual memory to a process as it would allot

physical memory in the event that memory demand is greater than physical memory capacity.

Because secondary storage is slower than a computer's main memory, the usage of virtual

memory may have an influence on program performance.


Page |4

Memory management-Application management

A program's objects and data structures need to be stored in a finite amount of memory, and

that memory has to be recycled when it is no longer needed. There must be code to deal with

the fluctuating memory requirements of application programs, which cannot foresee their

needs in general.

Instead of being managed centrally by the OS or MMU, memory management at this level is

implemented and controlled by the program itself. This form of memory management

guarantees that the program's objects and data structures have enough room to operate.

Combining two related jobs is how it does this.

Allocation. For every object or data structure requested by the application, the memory

allocated to that component must be explicitly released. Automated or manual, the allocation

procedure may be used. If the allocation is done manually, the developer must write the code

to do it. There are two types of memory allocators: those that allocate memory automatically,

and those that are manually assigned to an object by a memory manager. Depending on the

programming language, a memory manager may be built-in or accessible as a separate

language module.

Recycling. Object and data structure memory is freed for reassignment when a program no

longer requires the space it had been allotted for them. The memory management may do

garbage collection automatically or the programmer can perform it manually.

Problems and Solutions of memory management

When it comes to memory management, the most difficult part is deciding which data should

be kept and which should be discarded in order to maximize the amount of memory that may

be reused. This may seem like a simple topic, but it's actually rather complex, requiring a

separate area of research. Programmers in a perfect world wouldn't have to be concerned


Page |5

about memory management problems at all. Poor memory management practices can have a

negative impact on the performance and reliability of applications, both in manual and

automatic memory management.

Among the most common issues are:

Freebies and dangling hints are the main culprits here.

In many cases, programs give up memory, but then try to retrieve it later and crash or act in

an unpredictable way. Known as a hanging pointer, this is a circumstance when the memory

is prematurely freed. Manual memory management is where you'll often see this.

Leakage of data

Some programs repeatedly allocate memory and finally run out of it because they never give

it up. Memory leaks are the cause of this problem.

External splintering

Despite having plenty of free memory, a faulty allocator might fail miserably in allocating

blocks of memory for both giving out and receiving. Free memory can be fragmented into

numerous smaller blocks, each separated by previously used blocks. External fragmentation

is the medical term for this ailment.

a bad reference point

Modern hardware and operating system memory managers have a problem with the layout of

allocated blocks, because memory accesses to nearby memory locations are faster when they

are made sequentially. The performance of a program will suffer if the memory management

separates the blocks it will utilize together. Poor location of reference is the medical term for

this situation.
Page |6

Unyielding construction

This can cause severe performance issues if memory managers are designed for one use but

are used in a different manner. In most memory management solutions, assumptions are

made about how a program will use memory, such as typical block sizes, reference patterns,

or object lifetimes, which leads to these kinds of issues. If any of these assumptions prove to

be incorrect, the memory manager may have to spend more time keeping track of what's

going on.

Complexity of the interface -Memory management must be considered in the interface design

if objects are passed between modules. It is easier to write debugging tools if the memory

manager is well-designed. In addition to displaying and navigating, these tools can also

validate and detect anomalous accumulations of various object types and block sizes.

For my inclination I would lean toward a working framework that isn't complicated and

Windows is the best o.s on my pc.I have recorded why it is awesome and its highlights.

Windows is the most well known and recognizable working framework on my rundown.

From Windows 95, the whole way to the Windows 10, it has been the go-to working

programming that is energizing the processing frameworks around the world.

It is easy to understand, and fires up and resumes activities quick. The most recent variants

have more inherent security to guard you and your information.

Highlights

 A vigorous User Interface which helps in simpler route, with a beginning menu on the

left side by drilling down choices and addressing applications.

 The Task View include allows the clients to switch between different work areas on

the double, by showing every one of the open Windows.


Page |7

 Two separate UIs, one for mouse and console, and the 'Tablet Mode' intended for

touchscreens.

 Multifaceted validation innovation for higher security like BIN, PIN, Fingerprint

acknowledgment, and so on.

 Consequently, pack framework records to lessen the capacity impression.

Decision: The Windows programming is just best in view of how it has developed with time.

Its security framework is cutting edge, its UI permits advantageous utilization regardless of

the gadget that you are utilizing it on. The main thing that will squeeze some is its cost.

REFERENCES

“1. Overview — Memory Management Reference 4.0 Documentation.”

Www.memorymanagement.org, www.memorymanagement.org/mmref/begin.html.

Breecher, Jerry. OPERATING SYSTEMS MEMORY MANAGEMENT.

“Memory Management in OS: Contiguous, Swapping, Fragmentation.” Www.guru99.com,

www.guru99.com/os-memory-management.html.

Tutorials Point. “Operating System - Memory Management - Tutorialspoint.” Tutorialspoint.com,

2019, www.tutorialspoint.com/operating_system/os_memory_management.htm.

“What Is Memory Management in a Computer Environment?” WhatIs.com,

www.techtarget.com/whatis/definition/memory-management#:~:text=Memory

%20management%20at%20the%20hardware. Accessed 6 July 2022.

You might also like