1.4.1Hardware components of the system
Throughout the system is an electronic pipe called the bus, which carries information directly and is responsible for the transmission between the various components. Usually the bus is designed to transmit fixed length byte blocks, that is, the word (word).
The number of bytes in the word (word length) is a basic system parameter. Most machines now have word lengths of 4 bytes (4*8=32 bits) or 8 bytes (8*8=64 bits).
I/O(Input / output devices are the links between the system and the outside world. Common systems have four I/O devices: keyboards and mice for book input/output, monitors for user output, and long-term data storage
The program’s disk drive (also known as disk), the first executable program Hello is stored on disk.
Each I/O device is connected to the I/O bus through a controller or adapter, and the difference between the controller and adapter is the way they are encapsulated. The controller is the main printed circuit board of the I/O device or the system.
A chipset called the motherboard. The adapter is a card inserted on the motherboard slot. Their functions are to transfer information between I/O bus and I/O device.
Main memory is a temporary storage device used to store data processed by programs and programs when processing execution programs. Physically, main memory consists of a set of dynamic random access memory chips (DRAM).Logically, memory is a linear array of bytes, each with its own unique address (array index), which starts from scratch. In general, every item that constitutes a program.
Machine instructions are made up of different numbers of bytes.
Central Processing Unit (CPU), referred to as processor, is an engine that interprets (or executes) instructions stored in main memory. The core of a processor is a one-word storage device (or register), called a program counter (PC).
At any point in time, the PC points to a machine language instruction in main memory (the address containing that instruction).
From the time the system is powered on to the breakpoint, the processor continuously executes the instruction pointed by the program counter, and updates the program counter to point to the next instruction. The processor looks like it executed on a very simple instruction.
The model is operated by the instruction set structure. In this model, instructions are executed in strict order, and execution of an instruction involves a series of steps.
The processor reads instructions from the program counter to memory, interprets the bits in the instructions, performs the simple operation of the instructions, and then updates the PC to point to the next instruction, which is not necessarily adjacent to the instruction just executed in memory.
Not many of these simple operations revolve around main memory, register files, and arithmetic Logic Unit — ALU. Register file is a small storage device, from some
The register of a single word length has a unique name for each register. ALU accounting calculates new data and address values.
CPU The following simple operations may be performed at the request of instructions.
Loading: Copy a byte or word from main memory to the register, overwriting the original contents of the register.
Storage: Copy a byte or word from a register to a location in main memory to overwrite the original content at that location.
Operation: Copy the contents of the two registers to ALU, which does arithmetic on the two words and stores the results in a register to cover the original contents of the register.
Jump: Extract a word from the instruction itself and copy it into a program counter (PC) to overwrite the original value in the PC.
The instruction set architecture of the processor is distinguished from the microarchitecture of the processor: the instruction set architecture describes the effect of each machine code instruction. The microarchitecture describes how the processor is actually implemented.
1.4.2Run Hello program
Steps: After typing the string “. / hello” on the keyboard – & gt; the shell program reads the characters one by one into the register and puts them in memory – & gt; the keyboard returns, and the shell knows we’ve finished typing the command – & gt; the shell executes a series of instructionsLoad the executable Hello file, which copies the code and data from the Hello object file from disk to main memory. The data includes the string “Hello, world\n”, which will eventually be exported.
Direct Memory Access=DMA–Direct memory access, data can be reached directly from disk to main memory without processor.
Main Memory, Memory, External Memory, Auxiliary Memory: Source: https://blog.csdn.net/not_repeat/article/details/51570681
Main memory = physical memory refers to the memory bar in our computer.
External storage = auxiliary storage such as hard disk U disk and floppy disk.
Memory occupies a very important position in the structure of computer. For a computer, with memory, it has the ability to remember, so that the computer can store programs and data.
The types of memory can be divided into main memory and auxiliary memory.
The main memory is also referred to as internal memory (referred to as memory).
Memory, also known as main memory, is a storage space directly addressable by CPU, which is characterized by fast access speed. Memory is the main component of the computer, which is relative to the external memory.
Semiconductor memory is generally used, including random access memory (RAM), read-only memory (ROM) and high-level cache (Cache).
RAM: (Random Access Memory) We can not only read data, but also write data. But when the machine power is off, the data will be lost. Memory (SIMM) is to integrate RAM blocks into a small piece of electricity.On the road board.
ROM: (Read Only Memory) It is the permanent storage of data or programs, can not be changed, can only read. Even if the machine is cut off, the data will not be lost.
Advanced Cache: It is between the CPU and memory, commonly with a primary cache (L1), secondary cache (L2), and tertiary cache (L3) (generally existing in the Intel family). It reads and writes faster than memory. When CPU reads or writes data in memory, data is read and written faster.It is stored in the Advanced Buffer Memory, and the next time the data is accessed, the CPU reads the Advanced Buffer Memory directly instead of slower memory.
Auxiliary memory is also known as external memory (external memory).
It refers to memory other than CPU cache and computer memory.
Disks and hard drives:
It’s not a concept. The two are intersecting.
A disk, a tape-like device in the computer’s external memory, holds a circular magnetic disc in a square sealed box to prevent scratches on the disk surface and loss of data. There are floppy disks and hard disks. Hard disks are mechanical hard disks.
Hard disk is one of the main storage media of computer, consisting of one or more aluminum or glass discs. The discs are covered with ferromagnetic materials. Hard disks include solid state disks (SSD disks, new hard disks), mechanical disks (HDD traditional hard disks), hybrid disks (HHD based on a traditional mechanical hard disk).New hard disk produced by disk. SSDs are stored in flash grains, HDDs are stored in magnetic discs, and hybrid hard disks (HHD: Hybrid Hard Disk) are hard disks that integrate magnetic hard disks with flash memory. Most hard drives are fixed hard drives.It is hermetically sealed in a hard disk drive.