BCA / B.Tech 13 min read

Virtual Memory using Segmentation in Operating System

Virtual Memory using Segmentation in Operating System:


Virtual Memory and Segmentation are two important memory management techniques in modern operating systems. The combination of virtual memory and segmentation is used for the efficient and effective use of memory. Virtual memory ensures that large processes can be loaded into memory even if the physical memory is limited. Segmentation is a memory management technique in which a process is divided into different logical parts.

What is Virtual Memory?

Virtual memory is a technique that creates an illusion that a system has more memory than its physical RAM. It uses a portion of the system's hard disk as virtual memory and brings the required memory pages into RAM as needed. Its main objectives are to reduce the size constraints of a process, increase system productivity, and enable multitasking.

What is Segmentation?

Segmentation is a memory management scheme in which a process is divided into different parts called segments. These are logical units such as code, data, stack, etc. Each segment has a separate base address and limit, which allows for more organized memory management. Key features include logical division, user-friendly perspective, and different protection for different segments.

Using Segmentation in Virtual Memory:

When segmentation is used in virtual memory, the different segments of a process are placed in the virtual memory space. A segment table is used to translate a virtual address into a physical address. The segments of a process are stored in virtual memory, and whenever a segment is in use, it is brought into RAM.

Segment Table: Each process has a segment table that holds information about each segment of that process, including the segment's base address, its limit (size), and protection information.

Virtual Address Translation:

When using segmentation in virtual memory, a virtual address of a process is divided into two parts: Segment Number and Offset. The segment number is used to look up the base address in the segment table, and the offset is added to this base address to get the actual physical address.

Advantages of Virtual Memory using Segmentation:

  • Logical Division of Process: Segments are logical units, making it easier to manage parts like code, data, and stack separately.
  • Fewer Page Faults: Since entire segments might not need to be paged, it can reduce page faults.
  • Improved Multitasking: It manages resources between processes more effectively.
  • Enhanced Security: Different security rights can be given to each segment.
  • Non-Contiguous Memory Allocation: Allows a process to be allocated memory in different places.

Challenges of Virtual Memory using Segmentation:

  • Internal Fragmentation: If memory is not fully used according to the segment size, internal fragmentation can occur.
  • Complexity in Process: Implementing a segmentation-based system can be more complex due to the management of segment tables.
  • Extra Load on System: Maintaining segment tables and translating addresses requires additional system resources.

In this Chapter

Virtual Memory using Segmentation in Operating System
Distributed System in Operating System
Real-Time System in Operating System
System Calls in Operating System
System Programs in Operating System
Structure of an Operating System
Layered Design of an Operating System Structure
UNIX in Operating System
Virtual Machine in Operating System
Kernel-Based Operating System
Process Concept in Operating System
Interacting Processes in Operating System
Threads in Operating System
Fundamentals of Scheduling in Operating System
Scheduling Criteria in Operating System
Long, Medium, and Short-Term Scheduling
Scheduling Algorithms in Operating System
Structure of a Concurrent System
Critical Region in Operating System
Critical Section in Operating System
Inter-process Communication (IPC) in Operating System
Monitors in Operating System
Semaphores in Operating System
Semaphore Implementation & Uses in Operating System
Logical and Physical Address in Operating System
Swapping in Operating System
Contiguous Allocation in Operating System
Segmentation in Operating System
Paging in Operating System
Interprocess Communication Protocol in Operating System
Network Operating System
Design Issues in Distributed File System
Network Structure in Operating System
Structure of a Distributed System
File System and Coordination in Operating System
History of Linux in Operating System
Linux Commands
Programmer Interface & File Manipulation in Linux
Process Control in Linux
Kernel & Signals in Linux
File System in Linux
Blocks and Inodes in Linux
System Editors in Linux
Character Transliteration in Linux
The `ed` Line Editor in Linux
The `vi` Editor and Its Commands
Shell Scripting in Linux
Looping & Decision Making in Linux Shell Scripting
Variables & File Name Expansion in Linux
Arrays in Linux Shell Scripting
Subprograms (Functions) in Linux Shell Scripting
C Interface with Linux
Simple Shell Programs in Linux
BCA Part-1 | Operating Systems | Semester-I | MDSU Exam Paper 2023 (Held in 2024)
What is an Operating System (OS)
Operating System (OS) All Important Questions and Answers in English (MDSU)
BCA || Operating System 2025 Paper || MDSU Exam Paper
BCA | OS(Operating System) 2023 Paper | MDSU Exam Paper
Types of Operating Systems
Goals of an Operating System
Operations of an Operating System
Resource Allocation & Functions in an Operating System
Classes of Operating System
Batch Processing in Operating System
Multiprocessing in Operating System
Time-Sharing in Operating System