Skip to content

CS#

SDLC methodology

The abbreviation SDLC stands for Software Development Life Cycle. It is frequently used in technology to refer to the entire process of technology innovation and support.

In software engineering, a software development process or software development life cycle is a process of planning and managing software development. It typically involves dividing software development work into smaller, parallel, or sequential steps or sub-processes to improve design and/or product management.

Most modern development processes can be vaguely described as agile. Other methodologies include waterfall, prototyping, iterative and incremental development, spiral development, rapid application development, and extreme programming.

Abstraction & Virtualization

In software engineering and computer science, abstraction is the process of generalizing concrete details, such as attributes, away from the study of objects and systems to focus attention on details of greater importance. Abstraction is a fundamental concept in computer science and software engineering, especially within the object-oriented programming paradigm.

In computing, virtualization (refer to IBM, AWS) is the act of creating a virtual (rather than actual) version of something at the same abstraction level, including virtual computer hardware platforms, storage devices, and computer network resources.

CPU Architectures

有5种指令集最为常见,它们构成了处理器领域的5朵金花。

  1. x86——硕大的大象
  2. ARM——稳扎稳打的蚁群
  3. MIPS——优雅的孔雀
  4. Power——昔日的贵族
  5. C6000——偏安一隅的独立王国

This article is about the collection of datasheet/textbooks/references on the three major mainstream CPUs.

计算机中有符号数的表示

对于无符号整数,一般来说,所有的数位都被用来表示数值。
对于带符号整数,数位被划分为符号位(只能占一位)与数值位(剩余的其它位)。

符号位的权值有不同的解释:

  1. 权值是零(符号位是“1”则表示数值为负),称为“符号-绝对值”模式(Sign and magnitude)。
  2. 权值是 –(2N-1-1),“1的补码”方式(Ones’ complement)。
  3. 权值是 –2N-1,“2的补码”方式(Two's complement)。

Struct Alignment Specify

在上一篇《Struct Alignment Rule》中,我们梳理了结构体存储布局的“地址边界对齐限制”规则。
本篇介绍通过编译器 gcc/msvc 提供的扩展特性及 C/C++ 提供的一些语言特性来修改默认的对齐参数,并测试分析其作用效果。

  1. The packed attribute specifies that a structure member should have the smallest possible alignment.
  2. The aligned attribute specifies a minimum alignment for the variable or structure field, measured in bytes.
  3. -fpack-struct[=n]/#pragma pack(n) specifies the maximum alignment, structure members can potentially be unaligned.

Struct Alignment Rule

An object doesn't just need enough storage to hold its representation. In addition, on some machine architectures, the bytes used to hold it must have proper alignment for the hardware to access it efficiently.

Where alignment most often becomes visible is in object layouts: sometimes structs contain "holes" to improve alignment.

C/C++ Memory Alignment

One of the low-level features of C/C++ is the ability to specify the precise alignment of objects in memory to take maximum advantage of a specific hardware architecture. By default, the compiler aligns class and struct members on their size value.

Memory Address Alignment

One of the low-level features of C/C++ is the ability to specify the precise alignment of objects in memory to take maximum advantage of a specific hardware architecture. By default, the compiler aligns class and struct members on their size value.