paging, segmentation, virtual memory
paging, segmentation, virtual memory
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
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.
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.
Advantages of Segmentation
No internal fragmentation
Less overhead
The segment table is of lesser size as compared to the page table in paging.
Disadvantages
Segment Number
Offset