Memory Segmentation: Definition & Purpose

Lesson Transcript
Instructor: Lyna Griffin

Lyna has tutored undergraduate Information Management Systems and Database Development. She has a Bachelor's degree in Electrical Engineering and a Masters degree in Information Technology.

In this lesson we will learn and understand the definition and concepts in memory segmentation. We will examine the processes entailed and understand the purposes of this type of memory management. Updated: 09/13/2021

What Is Memory Segmentation?

Memory is one of the most important resources on a computing system, and its management is primary in every environment. In a bid to use memory efficiently and effectively, a number of techniques have been developed to properly manage it. One of these memory management techniques is known as memory segmentation (MS).

Memory segmentation is a system of segmenting processes that loads information into different non-contiguous addressed spaces in memory. They are referenced using memory addresses. The processes are first segmented (or split) most commonly into three segments: one to house the data, another to house the code, and a third to house the stack.

Programmers may use different variables to achieve this in their program development. The data segment represents all the variables which will be used in running the program, the code segment is the actual execution of the process, while the stack segment monitors the progress and status of the different elements of the program. Now, depending on how complex a program is or its level of sophistication, the program may be comprised of many more segments.

Once the process of segmentation occurs, the entire process can be loaded into different areas in memory instead of one contiguous space. Loading smaller segments of the process into memory allows the physical memory to be used more efficiently. Loading is done by a placement algorithm with processes provided the exact memory space they require as in dynamic partitioning. This technique allows for better memory management, reducing the occurrences of fragmentation.

Programmers armed with this technique segment their programs according to the corresponding program logic. This makes segmentation more realistic to the programmer. How does this all work with memory?

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Memory Management (MEM) Coding: Analysis & Example

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
Your next lesson will play in 10 seconds
  • 0:04 What Is Memory Segmentation?
  • 1:55 Segmentation & Process Loading
  • 2:51 Purposes & Benefits
  • 4:49 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Speed Speed

Segmentation & Process Loading

We know that memory is divided into different sections. The operating system, as the diagram indicates, occupies a dedicated section in memory:

memory space layout

A program's processes are divided into segments and are then loaded into memory using a special placement algorithm similar to dynamic partitioning. Recall that dynamic partitioning is a system of loading the process into memory with memory allocations matching the exact size of the processes, eliminating internal fragmentation.

Now the processes of the program are loaded into memory using a placement algorithm that determines which process segment is loaded into which memory location. As such, the different processes that comprise the program can be loaded into different parts of memory. They are referenced using memory addresses in their non-contiguous spaces. Segmentation does not incur internal memory fragmentation but does incur external fragmentation.

Purposes & Benefits

Let's talk a little more about the benefits of memory segmentation.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it now
Create an account to start this course today
Used by over 30 million students worldwide
Create an account