1
$\begingroup$

Clearly, some empirical study on an older machine helped us choose a 4KiB page size to balance TLB hit rate and fragmentation. Modern hardware and operating systems support this size for backward compatibility, while also supporting larger page sizes (16 KiB, 2 MiB, 1 GiB).

  • What was the first hardware + OS that introduced the 4096B page size?
  • What was the empirical study that influenced this decision?
  • Did the page size influence the hard disk block size or the other way around?
$\endgroup$
4
  • $\begingroup$ Probably, it has to do with a 16-bit processor and indexing all pages into a single page. Please correct me if I am wrong. $\endgroup$
    – codeR
    Commented Apr 26 at 7:30
  • $\begingroup$ Please ask only one question per post. I think your third question (memory page size vs hard disk block size) should probably be asked separately. If you have multiple questions, you can ask each one separately using the 'Ask Question' button. $\endgroup$
    – D.W.
    Commented Apr 26 at 19:32
  • 1
    $\begingroup$ Please show what research you've done. What is the earliest hardware + OS you know of that used 4096B pages? $\endgroup$
    – D.W.
    Commented Apr 26 at 19:32
  • $\begingroup$ My phone uses a much larger page size. $\endgroup$
    – gnasher729
    Commented Apr 27 at 13:04

2 Answers 2

0
$\begingroup$

My best guess is that it was done just because 4 KB page contains just enough space to describe 1024 pages, so you can address the entire 4 GB space in 2 pagewalk levels.

$\endgroup$
1
  • $\begingroup$ Though 4 Kb pages became norm long before memory was measured in gigabytes $\endgroup$ Commented May 29 at 18:30
0
$\begingroup$

Why was it 4KB? Because someone looked at the problems, looked at the benefits or disadavantages of a larger or of a smaller pagesize, in the context of the technology of his time, and figured out that 4KB was optimal or close enough to optimal to make no difference. That's the explanation most of the time: Someone thought it was a good idea. No deeper meaning.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.