002 computer composition principle

Principles of Computer's

The computer part is divided into five, respectively, the controller, the arithmetic unit, memory, input devices, output devices. Wherein the controller is a computer operator + a central processing unit (CPU), equivalent to the human brain.

A controller

Computer command system, the brain commanding the operation of the body organs, but the brain is not arbitrary command body movement, the brain only after receiving instructions guess will be accused of physical action

Second, operator

Arithmetic operation is a computer system. In addition to directing the brain, in operation all the time, i.e. to achieve arithmetic and logic operations.

1, the arithmetic operation: 1 + 1 = 2 is similar to

2, the logic operation: Similar encountered mad, kill him or run

Third, the controller operator + (a computer central processing unit CPU)

similar:

Eat flow example.

  1. When you eat, eat brain will accept instruction, after translating instructions into action (controller) you need to make body
  2. If you eat food, the use of a spoon; if you eat Chinese food, the use of chopsticks (operator).

Fourth, the memory

Calculator storage system, note that: either format memory or external memory, data is stored in the form of a computer 01, 01 are 0 and 1 by the voltage frequency control. A computer storage unit is called binary 1bit, 8bit = 1Bytes called a byte, 1024Bytes = 1kb, 1024kb = 1MB, 1024MB = 1GB, 1024GB = 1TB, 1024TB = 1PB.

The following figure shows the memory currently used in the market, it can be seen from the figure memory speed, capacity and price are mutually contradictory.

4.1 memory (main memory)

Computer memory is a hardware device that temporarily stores data, since the memory read data faster, CPU instructions issued to the memory will be transmitted directly, i.e., CPU and memory will interact directly with a common RAM memory.

1. advantage (compared to the external memory):

1. fast access speed.

  1. Disadvantages (compared to external memory):

    1. Small capacity.

    2. Since the memory based on the electrical, data storage, so the data will disappear immediately after the power failure.

4.2 external memory

External memory is a computer hardware device for storing data permanently, because of the large capacity external memory, the external memory is mainly used for large volumes of data storage software occupied. When the need to use a piece of software on the external memory, the CPU instructions issued to the memory needs to be transmitted, the software information read from the memory in the external memory, i.e., does not interact directly with the external memory CPU.

Common outside there tape, disk, U disk and so on.

1. Advantages (more in memory):

1. capacity Large

2. The data may be permanently stored.

2. disadvantage (cross in memory):

1. slow access speed

Five, CPU + memory + external memory (computer three core components)

Open flow example of computer qq:

1. Double-click the icon qq, CPU Xianxiang memory fetch command is issued. (CPU + memory)

2. Remove the memory instruction execution from QQ hardware (hard disk)

3. The controller analyzes the command and inform the operator running QQ operating (control)

4. The operator series of arithmetic and logic operations to open QQ, QQ and read code from the hardware memory (RAM operator + + drive)

Code (RAM) 5. QQ computer running in memory

6. If at this time to accept a file from the QQ friends and download the file will be permanently stored on the hard disk (HDD)

7. CPU issues an instruction to the memory when closing off QQ QQ, QQ and clear off memory QQ codes (memory) memory

Sixth, the input device

Computer input information (programs, data, voice, text, graphics, image) apparatus

Common input devices: keyboard, mouse, graphics scanners, touch screens, bar code input, light pen and so on. External memory (u disk, etc.) is also an input device.

Seven output device

Information output device of the computer

Common output devices: displays, printers, plotters, also an external memory output apparatus.

Note that since the external memory that is an input device, is also an output device, and therefore is also called external memory IO device, where I is the Input (Input), O is the Output (output).

Eight, five major components of the computer

As a complementary part of the election watch parts, mainly to introduce the computer to start the process.

8.1 CPU-related

Multi-core CPU: multiple CPU, the computer can do multiple events at the same time. For example, a quad-core CPU can do four things at once.

X86-64 bit: X86 is a type of CPU, 64 denotes a CPU can take every 64-bit binary number. It denotes a CPU X86-32 each take 32-bit binary numbers. CPU has a downward compatibility, i.e., 64-bit 32-bit computer can download the software, and the 32-bit 64-bit software download software data loss.

8.2 memory-related (to know)

Memory ROM: read-only memory ROM (not write) was completed at the factory programmed, and can no longer be modified. It is generally stored BIOS (Basic input output system) program, which is generally used to start the computer, for controlling or processing the underlying device.

