What the diffence?
-
Hello May i know what's the main difference between Segments and Pages in a context of virtual memory? Thx!
-
Hello May i know what's the main difference between Segments and Pages in a context of virtual memory? Thx!
Wikipedia has a good description here[^]. Essentially, a segment is a chunk of memory that can be swapped to and from a disk, while a page is a smaller block contained within a segment. Going back a bit in time, the Intel 80286 introduced the concept in order to extend the memory addressable in early computers. A register held the current segment of memory, while another held the offset - the page within the segment. The program counter register then provided the fianl bits of the address of the target memory word. This allowed a 16-bit processor to efficiently utilize physical memory addresses of 32 bits or more, though I don't believe any operating system of that era ever made use of the feature.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
-
Wikipedia has a good description here[^]. Essentially, a segment is a chunk of memory that can be swapped to and from a disk, while a page is a smaller block contained within a segment. Going back a bit in time, the Intel 80286 introduced the concept in order to extend the memory addressable in early computers. A register held the current segment of memory, while another held the offset - the page within the segment. The program counter register then provided the fianl bits of the address of the target memory word. This allowed a 16-bit processor to efficiently utilize physical memory addresses of 32 bits or more, though I don't believe any operating system of that era ever made use of the feature.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
I get a somewhat different impression from the article you quoted. As I understand the article, paging and segmentation are 2 different virtual memory schemes that can be, but are not necessarily, combined for even more involved virtual memory schemes. I didn't fully understand this (and probably still don't). As far a segmented memory addressing (not in relationship to virtual memory), that goes back at least to the 8086/8088. It allowed these processors with 16 bit segment/address registers to address 1 MB of memory rather than being limited to 64K. It did this by adding a 16 bit offset to a 16 segment shifted over by 4 bits producing a 20 bit address. Note that the PC (program counter) is used in conjunction with the Code Segment register for fetching instructions. It is never involved in accessing data. Similarly, a segment and an offset value is all that is needed to produce an address for a data access, though there are addressing modes that add further modifications to this.