Linux
Core
- Kernel
- Source Code
- Compile
- LFS
- FileSystem
- /
- sysfs/procfs
Reference
Boot
-
Reset Vector
IP 0xfff0
CS selector 0xf000
CS base 0xffff0000
FFFFFFF0 = FFFF0000:FFF0
# BIOS is in ROM -
BIOS
- UEFI(GPT)
- Legacy BIOS(MBR)
-
POST
-
Bootable Devices
-
MBR
- Boot Sector(446B of 1st 512B Sector)
- Magic Bytes(0x55 0xaa)
-
Kernel Bootloader
- Grub
- Stage1
- Stage1.5
- Stage2
- LILO
- Grub
-
initframfs/initrd
-
Kernel
-
Init
- systemd
- sysv init
Kernel
Process Scheduler
MMU(Memory Management Unit)
VFS(Virtual File System)
Networking Unit
IPC(Inter-Process Communication Unit)
Kernel Misc
Tracing
Reference
- Linux Tracing Technologies
- Unified Tracing Platform - Bringing tracing together
- Linux tracing systems & how they fit together
- Linux tracing - kprobe, uprobe and tracepoint
- Kprobe-based Event Tracing
- Uprobe-tracer: Uprobe-based Event Tracing
eBPF
XDP(eXpress Data Path)
DPDK(Data Plane Development Kit)
Sysctl
Security
Security
- LSM
- /sys/kernel/security/lsm
- Capabilities(capable)
- CGroup(Physical Resource)
- cgroup-tools
- Related
- nice
- ulimit
- /etc/security/limits.conf
- Namespace(OS Resource)
- unshare/nsenter
- /proc/$PID/ns
- MAC & DAC
Password
- $id$salt$encrypted password
- 1 MD5
- 5 SHA256
- 6 SHA512
- man shadow
- man crypt
- openssl passwd
Performance
Target
- 从硬件和软件两方面分析软件性能瓶颈
- 提高程序运行效率,节省时间
- 节省成本,防止无限扩容
- 提高用户满意度
Units
- CPU
- CPU Status
- sy/system
- us/user
- ni/nice
- id/idle
- wa/wait
- hi/hard interrupt
- si/soft interrupt
- st/steal time(Hypervisor Wait CPU Time)
- Load Average
- Process LifeCycle
- Context Switch
- 系统指令
- 内存
- 打开的文件
- Interrupt
- /proc/interrupts
- Hyper Threading
- CPU Status
- Memory
- IO
- Storage
- Network
Reference
- http://www.brendangregg.com/
- 《Linux性能优化》
Tools
- sysctl/ulimit