Wikipedia misleading on Paging

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
michaellangford
Posts: 21
Joined: Tue Jun 21, 2016 6:41 am
Freenode IRC: quad4

Wikipedia misleading on Paging

Post by michaellangford »

Not sure if I am posting this in the correct forum, but here goes: I was looking at https://en.wikipedia.org/wiki/Paging, and the intro is extremely misleading:
In computer operating systems, paging is a memory management scheme by which a computer stores and retrieves data from secondary storage[a] for use in main memory.[1] In this scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. Paging is an important part of virtual memory implementations in modern operating systems, using secondary storage to let programs exceed the size of available physical memory.
Should I go ahead and modify this to reflect what is really going on, let someone more qualified than me do it, or leave it alone? I am also wondering if the article itself is really just written in layman's terms because that was who it was written for. Your thoughts? ...
"Out of memory: Please memorize the following numbers and type them back in when asked for page number 42". - linguofreak

"Quote me in your forum signature" - Sortie (Check!)
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: Wikipedia misleading on Paging

Post by kzinti »

Seems very accurate to me. Which parts do you have concerns with?
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: Wikipedia misleading on Paging

Post by OSwhatever »

I think what TS is meaning is the Wikipedia kinda suggests that main purpose of paging is swapping out pages to disk when available RAM is low. I think TS is right regarding this. The purpose of paging involves much more like, solving fragmentation, multiple address spaces, memory access rights, demand paging and much more. The list can be quite long when I think about it.

I'm actually not sure what was the main driver when paging was first invented, it could have been swapping out to disk as limited memory was more of a problem during the 70s and 80s. Lately there have been a less emphasis on swapping to disk (which often makes a computer unusable) which often also is disabled in phones for example.

I agree that Wikipedia should be updated in order to better describe what functionality paging can provide.
User avatar
Sik
Member
Member
Posts: 251
Joined: Wed Aug 17, 2016 4:55 am

Re: Wikipedia misleading on Paging

Post by Sik »

I honestly have never looked into its history so I have no idea why paging exists in the first place, but I wouldn't be surprised if it started as a derivative of bank switching (which in some sense is like paging without restrictions and with every area being mapped somewhere).
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: Wikipedia misleading on Paging

Post by kzinti »

The Wikipedia description is accurate and complete from the point of view of computer users. It is appropriate for most people.

The target audience of Wikipedia isn't technical people working on their own OS.

You will find that this is true of most subjects you will find on Wikipedia. This is normal: this is what a universal encyclopedia is.
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: Wikipedia misleading on Paging

Post by OSwhatever »

Read the section "Addressing limits on 32-bit hardware". I can't get my head around this text. It's a hairy mix of hardware limitations, software workarounds and sometimes system specific issues.

For example, doesn't this apply for all, regardless if virtual or main memory is larger?
A process can store data in memory-mapped files on memory-backed file systems, such as the tmpfs file system or file systems on a RAM drive, and map files into and out of the address space as needed.
Also, the section "implementations" seems to mix up hardware implementations and software implementations. So if you don't know much about paging you will be confused where it is implemented. Better would have to separate the hardware implementations and the software implementations in order to give the reader a better understanding how the CPU HW work together with the software.

For better understanding the wiki should be split up in.

Brief explanation
History
Hardware implementations
Software implementations
User avatar
dchapiesky
Member
Member
Posts: 204
Joined: Sun Dec 25, 2016 1:54 am
Freenode IRC: dchapiesky

Re: Wikipedia misleading on Paging

Post by dchapiesky »

IMHO the wikipedia page is accurate....

adding things like security isn't relevant because any description would devolve into the peculiarities of one cpu architecture over another and get off topic faster than a "what is the best language to write an OS in?" thread....
Plagiarize. Plagiarize. Let not one line escape thine eyes...
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Wikipedia misleading on Paging

Post by Brendan »

Hi,
michaellangford wrote:Should I go ahead and modify this to reflect what is really going on, let someone more qualified than me do it, or leave it alone? I am also wondering if the article itself is really just written in layman's terms because that was who it was written for. Your thoughts? ...
You should probably leave it alone.

Unfortunately "paging" has multiple meanings (even within the context of computer systems alone). The oldest and most correct is a synonym for "swapping" (transferring data to/from swap space), and the wikipedia page reflects this oldest and most correct meaning.

Other uses of "paging" (e.g. to mean "the virtual memory system as a whole not limited to swapping") are common colloquialism.

There is an argument that language evolves and the meanings of words change over time; and that at some point in time the previously correct meaning (swapping) becomes out-dated and replaced by previously informal meanings. However this causes a difficulty in determining when that point in time would be (or if it has passed already); and language usually evolves relatively slowly (e.g. taking hundreds of years before a word like "great" no longer means "immense" and can be used correctly to mean "impressive" in formal writing) while computer systems evolve much faster.
OSwhatever wrote:Read the section "Addressing limits on 32-bit hardware". I can't get my head around this text. It's a hairy mix of hardware limitations, software workarounds and sometimes system specific issues.
That part of it is badly written (imprecise - e.g. using "RAM" when they mean "physical address space", etc).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
linguofreak
Member
Member
Posts: 509
Joined: Wed Mar 09, 2011 3:55 am

Re: Wikipedia misleading on Paging

Post by linguofreak »

Brendan wrote: Unfortunately "paging" has multiple meanings (even within the context of computer systems alone). The oldest and most correct is a synonym for "swapping" (transferring data to/from swap space), and the wikipedia page reflects this oldest and most correct meaning.
Not quite: In the literature I've seen that uses "paging" this way, swapping means "writing a whole process to swap to free memory", and paging means "writing a page at a time to swap".

The original implementations of Unix only had one process in RAM at a time, everything but the currently scheduled process was on disk, and the current process was swapped out and the next one swapped in on every context switch. fork() was implemented by swapping out the current process, but not performing a context switch.
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Re: Wikipedia misleading on Paging

Post by Antti »

When I learned how paging works, I was totally impressed by the concept of virtual memory. The fact that you can use this for storing and retrieving data from secondary storage was just an obvious application of the very powerful feature. Extending the usable memory with secondary storage is conceptually a very simple thing. The concept of virtual memory is not a "simple" thing but a fundamentally different way of thinking the whole thing. You can easily design a system that works with or without the secondary storage but you definitely cannot design a system that works without virtual memory if it is designed to work efficiently with virtual memory.
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: Wikipedia misleading on Paging

Post by OSwhatever »

Antti, said the magic word "Virtual memory". If you look at what Wikipedia has to say about virtual memory you find a much informative page.

https://en.wikipedia.org/wiki/Virtual_memory

It almost makes the wiki page about paging redundant.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania
Contact:

Re: Wikipedia misleading on Paging

Post by Love4Boobies »

The Wikipedia article seems correct to me. If you think about it, paging without the ability to swap to/from secondary storage is really just segmentation. It doesn't matter whether you control the address spaces using something called "segment selectors" or something called "page table entries".
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
irvanherz
Member
Member
Posts: 27
Joined: Mon Sep 19, 2016 5:34 am

Re: Wikipedia misleading on Paging

Post by irvanherz »

I think, you're being confused to distinguish between paging and virtual memory.
Boris
Member
Member
Posts: 145
Joined: Sat Nov 07, 2015 3:12 pm

Re: Wikipedia misleading on Paging

Post by Boris »

Fun enough, some people use the virtualization word to denote what is on that wikipedia paging article .
Example in .NET
Post Reply