New Page 1
Welcome to basicsofcomputer.com
 

Share This Free Knowledge With Your Friends:

Home » Memory Management in Operating System » Segmentation in Operating System

Segmentation in Operating System:

Definition and Explanation:

Segmentation is a process of of breading program into logical segments and allocating space for these segments in memory separately. The segments can be of variable, lengths. They may not be allocated contiguous memory. The segments are more flexible. They are visible to the programmers. The programmer can use them to tell the system to bring certain data into main memory always together. The disadvantage of segmentation is that the programmer must manage segments whether he wants or not. Segmentation suffers from external fragmentation that is more difficult to deal.

The systems utilizing a paged memory management system must handle the mapping of logical memory onto the physical memory. In a paged environment the user's view of memory (the logical view) is much different than system's view of memory. Typically, the user views memory as a collection of different sized segments containing different components of their application with no implied ordering amongst the segments.

Example:

For example, the user will view one segment as containing their main program. He views another segment containing a subroutine. Another segment may contain common library routines. Another segment holds the symbol table for their program. A user does not view the memory as a contiguous sequence of bytes. Items in a segment are addressed by their offset within the segment such as "the third symbol in the symbol table" or "the 15th line of code".

The segmentation views the logical address space as a collection of segments where each segments has a name (typically just an integer number) and a length. Logical addresses are generated by the programmer and transmitted to MMU by CPU. They must specify both the segment name and the offset in the segment.

The paging system partitioned a single logical address into page number and offset components. A logical address in a system using segmentation consists of <segment, offset>. The assembler or compiler generates object code in which each line of object code is associated with a particular segment based on programmer's original source code. The programmer most specify to which segment a particular instruction or data value belongs. It is the assembler/compiler that generates object code that reflects these assignments. The loader will make the segment number assignments.

The user now has a two-dimensional view of memory. It is based upon their logical addresses consisting of a segment number and an offset. The segmented system must map the two-dimensional logical addresses onto the one-dimensional addresses corresponding to the actual physical memory. It requires additional hardware support.

Segment Table:

A segment table is maintained which contains information about every segment in a user program (process). Each entry in the segment table contains (among other things) a base value and a limit value. This makes the segment table essentially a set of base-limit register pairs. The base value contains the actual physical address in memory where the segment currently resides. The limit value contains the size (or length) of the segment.

The figure/diagram illustrates the use of segment table in the mapping of logical addresses to physical addresses.

Relevant Articles:

Introduction to Memory Management in Operating System
Basic Memory Management Requirements/Principles/Mechanism in Operating System
Contiguous & Non-Contiguous Storage Allocation in Memory Management
Swapping Concept in Operating System
Memory Allocation Methods in Operating System
Logical vs. Physical Address Space
Paging in Operating System
Page Table Structure and Hardware Support
Segmentation in Operating System
Segmentation with Paging in Operating System
 
New Page 1

Basic Computer Science

   
» The Age of Information

» Types of Computer and Digital Age

» Input and Output Devices

» Storage Devices Of Computer

» Central Processing Unit

» Software: The Power Behind The Power

» Data Communication and Computer Networks

» The Nature Of Information

» The System Theory

» Transaction Processing System (TPS) and Management Information System (MIS)

» Decision Support System (DSS) and Executive Support System (ESS)

» Expert System (ES) and Office Information System (OIS)

 

Operating Systems

   
» Introduction to Operating System

» Introduction to Process Management

» Threads and CPU Scheduling

» Process Synchronization in Operating System

» Deadlocks

» Memory Management in Operating System

» Virtual Memory in Operating System

» File System Management in Operating System

» I/O and Device Management

» Security

» Linux Operating System

 

Database Management System

   
» Introduction to Database Systems

» Database System Architecture

» Database Administration and Database Development Process

» The Entity-Relationship Model

» Semantic Object Model

» Logical Database Design and Relational Data Model

» Normalization in Database

» Transformation of E-R Model into Relational Data Model

» Representing Semantic Object Model and Types of Semantic Object Model

» Physical Database Design

» Introduction to Structured Query Language (SQL)

» Implementation of Relational Database and Database Application Design

» Client Server Database Systems & Open Database Connectivity (ODBC)

 

Questions and Answers

   
» Basics of Information Technology

» Computer Architecture

» Data Communication

» Information Networks

» Fundamentals of the Internet

» Application and Uses of Computer

» Security, Copyright and The Law

» Windows Operating Systems

» Spreadsheet Software

» Process Management in CPU

» CPU Scheduling

» Process Synchronization

» Deadlocks

» Memory Management

» Database Systems

» Database System Architecture

» Database Administration and Database Development Process
 
 
New Page 1
 

Home                Dictionary                 Contact us                   About us                    Privacy policy                  Link to us                   Advertise

Copy right ©  2012