Introduction of memory Segmentation
Segmentation is the process in which the main memory of the computer is logically divided into different segments and each segment has its own base address.
Memory segmentation is the methods where whole memory is divided into the smaller parts called segments of various sizes.
A segment is just an area in memory.
The process of dividing memory this way is called segmentation.
2. Introduction of memory Segmentation
Segmentation is the process in which the main memory of the
computer is logically divided into different segments and each
segment has its own base address.
Memory segmentation is the methods where whole memory is
divided into the smaller parts called segments of various sizes.
A segment is just an area in memory.
The process of dividing memory this way is called segmentation.
3. These segments are data segment, code segment, stack
segment and extra segment.
It is basically used to enhance the speed of execution of the
computer system, so that the processor is able to fetch and
execute the data from the memory easily and fast.
4. Memory Segmentation
In memory, data is stored as bytes.
Each byte has a specific address.
Intel 8086 has 20 lines address bus.
With 20 address lines, the memory that can be addressed is 2^20
bytes.
2^20 = 1,048,576 bytes (1 MB).
This 1MB memory is divided into 16 logical segments, each with a
memory of 64KB.
5. 8086 can access memory with address.
Ranging from 0000H to FFFFH
6. Segments
In 8086, memory has four different types of segments these are:
Code segment
Data segment
Stack segment
Extra segment
7. Segment Register
Each of these segments are addressed by an address stored
in corresponding segment register.
These registers are 16 bit in size.
Each register stores the base address (starting address) of the
corresponding segment.
Because the segment registers cannot store 20 bits, they only
store the upper 16 bits.
8. Code segment register (CS): is used for addressing memory
location in the code segment of the memory, where the
executable program is stored
Data segment register (DS): points to the data segment of the
memory where the data is stored.
Extra segment register (ES): also refers to a segment in the
memory which s another data segment in the memory.
Stack Segment Register (SS): is used for addressing Stack
segment of the memory. The stack segment is that of memory
which is used to store stack data.
9.
10. Advantages and Disadvantages of
Segmentation
Advantages of Segmentation
it permits the programmer to access 1MB memory using only
16 bit address.
It divides the memory logically to store code, data and stack
portion separately. For data and code protection.
Memory segmentation is very useful for multiuser environment.