mogoz

Multiprocessing

tags
Computer Architecture , Operating Systems , Concurrency

VAS for different architectures

vCPUs

You always have at least one core, one die and one package.

Name What
Package What you get when you buy a single processor. Contains one or more dies.
Die Actual silicon. A die can contain any number of cores
Socket The physical connector linking the processor to the computer’s motherboard. There can be multiple.
Core Independent execution unit that can run one program thread at a time in parallel with other cores.
vCPU vCPUs are compute threads that process execution for running os/vm.

vCPU calculation

  • (# Sockets) * (# Cores) = (# pCPU) (Physical CPU)
  • (# pCPU) * (2 Threads) = (# vCPU) (Virtual CPU)
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
On-line CPU(s) list:   0-7 (8)

pCPU = 1 * 4 = 4
vCPU = 4*2 = 8

VMs and Hypervisors

Now the term vCPU is widely used in hypervisors etc. In those cases, most hypervisors will let you overprovision cores. That means, you could assign 1 vCPU per VM, but the hypervisors also allow you overcommit every vcpu if you think your workload could handle that.

x86 Microarchitecture levels (march)

x86-64-baseline

  • CMOV, CMPXCHG8B, FPU, FXSR, MMX, FXSR, SCE, SSE, SSE2

x86-64-v2

  • CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3
  • close to Nehalem
  • Basically mandatory for modern OS

x86-64-v3

  • AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE
  • close to Haswell
  • Nice to haves

x86-64-v4

  • AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL
  • Cutting edge enterprise feature sets

Word

  • See wordsize w $ getconf WORD_BIT and LONG_BIT (32 on my computer)
  • WORD (16 bits/2 bytes)
  • DWORD (32 bits/4 bytes)
  • QWORD (64 bits/8 bytes)

Registers

Glossary

Chipset

  • Thing that’s in the motherboard that manages the data flow between the processor, memory and peripherals. i.e I/O Bridge.

Others