OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:28 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 12:51 pm 
Offline
User avatar

Joined: Tue Jun 21, 2016 6:41 am
Posts: 21
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? ...

_________________
"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!)


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 1:05 pm 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 898
Seems very accurate to me. Which parts do you have concerns with?

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 1:31 pm 
Offline
Member
Member

Joined: Mon Jul 05, 2010 4:15 pm
Posts: 595
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.


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 3:52 pm 
Offline
Member
Member
User avatar

Joined: Wed Aug 17, 2016 4:55 am
Posts: 251
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).


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 4:02 pm 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 898
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.

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 4:35 pm 
Offline
Member
Member

Joined: Mon Jul 05, 2010 4:15 pm
Posts: 595
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


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 5:23 pm 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
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...


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed Mar 01, 2017 7:43 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
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.


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Sun Mar 05, 2017 8:59 pm 
Offline
Member
Member

Joined: Wed Mar 09, 2011 3:55 am
Posts: 509
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.


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Mon Mar 06, 2017 4:12 am 
Offline
Member
Member

Joined: Thu Jul 05, 2012 5:12 am
Posts: 923
Location: Finland
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.

_________________
Undefined behavior since 2012


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Mon Mar 06, 2017 1:38 pm 
Offline
Member
Member

Joined: Mon Jul 05, 2010 4:15 pm
Posts: 595
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.


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Thu Mar 09, 2017 5:49 pm 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
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 ]


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Wed May 10, 2017 12:21 am 
Offline
Member
Member

Joined: Mon Sep 19, 2016 5:34 am
Posts: 27
I think, you're being confused to distinguish between paging and virtual memory.

_________________
https://github.com/irvanherz/jaura/


Top
 Profile  
 
 Post subject: Re: Wikipedia misleading on Paging
PostPosted: Fri May 12, 2017 12:26 am 
Offline
Member
Member

Joined: Sat Nov 07, 2015 3:12 pm
Posts: 145
Fun enough, some people use the virtualization word to denote what is on that wikipedia paging article .
Example in .NET


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group