0% found this document useful (0 votes)
87 views11 pages

Memory Segmentation: by Nikhil Kumar Nirt Bhopal

Memory segmentation divides the main memory into segments to increase execution speed. Each segment has its own base address and a maximum size of 64KB. Logical addresses use a segment and offset combination, while physical addresses are generated by shifting the segment left 4 bits and adding the offset. Segmentation allows programs to be placed in different memory segments for code and data protection, and permits relocation of programs each time they are executed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views11 pages

Memory Segmentation: by Nikhil Kumar Nirt Bhopal

Memory segmentation divides the main memory into segments to increase execution speed. Each segment has its own base address and a maximum size of 64KB. Logical addresses use a segment and offset combination, while physical addresses are generated by shifting the segment left 4 bits and adding the offset. Segmentation allows programs to be placed in different memory segments for code and data protection, and permits relocation of programs each time they are executed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Memory Segmentation

BY NIKHIL KUMAR
NIRT BHOPAL
Segmentation

* Segmentation is used
* It is the process in to increase the
which the main memory execution speed of
of computer is divided computer system so
into different segments that processor can able
and each segment has to fetch and execute the
its own base address. data from memory
easily and fastly.
Segmentation
Segmentation in 8086
The size of address bus of 8086 is 20 and is able to
address 1 Mbytes ( ) of physical memory.

The compete 1 Mbytes memory can be divided


into 16 segments, each of 64 Kbytes size.

The addresses of the segment may be assigned as


0000H to F000H respectively.

The offset values are from 0000H to FFFFFH.


Types of Segmentation
• A segment starts at a particular address and its maximum size can
go up to 64 Kbytes. But if another segment starts along this 64
Kbytes location of the first segment, the two segments are said to
be overlapping segment.
overlapping • The area of memory from the start of the second segment to the
segment. possible end of the first segment is called as overlapped segment.

• A segment starts at a particular address and its maximum size can


go up to 64 Kbytes. But if another segment starts before this 64
Kbytes location of the first segment, the two segments are said to
Non Overlapped be Non- overlapping segment.
Segment
Advantages of segmentation

The main advantages of the


segmented memory scheme are
as follows:

Permits a program and/ or its


Allows the placing of code data
Allows the memory capacity to data to be put into different
and stack portions of the same
be 1 Mbyte although the actual areas of memory each time
program in different parts
addresses to be handled are of program is executed, ie,
(segments) of memory, for data
16-bit size provision for relocation may be
and code protection.
done.
Memory Address Generation
• The BIU has a dedicated adder for determining
physical memory addresses.
Offset Value (16 bits)

Segment Register (16 bits) 0000

Adder

Physical Address (20 Bits)


Segment : Offset Address
• Logical Address is specified as segment: offset
• Physical address is obtained by shifting the
segment address 4 bits to the left and adding the
offset address.
• Thus the physical address of the logical address
A4FB:4872 is:
A4FB0
+ 4872
A9822
Segments, Segment Registers & Offset
Registers

Segment Size = 64KB

Maximum number of segments possible = 14

Logical Address – 16 bits

Physical Address – 20 bits

2 Logical Addresses for each Segments.


• Base Address (16 bits)
• Offset Address (16 bits)

Segment registers are used to store the Base address of the segment.
Segments, Segment Registers & Offset
Registers

4 Segments in
8086
• Code Segment (CS)
• Data Segment (DS)
• Stack Segment (SS)
• Extra Segment (ES)
Segmented Memory Representation

You might also like