Login with Facebook

Memory Management in an Operating System

RAM is a fairly valuable resource, which must be managed according to certain principles. There are different management concepts, which lead to different techniques, with their pros and cons.

The management of main memory (RAM, primary, or as we call it) is one of the most important aspects of the operating systems. Like all computer resources, RAM must also be managed according to the usual principles of fairness and performance.

In particular, memory management must:

· Being economic (low overhead).

· Maximize its use.

A little better, you don't have to waste CPU time putting and taking stuff out of the primary memory, and you have to use all the available space efficiently.

Memory Management Requirements

To ensure efficiency and ease of management, data protection, and a minimum of code portability, we need these requirements.

Protection and Sharing

Generally, we don't want a process to access memory areas of other processes. Imagine having a password manager running: in RAM, you certainly have your credentials in the clear. we are sure you wouldn't like any process to access that piece of memory and read your credentials.

At the same time, however, we also ensure that some memory zones are shared between processes.

Imagine you have a large 500 kB library, which is used by 20 processes: instead of having the library copied in each of the 20 processes (for which 500 * 20 kB = 10 MB), we leave it shared and saved at least 10 MB.


This is a nice concept. let's see what it means.

We know that:

  • The size of the RAM is not the same for each device.
  • The operating system decides where to allocate in memory.
  • A process can be taken out of memory, and put back later (swapping).

 A process must be able to execute its instructions without thinking about where they actually are in RAM. This is the essence of relocation, making the process independent of its memory position. The information is stored in two specialized registers, called the base register and the bounds register, respectively.

In practice, the relocation is implemented by introducing relative addresses, also called logical ones. The process uses these relative addresses, which are then translated by the operating system into real physical addresses. To finish this concept, let's talk about the two types of relocation.


Static Relocation

It is basic and not good. In this phase, all the logical addresses are translated into physical and calculating them starting from the initial one.

· Pros: none.

· Cons: the process is not swappable -> the memory cannot be reorganized.

Dynamic Relocation

It is good and modern technique. We can translate the addresses at runtime.

· Pros: we can relocate the process around the RAM -> we can reorganize the memory

· Cons: none.

Memory Organization

We must distinguish between physical and logical.

· Physically, in memory, we implement overlaying, or we can allocate different modules/processes in the same memory zone, but at different times. Furthermore, the management is done transparently to the user/programmer.

· Logically, we see memory in a linear fashion, with permissions for each module/process.

Memory Management 

The primary memory is a linear space in which the operating system allocates and de-allocates the memory. These two operations seem very trivial in words, but in reality, they are a big problem.

Over the years, several ideas have been introduced to make these operations possible. Modern operating systems use techniques called segmentation and paging (also used together), which allow the main memory to be used efficiently and without waste.


Memory Partitioning

The basic idea of ​​this cave technique was to divide the RAM into blocks of a certain length, called partitions.

The main features were:

· A program in each partition

· No partitioning programs.

We have three types of partitioning:

· Fixed.

· Variable (fixed with variable size).

· Dynamic.

Fixed Partitioning

The idea was to have fixed-length partitions.

This technique required not just hardware support: in fact, it is used to put more than one processes in the main memory. 

It is also quite intuitive to understand the limitations:

· Limited number of processes loaded simultaneously into memory.

· Maximum size of processes given by the size of the partitions.

Furthermore, here we introduce a problem called internal fragmentation.

Variable Partitioning

Some intelligent people realized that there was a fairly intuitive way to reduce internal fragmentation. If we have internal fragmentation, it means we have smaller partition programs.

 Then, if we had partitions with different lengths, we could allocate the programs in the most similar partitions.

Dynamic Partitioning

· No need for memory already partitioned.

· ** Partitions created ad-hoc ** at runtime.

·No internal fragmentation.

·Goodbye process limits.

· Now the maximum size of the process coincides with the size of the RAM.


In fact, there are different algorithms to decide where to allocate new process. They are given below:


· Process allocated in the smallest space that can contain it (the best, by definition).

· High overhead, because finding this space takes time.