CMOS memory: CMOS memory of a computer built-in battery-powered drive, which is generally held to update the current time and date, that is to say, even if the computer is not charged, will continuously update time; it also can store a boot disk path . (When installed will generally tell the computer operating system in the computer's location, such as C: /)

8.3 bus

Bus human equivalent of nerves, blood vessels, all hardware devices connected to the computer.

8.4 Start the computer process (to understand)

  1. Power on the computer.

  2. BIOS running, detect hardware: CPU, memory, hard disk light.

  3. BIOS reads the parameters in the CMOS memory, select the boot device and the like.

  4. Reading the contents of the first sector from the boot device.

  5. The partition information reading module bootloader boot loader, the operating system starts.

  6. The operating system asks BIOS, to obtain configuration information. For each device, the system will check whether there is a device driver, and if not, the system user will be required in accordance with the device driver, once you have all the device drivers, the operating system kernel will be transferred to them, then the initial relevant form (such as process table.

8.5 Hard Disks Work

Works now divided into mechanical hard disk drives and solid state drives on the market two broad categories, we start from these two categories of students and introduce hard drive

8.6 mechanical hard drive

The main mechanical hard disk with mechanical arms, tracks and sectors, then we will regard these three works on the mechanical hard drive.

  • Robot: mechanical hard disk data read by the robot arm, the robot arm is the head end.

  • Tracks: a track circle is a magnetic surface of a mechanical hard disk, for storing data track.

  • 扇区:扇区的最小单位通常为512KB(由于磁盘大小不断增大,也有部分厂商设定每个扇区的大小是4096字节)。为了减小IO操作,机械硬盘也会将多个相邻的扇区组合在一起,形成一个块,这个块便就是我们在Windows系统中看到的C、D分区。

  • 平均寻道时间:由于数据存放在磁道上,因此机械手臂需要读取数据首先要找到磁道。受限于工业水平的限制,目前机械手臂找到磁道的时间为5ms,这个时间被称为平均寻道时间。

  • 平均延迟时间:机械手臂寻道之后,需要寻找数据。由于数据的位置是不确定的,而目前的机械硬盘寻找数据会从硬盘的头部扫描到尾部。以7200r/min的硬盘为例,如果碰巧在硬盘头部找到数据,时间约为0ms;如果在硬盘尾部找到数据,时间约为8.3ms,因此我们采用一个平均时间4.15ms作为机械手臂在磁道找到数据的时间,这个时间被称为平均延迟时间。

    $$
    7200/60 = 120r/s \

    \frac{1}{120} = 0.00833s = 8.3ms \

    \frac{0.83+0}{2} = 4.15 ms \

    \text{寻找数据的时间} = 4.15+5 = 9.15ms \
    $$

补充:平均延迟时间: 机械手臂到磁盘的时间 5ms (固态硬盘没有这个时间)

平均寻数据的时间: (0 + 8.3) /2

从上述描述可以得出:

寻找数据的时间=平均寻道时间+平均延迟时间寻找数据的时间=平均寻道时间+平均延迟时间

8.7 固态硬盘

随着人们对数据需求增多,存储系统的瓶颈越来越明显。而在嵌入式领域移动设备和工业自动化控制等恶劣环境下,传统硬盘机械结构已经无法满足要求,而所有这一切随着固态存储(SSD)的到来而发生了改变。

传统的机械硬盘(HDD)运行主要是靠机械驱动头,包括马达、盘片、磁头摇臂等必需的机械部件,它必须在快速旋转的磁盘上移动至访问位置,至少95%的时间都消耗在机械部件的动作上。SSD却不同机械构造,无需移动的部件,主要由主控与闪存芯片组成的SSD可以以更快速度和准确性访问驱动器到任何位置。传统机械硬盘必须得依靠主轴主机、磁头和磁头臂来找到位置,而SSD用集成的电路代替了物理旋转磁盘,访问数据的时间及延迟远远超过了机械硬盘。SSD有如此的“神速”,完全得益于内部的组成部件:主控--闪存--固件算法。SSD通过这套组成部件,让数据以电荷的方式存储在每个NAND存储单元内。

上面讲了这么多,牢记一点:

固态硬盘是基于固态电子(SSD,断电数据也会保留)和算法实现数据存储的。

作  者:豆瓣酱瓣豆
出  处:https://www.cnblogs.com/chenziqing/
查看其它博文请点击:https://www.cnblogs.com/chenziqing/
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!有不懂的可以联系我哦。

微信:

Guess you like

Origin www.cnblogs.com/chenziqing/p/11243698.html