presentataion
TRANSCRIPT
![Page 1: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/1.jpg)
BY HASEEB HAYAT2014-UETR-CS-18
Memory Segmentation
![Page 2: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/2.jpg)
Segmentation
* It is the process in which the main memory of computer is divided into different segments and each segment has its own base address.
* Segmentation is used to increase the
execution speed of computer system so
that processor can able to fetch and execute the
data from memory easily and fastly.
![Page 3: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/3.jpg)
Segmentation
![Page 4: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/4.jpg)
Segmentation in 8086The 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.
![Page 5: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/5.jpg)
Types of Segmentation
overlapping segment.
• 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.
• The area of memory from the start of the second segment to the possible end of the first segment is called as overlapped segment.
Non 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 be Non- overlapping segment.
![Page 6: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/6.jpg)
Advantages of segmentation
The main advantages of the segmented memory scheme are
as follows:
Allows the memory capacity to be 1 Mbyte although the actual addresses to be handled are of
16-bit size
Allows the placing of code data and stack portions of the same
program in different parts (segments) of memory, for data
and code protection.
Permits a program and/ or its data to be put into different areas of memory each time
program is executed, ie, provision for relocation may be
done.
![Page 7: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/7.jpg)
Memory Address Generation• The BIU has a dedicated adder for determining
physical memory addresses.
Physical Address (20 Bits)
Adder
Segment Register (16 bits) 0 0 0 0
Offset Value (16 bits)
![Page 8: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/8.jpg)
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 + 4872A9822
![Page 9: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/9.jpg)
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.
![Page 10: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/10.jpg)
Segments, Segment Registers & Offset Registers
4 Segments in 8086• Code Segment (CS)• Data Segment (DS)• Stack Segment (SS)• Extra Segment (ES)
![Page 11: Presentataion](https://reader036.vdocuments.net/reader036/viewer/2022083105/5876d45e1a28ab1d238b53d9/html5/thumbnails/11.jpg)
Segmented Memory Representation