· In the long term it brings us more external fragmentation.


· Process allocated in the first free space from the beginning of the memory.

· Low overhead.

· In the long term it tends to crowd the initial part of the RAM.


· Like the first-fit, but starting from the last allocated position (idea derived from the principle of locality).

· Low overhead.

· In the long term, it tends to crowd the final part of the RAM.

Buddy System

This technique is a bit more complex than the previous ones, and the basic idea is to divide the memory into blocks called buddies and allocate the process to use if it respects a specific condition.


Memory Paging

If you like comparisons, we can say that this technique uses some principles of fixed partitioning, but in a modern way.

 Yes, maybe this description is better suited for reviewing a music album, but it's not wrong. Let's see why.

With pagination, both memory and processes are divided into ** small blocks of fixed size ** (typically 512 kB).

We introduce terminology on the fly:

· Pieces of memory: pages.

· Process pieces: frame.

Memory Segmentation

This other system is instead heir to dynamic partitioning.

In fact, each process is divided into segments of variable length.

 For each process, we have a segment table, which maps the pair to the corresponding physical address.

Segmentation allows us to see memory as an address space. There is a problem though: the segments may not be contiguous. in this case, the address space is not contiguous but fragmented. This makes things a little uncomfortable and not very elegant. 


Segmentation on Pagination (or Paged Segmentation)

This method combines segmentation and paging. In practice, we use segmentation to address pages. In this way, we succeed in abstracting the discontinuity of the segments, making the program believe that it has a contiguous address space. Segments and pages remain discontinuous in memoryMemory Management, but we use a system to - in fact - abstract the address space.

Author: Vicki Lezama

Need a custom

We will write it for you.
Order now

Free Essay Examples

Free essays:

