Reputation: 3984
I was studying combined paging/segmentation systems and in my book there were two approaches to this :
1.paged segmentation
2.segmented paging
I could not make out the difference between the two. I think in paged segmentation the segment is divided into pages and in segmented paging the pages are divided into segments, though I don't know if I am right or wrong. Meanwhile on the internet the combined paging/segmentation is described using one scheme only. I can't figure out why in my coursebook there are two schemes for this. Any help would be deeply appreciated.
Upvotes: 33
Views: 31147
Reputation: 761
The fact is, paging has the following goodies:
But there is also a great behavior seen from segmentation:
The given terms, can be combined and create the following terms:
There are multiple steps need to be taken to achieve the Segmented Paging:
The following steps take place in this scheme:
Upvotes: 8
Reputation: 384344
Segmentation leads to slower page translations and swapping
For those reasons, segmentation was largely dropped on x86-64.
The main difference between them is that:
While it might appear smarter to have configurable segment widths, as you increase memory size for a process, fragmentation is inevitable, e.g.:
| | process 1 | | process 2 | |
----------- -----------
0 max
will eventually become as process 1 grows:
| | process 1 || process 2 | |
------------------ -------------
0 max
until a split is inevitable:
| | process 1 part 1 || process 2 | | process 1 part 2 | |
------------------ ----------- ------------------
0 max
At this point:
With fixed sized pages however:
Fixed sized chunks of memory are simply more manageable, and have dominated current OS design.
See also: How does x86 paging work?
Upvotes: 3
Reputation: 3984
So,after vigorously searching on net for the difference or similarity between these two terms,I have come up on a final answer.First of all I would write down the similarities:
Now to describe the differences I will have to define and describe each term separately:
va = (s,p,w) where, va is the virtual address, |s| determines number of segments (size of ST), |p| determines number of pages per segment (size of PT), |w| determines page size.
address_map(s, p, w)
{
pa = *(*(STR+s)+p)+w;
return pa;
}
The diagram is here:
va = (s1,s2,p,w)
address_map
(s1, s2, p, w)
{
pa = *(*(*(STR+s1)+s2)+p)+w;
return pa;
}
The diagram description is here:
Upvotes: 48