Origins of the C programming language
- C was closly tied with the Unix operating system.
- C is a small,simple language.
- C was designed for a practical purpose.
Programs Are Translated by Other Programs into Different Forms

1.4 Processors Read and Interpret Instructions Stored in Memory

1.4.1 Hardware Organization of a System
Buses
Running throughouts the system is a collection of electrical conduits called buses that carry bytes of information back and forth between the components.
Buses are typically designed to transfer fixed-size chunk of bytes known as words.The number of bytes in a word (the word size) is a fundamental system parameter that varies across systems.Most machines today have word size of either 4 bytes(32 bits) or 8 bytes(64bits).
I/O Devices
Input/output(I/O) devices are the system's connection to the external world.
Each I/O device is connected to the I/O bus by either a controller or an adapter.
Controllers are chip sets in the device itself or on the system’s main printed circuit board (often called the motherboard). An adapter is a card that plugs into a slot on the motherboard
Main Memory
The main memory is a temporary storage device that holds both a program and the data it manipulates while the processor is executing the program.
main memory consists of a collection of dynamic random access memory(DRAM)
Processor
The central processing unit(CPU) is the engine that interprets (or executes) instructions stored in main memory.At its core is a word-size storage device (or register) called the program counter (PC).
- Load: Copy a byte or a word from main memory into a register, overwriting the previous contents of the register.
- Store: Copy a byte or a word from a register to a location in main memory, overwriting the previous contents of that location.
- Operate: Copy the contents of two registers to the ALU, perform an arithmetic operation on the two words, and store the result in a register, overwriting the previous contents of that register.
- Jump: Extract a word from the instruction itself and copy that word into the program counter (PC), overwriting the previous value of the PC.
1.4.2 Running the hello Program

Using a technique known as direct memory access (DMA) , the data travel directly from disk to main memory, without passing through the processor.
本文介绍了C语言的起源及其与Unix操作系统的紧密联系。C语言以其简洁实用的设计成为编程界的基石。文章深入探讨了计算机系统的硬件组织,包括总线、处理器、内存和I/O设备的工作原理,并详细阐述了处理器如何通过加载、存储、运算和跳转指令来执行程序。以hello程序为例,展示了程序从磁盘到内存的直接内存访问过程。
133

被折叠的 条评论
为什么被折叠?



