0% found this document useful (0 votes)
27 views

paging, segmentation, virtual memory

Paging is a memory management technique that divides processes and memory into equal parts called pages and frames, allowing non-contiguous memory allocation. Virtual memory creates an illusion of larger main memory by using secondary memory, enabling the execution of larger applications with less RAM, though it can slow down the system. Segmentation, another memory management technique, divides memory into variable-sized segments, improving efficiency by grouping related functions, but it can lead to external fragmentation and requires complex memory management algorithms.

Uploaded by

Sowmya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

paging, segmentation, virtual memory

Paging is a memory management technique that divides processes and memory into equal parts called pages and frames, allowing non-contiguous memory allocation. Virtual memory creates an illusion of larger main memory by using secondary memory, enabling the execution of larger applications with less RAM, though it can slow down the system. Segmentation, another memory management technique, divides memory into variable-sized segments, improving efficiency by grouping related functions, but it can lead to external fragmentation and requires complex memory management algorithms.

Uploaded by

Sowmya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Paging

Paging is a Memory Management technique that helps in retrieving the


processes from the secondary memory in the form of pages. It eliminates the
need for contagious allocation of memory to the processes.

In paging, processes are divided into equal parts called pages, and main
memory is also divided into equal parts and each part is called a frame.

Each page gets stored in one of the frames of the main memory whenever
required. So, the size of a frame is equal to the size of a page. Pages of a
process can be stored in the non-contagious locations in the main memory.

Virtual memory

Virtual Memory is a storage scheme that provides user an illusion of having a


very big main memory. This is done by treating a part of secondary memory
as the main memory.

In this scheme, User can load the bigger size processes than the available
main memory by having the illusion that the memory is available to load the
process.

Instead of loading one big process in the main memory, the Operating
System loads the different parts of more than one process in the main
memory.

Advantages of Virtual Memory

The degree of Multiprogramming will be increased.

User can run large application with less real RAM.

There is no need to buy more memory RAMs.

Disadvantages of Virtual Memory

The system becomes slower since swapping takes time.

It takes more time in switching between applications.

The user will have the lesser hard disk space for its use.
Segmentation in OS (Operating
System)
In Operating Systems, Segmentation is a memory management technique in
which the memory is divided into the variable size parts. Each part is known as a
segment which can be allocated to a process.
The details about each segment are stored in a table called a segment table.
Segment table is stored in one (or many) of the segments.
Segment table contains mainly two information about segment:
1. Base: It is the base address of the segment
2. Limit: It is the length of the segment.
Why Segmentation is required?

Till now, we were using Paging as our main memory management technique.
Paging is more close to the Operating system rather than the user. It divides
all the processes into the form of pages regardless of the fact that a process
can have some relative parts of functions which need to be loaded in the
same page.

Operating system doesn’t care about the User’s view of the process. It may
divide the same function into different pages and those pages may or may
not be loaded at the same time into the memory. It decreases the efficiency
of the system.

It Is better to have segmentation which divides the process into the


segments. Each segment contains the same type of functions such as the
main function can be included in one segment and the library functions can
be included in the other segment.

Advantages of Segmentation

No internal fragmentation

Average Segment Size is larger than the actual page size.

Less overhead

It is easier to relocate segments than entire address space.

The segment table is of lesser size as compared to the page table in paging.

Disadvantages

It can have external fragmentation.


It is difficult to allocate contiguous memory to variable sized partition.

Costly memory management algorithms

Translation of Logical address into physical address by segment


table

CPU generates a logical address which contains two parts:

Segment Number

Offset

You might also like