What happens when I make a request to a web server?
- Network Interface buffer
- OS keeps polling the Network Interface for data
- OS calls for DMA to Primary
- … ?
- Check for the file cache in RAM
- Looks up the file in secondary memory
- The file is loaded to RAM
- The file contents is split and sent to the network interface buffer
Different types of memories
- Network Interface buffer
- Caches (L1, L2, L3, …)
- CPU Registers
- RAM
- Secondary memory (HDD/ SSD)
Memory | Read Speed (MB/sec) | Analogy | |
---|---|---|---|
CPU Register | Light | On my table | |
L1 Cache | ~6100000 | Asteroids | On my desk draw |
L2 Cache | ~1525000 | Mach 5 | On my cupboard |
L3 Cache | ~122000 | Jet | On my store room |
RAM | ~61000 | Bullet train | On my lower floor |
Disk | ~3500 | Walking | On another house |
Row major order (Locality of ref)
- More copies from RAM to caches when we do column order ops than row order ops
single core system multi-core sytem
Ref
https://cs50.harvard.edu/ap/2023/curriculum/technology/references/memory.pdf
NDNS