Understanding CPUs, OS Layers, and Interfaces: A Visual Guide
This article provides a comprehensive visual overview of CPU architecture, instruction sets, operating system purposes, programming layers, privilege rings, execution modes, user interfaces, and the distinction between ABI and API, helping readers grasp core computing concepts in a structured manner.
1. CPU
1.1 CPU and Instruction Set
CPU consists of an arithmetic unit and a control unit.
CPU instructions
Different operations are performed by different execution units provided by the instruction set.
Programmers generally write code targeting the operating system.
Diagram:
2. Human and Machine
All relationships are illustrated in the accompanying diagram.
Diagram:
3. OS
3.1 Purpose and Functions of an OS
OS : Operating System
System Call (Syscall)
General purposes and functions of an OS
Diagram:
3.2 Programming Layers
Hardware Specification : varies across vendors, making APIs inconsistent.
System Calls : few in number but highly refined.
Library Calls : provide higher‑level functionality built on lower‑level calls, typically C/C++ libraries.
Diagram:
3.3 Instruction Rings
From inside to outside: Ring 0, Ring 1, Ring 2, Ring 3.
Ring 0 contains privileged instructions, executable only by the OS.
Ring 1 and Ring 2 are historically unused.
Ring 3 contains normal instructions used by applications.
Special case example: mkdir /home/test requires kernel permission.
Diagram:
3.4 Program Execution Modes
User Space (us)
Kernel Space (system space)
Diagram:
4. UI: User Interface
For an OS, UI is the user interface; for users, UI is the front‑end.
GUI : Graphical User Interface
CLI : Command Line Interface
Diagram:
5. ABI and API
ABI : Application Binary Interface – defines low‑level interfaces between programs and the OS or other programs.
API : Application Programming Interface – a set of predefined functions that allow developers to use software or hardware capabilities without needing source code access.
Diagram:
6. Mainstream CPU Architectures
Diagram:
7. Popular OS Branches
Diagram:
Original source: https://segmentfault.com/a/1190000004936765
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
