cpu-architecture


How critical is page size in virtual memory


So I just read that virtual addresses are divided up into 1 - page number and 2 - offset.
I also read that page number directs you to be able to find the right page and the offset to get the right "byte" that you want to get the physical memory of.
So for example in 4KB sized page, we have 12bits reserved for offset since 2^12 = 4096, which is 4KB.
I get the concepts. But I don't get the reasoning behind using pages.
I mean, using the 4KB sized page or 8KB sized page, why couldn't we use 1byte big page?
I guess that could make everything byte by byte read and write, which you could say it would slow things down.
But aren't we already doing the same thing with first finding page and finding the correct byte with offset?
What is the motivation behind coming up with bigger sized pages than 1byte?
I get the reason behind the use of virtual memory: to avoid swapping. But why couldn't we do this with smaller, more direct one byte sized page?
This is the same question as cluster sizes on disks.
Larger pages => Lower overhead (smaller page tables)
Smaller pages => Greater overhead
Larger pages => More wasted memory and more disk reading/writing on paging
Smaller pages => Less wasted memory and less disk reading/writing on paging
In ye olde says page sizes tended to be much smaller than they are today (512 bytes being common). As memory has grown, the wasted memory paging problems have diminished while the overhead problem (due to more pages) has grown. Thus we have larger page sizes.
A one byte page gets you nothing. You have to write to disk in full disk blocks (typically 512bytes or larger). Paging single bytes would be tediously slow.
Now add in page protection and the page tables. With one-byte pages, there would be more page table overhead than useable memory.

Related Links

What is the rationale behind the CPU instruction set?
What is the number of clock cycles required in the given sequence of Instruction using 5- stage pipelined CPU?
Calculating Interrupt Data Rate
Lightweight method to use Amd64 instructions under 32-bit Windows?
Anybody know a good PowerPc Reference text?
Terms used for addressing modes. [intel 8085]
Reliable CPU information and high level programming languages
byte order when reading hard drive MBR
Does evolution of microprocessors warrants evolution of compilers and language standards?
Understanding Memory Models
Why are there so many CPU architectures: x86, x64, x87, etc…?
Is it true that CPU never fetches anything from memory directly?
entering ring 0 from user mode
how does a wider data bus helps a CPU when internal register size is smaller?
Architecture targeting on IA-32
What is the difference between short adressing mode and long addressing mode

Categories

HOME
visual-studio-2015
symfony
redis
sed
webrtc
google-tag-manager
otrs
memory-leaks
command
tomcat7
chaiscript
safari
iis-7.5
ext.net
data-science-experience
pygame
currency
desktop
keystore
cs-cart
sql-tuning
opera-mini
bootstrap-popover
rhapsody
jcl
mousewheel
cruisecontrol.net
avplayeritem
onsen-ui
go-cd
spring-test
iis-10
fileinfo
referenceerror
m2e
receipt
google-drive-realtime-api
mapguide
rhino
hashcat
shibboleth
xen
fax
intellij-idea-2016
google-account
w3-total-cache
chunked-encoding
gauss
web-deployment-project
sgmlreader
jenkins-jira-trigger
forerunnerdb
pagefile
butterknife
execl
spyne
efxclipse
packagemaker
freetype2
nssplitview
scriptlet
mpeg-4
financial
twgl.js
flexjson
brackets-shell
portfolio
paypal-nvp
ipojo
type-mismatch
swift2.1
callstack
ember-cli-addons
musl
google-earth-plugin
pisa
ghostdoc
dache
dvcs
late-static-binding
opendata
bfd
facebook-sdk-3.1
driver-signing
astyanax
stagefright
html-form-post
digital-design
mvs
symfony-2.0
fotoware
scrollto
pstree
gdt
.app
drawtext
requestfactory
hibernate3-maven-plugin
kpi
soft-keyboard
ajaxpro

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App