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)
MemoryRead Speed (MB/sec)Analogy
CPU RegisterLightOn my table
L1 Cache~6100000AsteroidsOn my desk draw
L2 Cache~1525000Mach 5On my cupboard
L3 Cache~122000JetOn my store room
RAM~61000Bullet trainOn my lower floor
Disk~3500WalkingOn 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

https://cplusplus.com/forum/general/48570/#:~:text=You%20can%20do%20it%20with,to%20read%20single%20byte%20values.

NDNS