Is the RAM page size always the same of swap disk page size?

0

Could they be different in some case? How is RAM page size determined/changed?

HAL9000

Posted 2014-02-07T09:48:24.967

Reputation: 141

Question was closed 2014-05-28T10:22:09.140

No However more info on a specific OS and the issue you are trying to solve would help. – Dave M – 2014-03-14T17:44:56.647

Answers

3

No. The processor page size equalling the page/swap file/volume unit size is common, for starters because it's the case for Windows NT on IA32 processors, but far from a universal given.

BSD 4.1 on VAXen, for example, pages to disc in units of clusters. The hardware page size is 512 bytes. A cluster is usually 1024 bytes, twice the page size. (In fact, it tries to be clever about pre-fetching extra pages for a page-in. So one or more clusters are paged in in groups called klusters.)

It's not the page size that changes. You have completely the wrong end of the stick there. The page size is fixed by the processor architecture. Processor architectures can support more than one possible size for a page. But those sizes are fixed.

It's the cluster size that can change. That's decided in software. One could in theory decide to rewrite BSD 4.x to operate in terms of 4KiB clusters on a VAX, for example. Again, though, because processor page sizes of 4KiB and larger are common nowadays, this idea is very rare.

Further reading

  • Samuel J. Leffler, Marshall Kirk McKusick, Michael J. Karels, and John S. Quarterman (1988). "§ 5.2 Evoluation of 4.3BSD Memory Management". The design and implementation of the 4.3BSD operating system. Addison-Wesley. ISBN 0201061961.

JdeBP

Posted 2014-02-07T09:48:24.967

Reputation: 23 855