Всегда ли размер страницы ОЗУ совпадает с размером страницы подкачки?

490
HAL9000

Могут ли они быть другими в каком-то случае? Как определяется / изменяется размер страницы ОЗУ?

0
Нет Тем не менее, дополнительная информация о конкретной ОС и проблеме, которую вы пытаетесь решить, поможет. Dave M 10 лет назад 0

1 ответ на вопрос

2
JdeBP

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.

Похожие вопросы