Linux
Table of Contents
- Introduction
- Endianness
- ELF
- KVM and QEMU
- Shell Identification and Change
- Disks and Partitions
- AMD
- Systemctl
- PCIe
- SoC
- Gathering System Information
- CPU Speed and CPU Clock
- NUMA
- RAID
- DMI
- Memory
- Niceness
- Context Switch
- Protection Rings and Minix
- Compatibility Software
- Northbridge and Southbridge
- Interrupts and Exceptions
- ISA
- X Server
- Desktop Environments
- Locality of Reference
- Processing Hardware
- Miscellaneous
Introduction
- The Missing Semester of Your CS Education
- Putting the “You” in CPU
- Modern Operating Systems by Andrew Tanenbaum (4th Edition)
- Shell and Shell scripting
- Read the Source Code of Shell Commands
- What is POSIX? Why Does it Matter to Linux/UNIX Users?
- C programming
- Networking
- Operating System Boot Process
- Linux source code cross reference
- Latency numbers every programmer should know
- Assembly
Endianness
ELF
- ELF = Extensible and Linkable Format
- In-depth: ELF - The Extensible & Linkable Format
KVM and QEMU
Shell Identification and Change
- Arrow keys, Home, End, tab-complete keys not working in shell
- How do I check which shell I am using?
-
$0 is the name of the running process. If you use it inside of a shell then it will return the name of the shell. If you use it inside of a script, it will be the name of the script.
-
Disks and Partitions
- What Is
/dev/sda
in Linux? - How Is
/dev/vda
Different From/dev/sda
? - Understanding partition table with
sda1
,sda2
,sda5
- Difference between
sdX
andvdX
- What is the difference between
/dev/sda
and/dev/hda
? - Names for ATA and SATA disks in Linux
- How to list disks, partitions and filesystems in Linux?
Mounting, Partitioning and Formatting
- Mounting a device — role of /dev, /media and /mnt, and the mount command
- Correct way to mount a hard drive
- Mount Drives in Ubuntu Command Line
- Deleting All Partitions From the Command Line
- How to Format Disk Partitions in Linux
- Quickest way to wipe an SSD clean of all its partitions for repartitioning in Linux?
AMD
- AMD = Advanced Micro Devices
- Secrets of a $182 Billion Chip Maker: AMD’s Labs
- AMD’s CPU Analysis Lab Full Interview (Lasers, Scopes, & Silicon)
- AMD’s EPYC Rome Chips Crash After 1,044 Days of Uptime
- AMD CCD and CCX in Ryzen Processors Explained
- How AMD Zen Almost Didn’t Make It
AMD History
- AMD: How It All Began
- Intel & AMD: The First 30 Years
- AMD: The Incredible Adventure Continues
- How AMD Left GlobalFoundries for TSMC
Systemctl
PCIe
- PCIe = Peripheral Component Interconnect Express
- Used to connect hardware devices like graphics cards, NICs, sound cards, capture cards, etc to the motherboard.
- PCI Express (PCIe) 3.0
- Explaining PCIe Slots
- Understanding M.2, SATA, PCIe and NVMe SSDs
- SATA vs SAS vs PCIe
SoC
- SoC = System on Chip
- What is a System on Chip (SoC)?
- What is the difference between a motherboard and an SOC?
Gathering System Information
CPU Speed and CPU Clock
- What is Processor Speed and Why Does It Matter?
- What Is Clock Speed?
- Intructions vs cycles per second - what is actually measured in Hertz?
- Difference between clock cycle, machine cycle and instruction cycle of the CPU
- What is a clock cycle and clock speed?
- Why do we need a CPU clock
- Inside a CPU, what happens in a single clock cycle?
NUMA
- NUMA = Non-Uniform Memory Access
- What is NUMA?
- NUMA (Wikipedia)
RAID
- RAID = Redundant Array of Independent Disks
- What is RAID Storage? Meaning, Types, and Working
- Should I use Raid 6 or Raid Z2? What are the advantages/disadvantages of each?
- RAIDZ Levels
- ZFS 101—Understanding ZFS storage and performance
- ZFS RAIDZ vs. traditional RAID
- Linux RAID vs ZFS RAID
- Configuring ZFS on Ubuntu 20.04
DMI
- DMI = Desktop Management Information
- Access this data using the command
dmidecode
. - What is DMI?
- DMI vs SMBIOS
Memory
Memory Layout and Compilers
- Compiler, Assembler, Linker and Loader: A Brief Story
- Anatomy of a Program in Memory
- Going over all compilation steps: github.com/HarshKapadia2/compilation-examples
- Memory Layout of C Programs
- What and where are the stack and heap?
- Memory Segments
- Stack Frames: Understand stack memory management
- BSS
- BSS = Block Started by Symbol
- Why is the .bss segment required?
- Wikipedia: BSS in C
- What happens when a variable in the BSS section is assigned a value?
- Unintialized variables (Eg:
char arr[20];
,int num_1;
) are stored in the BSS (Block Started by Symbol) section of an ELF file. - In the ELF file, variables in the BSS section don’t occupy any space other than the space required to describe the variable itself, i.e., any of the space requested to be allocated for the variable is not allocated.
- Eg: If
char arr[5000];
is declared, then it will be stored in the BSS section, but will only occupy a few bytes required to describe the variable itself and will NOT occupy 5000 bytes of space in the file as requested in the variable declaraion.
- Eg: If
- Once the ELF is executed, the variables in the BSS section will be mapped to the BSS segment (in the virtual address space) of the process in the RAM by the Loader.
- The variables in the BSS segment will be initialized to zero and will occupy the space requested.
- Eg: Continuing the previous example,
char arr[5000];
will now occupy 5000 bytes of requested space in the BSS segment of the process. - Once the process has been loaded in the memory (i.e., we start dealing with segments), the difference between the ‘Data’ and ‘BSS’ sections becomes immaterial, because the variables behave the same.
- Eg: Continuing the previous example,
- Unintialized variables (Eg:
- The Origins of Process Memory - Exploring the Use of Various Memory Allocators in Linux C
- demystifying the secret structure you’ve been using all along (stack)
- Smashing the Stack for Fun and Profit (UCB hosted)
- do you understand how “return” works?
- More on compilers
- ‘Compilers’ bullet point under the ‘C’ heading in the dev project
Memory Bandwidth
DIMM
- DIMM = Dual In-line Memory Module
- What Is a Dual In-line Memory Module (DIMM)? Meaning, Characteristics, and Types
- Single Rank vs Dual Rank RAM: Differences & Performance Impact
Memory Interleaving
Niceness
Context Switch
Protection Rings and Minix
- Anil Harwani told us about the Tanenbaum-Torvalds debate on OTC CatchUp #145, which was an argument where Tanenbaum was trying to prove why a Microkernel architecture (Tanenbaum’s OS Minix had that architecture.) is better than a Monolithic Kernel architecture that Torvald’s Linux has.
- Kernel architectures
- Minix
- Tanenbaum initially created the Minix Operating System for educational purposes.
- Anil also told us how Minix was found inside the Intel Management Engine, which was a big deal, as Minix, whose goal was never to have military-grade security, was being used on billions of machines at a privilege level that is higher than the kernel, and that made billions of machines vulnerable. Also, this implies that Minix is the most used OS on the planet.
- Replace Your Exploit-Ridden Firmware with Linux
- The first 12 minutes of this video is sufficient to understand how vulnerable systems are.
- Protection Rings (-3, -2, -1, 0, 1, 2, 3)
- MINIX: Intel’s hidden in-chip operating system
- What is MINIX? The most popular OS in the world, thanks to Intel
- Tanenbaum also wrote An Open Letter to Intel.
- Replace Your Exploit-Ridden Firmware with Linux
- USBAnywhere and the History of Baseboard Management Controllers (BMCs)
Compatibility Software
Northbridge and Southbridge
- What are the north and south bridges of a motherboard?
- Chipsets Explained – Northbridge and Southbridge
Interrupts and Exceptions
- Interrupts vs Exceptions (Faults, Traps and Aborts)
- External Interrupts in the x86 system: Interrupt controller evolution (PIC, PIR, APIC, LAPIC, MSI, etc.)
ISA
- ISA = Instruction Set Architecture
- Instruction Set Architectures
X Server
Desktop Environments
- What is KDE, GTK, GTK+, QT, and/or GNOME?
- Full form of KDE
- Full form of Qt
- GNOME: GNU Network Object Model Environment
- KDE Vs GNOME Vs Xfce; Which is the Best Desktop Environment and Why?
- GNOME vs Xfce vs KDE
- Is there a breakdown of the differences between GNOME, KDE, and Xfce desktop environments?
- What is gdm3, kdm, lightdm? How to install and remove them?
Locality of Reference
- Locality of reference
- Mainly Temporal and Spatial Locality
- Non-Temporal Data
Processing Hardware
- CPU vs GPU vs TPU vs DPU vs QPU
- CPU, GPU…..DPU?
- CPU vs GPU (What’s the Difference?)
- What’s the Difference Between an APU, CPU, and GPU?
- FPGA vs CPU vs GPU vs Microcontroller: How Do They Fit into the Processing Jigsaw Puzzle?
- What is an NPU? Here’s why everyone’s suddenly talking about them
- AI 101: GPU vs. TPU vs. NPU (+ ASICs vs FPGAs)