Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Memory Management and its techniques

Rating
-
Sold
-
Pages
6
Uploaded on
07-02-2025
Written in
2024/2025

This document contains detail about memory management and its techniques.

Institution
Course

Content preview

Memory Management:
Memory Management in Operating System (OS) is the process of managing the computer's
memory resources so that the memory for running programs can be allocated and
deallocated efficiently.

Objectives of Memory Management:

1. Efficient Use of Memory: Maximize the use of available memory.
2. Reliability: Ensure that each process runs in its own memory space, without interfering
with other processes.
3. Protection: Prevent unauthorized access to memory regions allocated to other
processes.
4. Sharing: Allow multiple processes to share common memory regions.

Memory Management Techniques:

1. Partitioning: Divide the memory into fixed-size partitions, each allocated to a process.
2. Paging: Divide the memory into fixed-size pages, each allocated to a process. Pages can
be swapped out to disk if not in use.
3. Segmentation: Divide the memory into variable-size segments, each allocated to a
process.
4. Virtual Memory: Use a combination of physical memory and disk storage to provide a
larger address space for programs.

Memory Management Units (MMU):

A Memory Management Unit (MMU) is a hardware component that translates virtual addresses
used by programs into physical addresses in memory.

Functions of MMU:

1. Address Translation: Translates virtual addresses to physical addresses.
2. Memory Protection: Prevents unauthorized access to memory regions.
3. Paging and Segmentation: Supports paging and segmentation memory management
techniques.

Types of Memory:

1. Main Memory (RAM): Volatile memory that stores data temporarily while a program is
running.
2. Secondary Memory (Disk Storage): Non-volatile memory that stores data permanently.
3. Cache Memory: Small, fast memory that stores frequently accessed data.
4. Virtual Memory: Combination of physical memory and disk storage.

Memory Allocation Algorithms:

1. First-Fit: The first block of memory large enough is allocated
2. Best-Fit: The smallest block of memory large enough is allocated.
3. Worst-Fit: The largest block of available memory is allocated
4. Next-Fit: The next block of available memory is allocated.

, Memory Deallocation:

1. Explicit De-allocation: A function for de-allocation in the program explicitly frees up
memory.
2. Implicit De-allocation: The memory will be de-allocated when a
program is terminated automatically by the operating system.

Problems with Memory Management:

1.Fragmentation: Divide memory into very small pieces, which might not give
much allocation of large pieces.
2. Paging: Pages that go to disk might cause the system to generate page
faults or reduce performance.
3. Thrashing: The process generates too many page
faults causing an increase in time spent in the swapping of pages rather than their executi
on.




Virtual Memory:

Virtual memory is a memory management capability that allows a computer to use both
physical and secondary memory (such as a hard disk drive) to provide a larger address
space for programs.

How Virtual Memory Works:

1. Program Requests Memory: A program requests memory from the operating system.
2. Operating System Allocates Virtual Memory: The operating system allocates a portion
of virtual memory to the program.
3. Virtual Memory is Mapped to Physical Memory: The virtual memory is mapped to
physical memory (RAM) or secondary memory (hard disk drive).
4. Program Accesses Virtual Memory: The program accesses the virtual memory as if it
were physical memory.
5. Operating System Manages Virtual Memory: The operating system manages the virtual
memory, swapping pages in and out of physical memory as needed.

Benefits of Virtual Memory:

1. Expanded Address Space: Virtual memory allows programs to use more memory than is
physically available by providing an expanded address space.
2. Effective Utilization of Physical Memory: Virtual memory allows the operating system
to effectively utilize physical memory, swapping pages in and out of
memory when necessary.
3. Enhanced Multitasking: Virtual memory allows for multiple programs to run
simultaneously, each with its own virtual memory space.

Types of Virtual Memory:

1. Paging: The virtual memory is divided into pages of fixed size, which get swapped in and

Written for

Institution
Course

Document information

Uploaded on
February 7, 2025
Number of pages
6
Written in
2024/2025
Type
Class notes
Professor(s)
Dr.nafees
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
rizz76

Get to know the seller

Seller avatar
rizz76 GCUF
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions