wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Memory management

profile
Riya Singh
Aug 15, 2024
0 Likes
0 Discussions
112 Reads

The term memory can be defined as a collection of data in a specific format .The CPU fetches instructions from memory according to the value of the program counter and executes them .

To achieve a degree of multiprogramming and proper utilisation of memory, memory management is important.

Main memory is a repository of rapidly available information shared by the CPU and I/O devices. Main memory is also known as RAM (Random Access Memory).In a multiprogramming computer, the Operating System resides in a part of memory, and the rest is used by multiple processes. The task of subdividing the memory among different processes is called Memory Management. Memory management is a method in the operating system to manage operations between main memory and disk during process execution. The main aim of memory management is to achieve efficient utilization of memory.  

Why is Memory Management Required?

Allocate and de-allocate memory before and after process execution.

To keep track of used memory space by processes.

To minimize fragmentation issues.

To proper utilization of main memory.

To maintain data integrity while executing the process.

Static and Dynamic Loading

Loading a process into the main memory is done by a loader. There are two different types of loading :


Static Loading: Static Loading is basically loading the entire program into a fixed address. It requires more memory space.

Dynamic Loading: The entire program and all data of a process must be in physical memory for the process to execute. So, the size of a process is limited to the size of

physical memory.

To gain proper memory utilization, dynamic loading is used. In

dynamic loading

, a routine is not loaded until it is called. All routines are residing on disk in a

relocatable

load format. One of the advantages of dynamic loading is that the unused

routine

is never loaded. This loading is useful when a large amount of code is needed to handle it efficiently.

Static and Dynamic Linking

To perform a linking task a linker is used. A linker is a program that takes one or more object files generated by a compiler and combines them into a single executable file. 


Static Linking: In static linking, the linker combines all necessary program modules into a single executable program. So there is no runtime dependency. Some operating systems support only static linking, in which system language libraries are treated like any other object module.

Dynamic Linking: The basic concept of dynamic linking is similar to dynamic loading. In

dynamic linking, “Stub” is included for each appropriate library routine reference. A stub is a small piece of code. When the stub is executed, it checks whether the needed routine is already in memory or not. If not available then the program loads the routine into memory.



Comments ()


Sign in

Read Next

Modern OS

Blog banner

Deadlock and starvation in operating system

Blog banner

Uber

Blog banner

Threads Concurrency: Mutual Exclusion and Synchronization

Blog banner

E-Cash (Electronic Cash)

Blog banner

Full Disk Encryption on Digital Forensics

Blog banner

MULTITHREADING:ENHANCEING PERFORMANCE AND EFFICIENCY IN COMPUTING

Blog banner

How International Schools Build Global-Minded Students through Curriculum & Activities

Blog banner

APACHE KAFKA

Blog banner

Top 5 Tech Innovations of 2018

Blog banner

Cyber Forensics on IOT Devices

Blog banner

Memory input output management

Blog banner

To travel is to live

Blog banner

How to lose belly fat

Blog banner

Data Science & AI

Blog banner

Throttle engine ’Sneak peek into the future’

Blog banner

Zero Trust Security Model: Revolutionizing Cybersecurity in the Digital Age

Blog banner

Veg Mix Pickle

Blog banner

FIREWALL

Blog banner

MailChimp

Blog banner

File and File System Structure

Blog banner

Odoo

Blog banner

The Truth Behind Viral DIY Dental Hacks

Blog banner

Direct Memory Access

Blog banner

Synchronization

Blog banner

Blog on health and fitness

Blog banner

Street foods

Blog banner

ADD A SPICE TO YOUR LIFE.

Blog banner

Starvation

Blog banner

Different types of scam frauds

Blog banner

differentiate thinking humanly and rationally

Blog banner

The Khan mehtab transforming the modular switches

Blog banner

RAID_142

Blog banner

A Brief Review on Cyber Forensics and its Analysis Tool

Blog banner

Deadlock

Blog banner

Everything You Need for a Perfect Stay in Arcadia, Florida, USA.

Blog banner

Os(Computer security threats)

Blog banner

Blockchain uses and use cases

Blog banner

OS PROCESS DESCRIPTION AND CONTROL-SARVAGYA JALAN

Blog banner

Modern Operating System - Khush Bagaria

Blog banner

semaphores

Blog banner

Blog name

Blog banner