Is Rust Faster Than C?

Is Rust Faster Than C?

Recently, someone on Reddit asked: Under the same conditions, what method would allow Rust to achieve better performance than C? I think this is a great and interesting question! It is actually quite difficult to answer because it ultimately depends on the specific meaning of “the same conditions”. I believe this also makes comparisons between … Read more

How to Directly Control Hardware with C Language? Pointers, Memory, and Registers

How to Directly Control Hardware with C Language? Pointers, Memory, and Registers

Hello everyone, I am Xiao Feng Ge. This will be a series of articles related to the C language. In the previous article, we learned why we should use C language to develop operating systems. In this article, we will look at how C language controls hardware. The Design Philosophy of C Language The design … Read more

How C Language Directly Controls Hardware: Pointers, Memory, and Registers

How C Language Directly Controls Hardware: Pointers, Memory, and Registers

Hello everyone, I am Xiao Feng Ge, and today we will explore how the C language controls hardware. The Design Philosophy of C Language The design philosophy of C can be summarized as “trust the programmer“. Unlike many modern programming languages, C imposes very few restrictions on the behavior of the programmer,it assumes that the … Read more

Rust 1.87.0 Official Release & 10th Anniversary of Rust 1.0

Rust 1.87.0 Official Release & 10th Anniversary of Rust 1.0

OSCHINA ↑ Click the blue text to follow us May 15 marks the 10th anniversary of the release of Rust 1.0. The Rust project developers held a “Rust 10th Anniversary” celebration in Utrecht, Netherlands, and released the new version 1.87.0 on the same day. The main new features of the new version include: Standard library … Read more

How to Operate CPU and Peripheral Registers in the Kernel

How to Operate CPU and Peripheral Registers in the Kernel

01 ARM Cortex-A9 Registers For the ARM Cortex-A9 processor, its registers mainly consist of two parts: general-purpose registers and system control registers. The general-purpose registers shown in the figure above are primarily used during code execution, allowing the CPU to execute code and perform related arithmetic operations. During debugging, the registers of particular interest are … Read more

C Language Special: extern, volatile, and inline

C Language Special: extern, volatile, and inline

In the C language, <span>extern</span>, <span>volatile</span>, and <span>inline</span> are three widely used keywords, each related to cross-file variable declarations, compiler optimization control, and function inlining. Mastering their usage can effectively enhance code structure, stability, and performance. 1. extern (External Variable Declaration) <span>extern</span> is used to declare global variables or functions defined in other files, enabling … Read more

CPU Virtualization Series: VM Entry and Exit

CPU Virtualization Series: VM Entry and Exit

Wang Baisheng, Xie Guangjun Reading time: 8 minutes Quick read: 3 minutes This article is excerpted from the book “In-Depth Exploration of Linux System Virtualization: Principles and Implementation” written by Wang Baisheng and Xie Guangjun, focusing on how the virtual CPU switches between Host mode and Guest mode, and how KVM and the physical CPU … Read more