littleCoder
littleCoder

Reputation: 13

virtual memory effects and relations between paging and segmentation

This is my first post. I want to ask about how are virtual memory related to paging and segmentation. I am searching internet for few days, but still can't manage to put that information into right order. Here is what I know so far:

We can talk about addresses (we could say they are levels of memory abstraction) in memory:

So here we came to parts which I don't really understand:

  1. Why in some sources logical address and virtual addresses are described as synonymes? Do I get something wrong?

  2. Is really virtual memory making protection to processes? I mean, in segmentation for example there was also check if process do not acces other memory (resulting in segfault if it does), paging also has a protection bit in a page table, so doesn't the protection come from simply extending abstraction of logic level addresses? If VM (Virtual Memory) brings extended protection features, what are they and how they work? In other words: does creating separate address space for each process, bring extended memory protection. If so, what can't be achieved is paging without VM?

  3. How really differ paged segmentation from segmented paging. I know that the difference between these two will be how a address is constructed (a page number, segment number, that stuff..), but I suppose it isn't enough to develop 2 strategies. This reason is like nothing. I read that segmented paging is less elastic, and that's the reason why it is rarely used. But why it it less elastic? Is the reason for that, that in program you can have only few segments instead a lot of pages. If thats the case paging indeed allow better "granularity".

  4. If VM make separate address space for each process, does it mean, paging without VM use logic addresses from "one pool" (is then every logic address globally unique in that case?).

Any help on that topic would be appreciated.

Edit: #1
Ok. I finally understood that paging not on demand is also a virtual memory. I just found some clarification was helpful to understand the topic. Below is link to image which I made to visualize differences. Thanks for help.

differences between paging, demand paging and swapping

Upvotes: 1

Views: 790

Answers (1)

user3344003
user3344003

Reputation: 21637

Why in some sources logical address and virtual addresses are described as synonymes? Do I get something wrong?

Many sources conflate logical and virtual memory translation. In ye olde days, logical address translation never took place without virtual address translation so processor documentation referred to them as the same.

Now we have large memory systems that use logical memory translation without virtual memory.

Is really virtual memory making protection to processes?

It is the logical memory translation that implements page protections.

How really differ paged segmentation from segmented paging.

You can really ignore segments. No rationally designed processor architecture designed after 1970 used segments and they are finally dying out.

If VM make separate address space for each process, does it mean, paging without VM use logic addresses from "one pool"

It is logical memory that creates the separate address space for each process. Paging is virtual memory. You cannot have one without the other.

Upvotes: 0

Related Questions