All you need to know about Neuroendocrinology
All you need to know about Big data management
All you need to know about digital special effects
All you need to know Technical Writing?
Basics the Game Theory in Cryptoeconomics
Business innovation ideas for making money
Biosensors for cancer diagnosis
Business Analysis: Pricing strategies and Demand Curve
Cognitive Computing- How does Cognitive Computing work?
Consciousness: characteristics and peculiarities
Conservation Economics
Cybersecurity in business: challenges, risks, and practices
Demographic trends and how they affect Economic Growth
Dance as an art form and entertainment
Discrimination Economics
Determinants of Wages
Everything you need to know about short-term memory
Economic and Policy Impacts of Demographics
Ethics: an essay on the understanding of evil
Emotions: what are they? Theories explained
Factors of Demographic Data Collection
Factors Affecting Purchasing Behavior
Financial Statement Analysis
Factors Influencing Interest and Exchange Rates
Government's Intervention in The Labor Market
Guide on the Pathways of the nervous system
Game theory in microeconomics
Globalization: definition, causes, social impact and risks
How Relativism Promotes Pluralism and Tolerance
How to use the audience’s feedback to write a news report
History of silent cinema
How news report can be strengthened through multimedia
Introduction to Population Problems
Imperfect Information and Asymmetric Information
Imperfect Information in Insurance
Introduction to Labor Markets
Journalism: What is News?
Journalism: Broadcast media and Television Presenters
Journalism: Sources of News
Journalism and Law
Key Determinants of National Income
Key Factors That Affect Pricing Decisions
Kinetic models in biology and Related fields
Know about the different forms of traditional African dances
Latest technology trends
Latest dance trends
Magnetoencephalography (MEG)
Microeconomic Analysis to the Demand for Labor
Neuromuscular disorders
National Economies, Fluctuation, and Responses to Fluctuations
Neurotransmitters: what they are and different types
Nanomedicines to target tumors
Objections to utilitarianism
Organizational motivation and its effects
Overcoming Hiring Challenges for Nonprofit Organization
Population Demographics
Recurrent neural networks (RNN) for speech detection
Russian School of Mathematics
Research and Development
Risk Sharing in Insurance and Asset Markets
Stochastic optimization methods in deep learning?
Structure of the nervous system
Structure of a Corporation
Schizoaffective disorder: how to live better with it
The climate change denial
The techniques of basic cinematography
The Endosymbiotic Theory
The Role of Internal Audit in Corporate Risk Management
Utilitarianism Vs. Kantianism
Understanding Auctions and Auction Theory: Part 2
Various theoretical perspectives of sociology
Virtual reality, what it is and how it works
What are the linear models in machine learning?
What is Convolutional Neural Network
4 Facts about Origin of Mathematics!
5 techniques to create an animation
10 emerging technologies according to World Economic Forum
10 strategies to maximize corporate profits
3d Model Of Building
6 Medical Technologies that revolutionized the healthcare in 2020
All you need to know about the ACA Code of ethics
Architecture and Democracy: An Introduction
Architecture and Democracy: Democratic Values
Architecture and Democracy: Democratic Procedures
All You Need to Know About a Synthesis Essay
An essential guide to understanding Film Theory
Application of Artificial Intelligence in Cyber Security
Applications of electrical engineering
Augmented reality: what it is, how it works, examples
Advantages And Disadvantages Of Social Networking
All you need to know about Cryptography
Applications of astrophysical science
All you need to know about architecture engineering
Applications of geological engineering
Artificial intelligence and medicine: an increasingly close relationship
An insight into Computational Biology
ACA code of conduct
A Rose for Emily
Applications of Mathematics in daily life
Architecture mistakes to avoid
All you need to know about Toxicology
All you need to know about Holistic Medicine
All you need to know about linguistics
An introduction to Linguistics and its subfields
All you need to know about Anxiety disorder
All you need to know about Drones
A Brief Insight into Political Science
Assumptions related to feminism
All you need to know about Byzantine emperors
All you need to know about labour economics
An insight into xenobots -the first-ever robots
An ultimate guide about Biomaterials
A Comprehensive Introduction to the Mona Lisa
Analysis methods of Transport through biological membranes
An ultimate guide about biochemical reactions
Analysis of brain signals
Artificial Gene Synthesis
Application to synthetic biology of CAD methods
All you need to know about metabolic pathways
Applications of BIOMEMS
All you need to know about the epidemiology
Asian vs. western leadership styles
All you need to know about Smart prosthesis
Analysis of Economy: Output of Goods and Services (GNP), and GDP on Economic success
A Guide to Pricing Strategies
An Overview Of Economic Studies
Analysis of Fiscal and Monetary Policies
Analysis of Business Cycles
Analysis of Consumption and Investment
A Look into Regression Analysis
Analysis of Household's Consumption and Savings Behavior
All you need to know about Capital Budgeting
All you need to know about risk management
Art looted in wartime.
Appropriate use of Data in Economics
All you need to know about reaction kinetics?
A historical overview of Financial Crises
All you need to know about management discipline?
An insight into the error-correction models
All you need to know about Data visualization
All you need to know about Work-family balance
All you need to know Technical Writing?
All you need to know about digital special effects
All you need to know about Big data management
All you need to know about Neuroendocrinology
How to Write a Personal Essay
Housing Needs in America
How to Write a Description Essay
How to Create an Excellent Scholarship Essay?
How to write a cause and effect essay
How to Hire the Best Essay Writing Service Provider?
How to Write a College Application Essay?
How to get the most out of your English lectures
How to write Expository Essay
How to succeed in your psychology class?
How to Write an Academic Essay in the Shortest Time?
History of Journalism
How Different Sectors are Using Artificial intelligence (AI)
How to write an informative essay
How to deliver persuasive essays?
How to Give a Convincing Presentation
How to write an essay on leadership?
Historical Art Still Around Today
Humanoid robot: what it is, how it works and price
History of Chemistry
Healthcare Advanced Computer Power: Robotics, Medical Imaging, and More
Healthcare AI: Game Changers for Medical Decision-Making and Remote Patient Monitoring
How to understand different types of English
How to Cope with Chronic Pain
How African American choreographers and dancers have influenced American dance
How mobile robot can do in logistics or in production
How To Become a Successful Entrepreneur
History of the Philosophy of Feminism
How is the climate changing?
How to Track Your Content Marketing ROI
How to Gun control In the USA?
Historical and contemporary role of labour in the modern world
How breast cancers are classified?
How the cells of our body communicate?
How the Lymphatic System Works?
How Digestive System Works
How to complete your capstone projects effectively?
How to write a research project
Healthcare technologies that help patients with better self-management
How to choose the topic of the senior capstone project
How to make your business survive at economic crisis
How can immigrants blend in the American society?
How does the economics of war affect society?
Hate speech on social media.
How to Build an Economic Model
How to start a healthcare startup?
How can financial illiteracy harm you?
How cancer is developed - Cancer biology
How to define the Enterprise Value
How to conduct economic research?
How women can manage sexual harassment
How to use quotes in your news reports?
How news report can be strengthened through multimedia
History of silent cinema
How to use the audience’s feedback to write a news report
How Relativism Promotes Pluralism and Tolerance
Introduction to Urban Studies
Importance of dance in education
InMoov: how to build an open source humanoid robot
Importance of KYC verification to making the Blockchain secure
Importance of Rhythm
Importance of dance student evaluation
I/O control methods -types and explanations
Identity theft: what to do?
Introduction to Utilitarianism
Importance of 3d Modelling in Architecture
Importance of online journalism
Image processing in medical diagnosis
Introduction to USA Politics
Introduction to Comparative Politics
International Relations as a Major in Political Science
Importance of modern trade policy
Introduction to Journalism
Introduction to Writing a TV Script
Introduction of Microfabrication techniques
Introduction to Microeconomics
Interaction of Consumer and Firm Choices in Markets
Importance of corporate sustainability
Issues in International Monetary Macroeconomics
Introduction to Statistics and Data for Economics
Introduction to Data and Probability for Economics
Introduction to the Game Theory
Introduction to Econometrics
Introduction to Economic Information
Introduction to Market Equilibrium
Introduction to Economic Models and Application
Introduction to Empirical Research
Introduction to Econometric Data
Importance of Critical Thinking, Principles, and Goals
Introduction to Identification and Causal inferences
Introduction to Econometric Application
Intermediaries and Government in Financial Crisis
Importance and seven principles of quality management
Illiteracy in the USA
Introduction to Economics of Law
Introduction to Coase Theorem
Introduction to Social Choice and Incarceration
Intellectual Property and Product Liability
Investment in Human Capital
Introduction to Labor Markets
Imperfect Information in Insurance
Imperfect Information and Asymmetric Information
Introduction to Population Problems
The Looming Energy Crisis in America
Top benefits of performance-based engineering
The More Languages You Know, The More Times You Are a Man
Things to consider while writing an Argumentative Essay
Top Ways to Improve Your Academic Writing Skills
Tips to Excel in Creative Writing
The origins of films in the early 19th century
Top career options in Architecture
The Elevator Pitch
Top finance trends 2020
The basic Structure and functionality of robots
The Way to Success
The election system of the President in the United States of America
Two-party System in United States of America
Top trends in urban design
The history and theory of African American filmmaking
Top benefits of creative writing
Tinnitus Guide: Common Symptoms and Treatment Options
The language of dance
The digital image processing management
Top famous politicians of the World
Top methods of political science!
The history of the feminist movement
The blood flow in cardiovascular system - Biofluid Mechanics
The best of Leonardo Da Vinci
The Structure and Function of Macromolecules
The structure of cell: a research on the bricks of the human body!
Tissue and organ construction: Adhesion and recognition between cells
The kinetics of the transformation processes
The Modeling of Biological Systems
Tips for writing a great thesis statement
The Defense mechanisms against infections
The impact of the technological innovations in medicine
Top journalism trends to know about
The relation between mass media & politics
Theranostics: Diagnosis and Care through Nanoparticles
The practical Applications of X-rays
The applications of Ultrasound in medicine
Transfer mechanisms of genetic information in Bacteria
The regulation of cellular metabolism in the diagnosis
The Principles of MRI Contrast agents
The technical basis of optical coherence imaging
The New Media: Emerging Trends
The Structure of Interest Rates and the Yield Curve
Technological perspectives and reflections of neural engineering
Types of bioreactors and their applications
The Role of Government Policy in Improving Economic Outcomes
Types of corporate responsibility
The Role of IMF in International Monetary Macroeconomics
Tools for investment decision making
The concept of Organizational Culture and its applications
The Conduct of Monetary and Fiscal Policy
The Basics of Financial Accelerator Models
Tips for labeling medical devices- Medical Entrepreneurship
The different medical imaging techniques
The Economics of Uncertainty – Introduction
Theories of Public Policy
The Game Theory in Social Media
The political theory of Thomas Hobbes
The Use of Law on Economics and Vice Versa
The Role of Internal Audit in Corporate Risk Management
The Endosymbiotic Theory
The techniques of basic cinematography
The climate change denial
What is a Definition Essay?
What are diagnostic essays?
What is the relation between art structural engineering?
What is a Narrative Essay
What are robotics and intelligence systems?
What are the benefits of studying health sciences?
What is artificial intelligence and why it matters?
What is comparative Literature?
Why study neuroscience
What is Wi-Fi and how does it works
What is French history famous for?
What are Humanistic Studies?
What is covered in Biophysics?
What is modern journalism?
What is Virtualization? Benefits & Applications
What are modern public relations?
What is plasma physics?
What is teacher preparation?
What is rapid prototyping for 3D printing?
What is contemporary European Politics?
Why should you learn American Ballet?
What is engineering physics?
What is the purpose of African American Literature?
Ways to learn the Rhythm
What is digital art used for?
What are Enzymes and how do they work
Who is the father of political science?
Why Study Political Science - Job?
What is the Philosophy of Feminism?
What is a quantum computer?
Ways B2B Startups Streamline Their Conversion Strategies
Why do biomedical signals need processing?
What are the long term effects of climate change?
Why study labour relations
What is Holoprosencephaly?
What is antisocial disorder?
What are the important principles of evolution?
What is the cytoplasm and its function?
What is biopolymers?
What Makes a Good Leader
Women empowerment in modern generation
What is the history of political thought?
What is Gene recombination
What is synthetic biology
What is business cost analysis?
What is Inflation
What are the consequences of unemployment?
What is lithotripsy and its types?
What is transition elastography?
What is the purpose of deep brain stimulation?
What is a Brain-Computer Interface (BCI)
What is neuroethics?
What is Market and Supply and Demand
What is optogenetics?
What are the techniques to record brain activity?
What happens if the interest rate increases?
What is immunotherapy?
What is the economic role of the financial market?
What are the factors behind illegal immigration?
What is the lymphocyte activation?
What is financial market and its types?
What is the structure of financial markets?
What are the methods of measuring business performance?
What is the Credit market?
What is business ethics and code of ethics
What are the Causes of financial instability?
What is MBA with Concentrations
What is regenerative medicine?
What is Population ecology?
What is Microfinance: evolution, and practices?
What is biotechnology and its applications?
What are Workplace diversity and its benefits?
What is the difference between a leader and a manager?
What Is Branding and best branding Business strategies?
Why are microelectronics important?
What are biologic drugs.
What is the Foreign Exchange market?
What is the role of scientific research in times of crisis?
What are the risks of international trade?
What is financial management?
What is gene therapy?
What is education economics?
What is regression analysis, and why should you use it?
What Is Technology Marketing And How Should It Work?
What is Management Accounting
What are the methods of valuation of companies?
What is Immune System and Immunotherapy?
What is big data analytics?
What is the 7 layers of OSI model?
What is Neuroplasticity?
What are Sculpture art and its types?
What are the different genres of films?
What is Transcranial magnetic stimulation (TMS)?
What is TES-Transcranial electrical stimulation?
What is Relativism?
What is Vaccine skepticism, and what to do about it?
What happens in the brain when learning?
What is the deep neural network?
What is Convolutional Neural Network
What are the linear models in machine learning?