OSDev.org
https://forum.osdev.org/

Wikipedia misleading on Paging
https://forum.osdev.org/viewtopic.php?f=15&t=31393
Page 1 of 1

Author:  michaellangford [ Wed Mar 01, 2017 12:51 pm ]
Post subject:  Wikipedia misleading on Paging

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:

Quote:
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? ...

Author:  kzinti [ Wed Mar 01, 2017 1:05 pm ]
Post subject:  Re: Wikipedia misleading on Paging

Seems very accurate to me. Which parts do you have concerns with?

Author:  OSwhatever [ Wed Mar 01, 2017 1:31 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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.

Author:  Sik [ Wed Mar 01, 2017 3:52 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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).

Author:  kzinti [ Wed Mar 01, 2017 4:02 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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.

Author:  OSwhatever [ Wed Mar 01, 2017 4:35 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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?
Quote:
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

Author:  dchapiesky [ Wed Mar 01, 2017 5:23 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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....

Author:  Brendan [ Wed Mar 01, 2017 7:43 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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

Author:  linguofreak [ Sun Mar 05, 2017 8:59 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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.

Author:  Antti [ Mon Mar 06, 2017 4:12 am ]
Post subject:  Re: Wikipedia misleading on Paging

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.

Author:  OSwhatever [ Mon Mar 06, 2017 1:38 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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.

Author:  Love4Boobies [ Thu Mar 09, 2017 5:49 pm ]
Post subject:  Re: Wikipedia misleading on Paging

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".

Author:  irvanherz [ Wed May 10, 2017 12:21 am ]
Post subject:  Re: Wikipedia misleading on Paging

I think, you're being confused to distinguish between paging and virtual memory.

Author:  Boris [ Fri May 12, 2017 12:26 am ]
Post subject:  Re: Wikipedia misleading on Paging

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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/