Linux Learning Basics 01--Hardware Basics

Source: Internet
Author: User
Tags arithmetic

Recently look at Marco Linux operations video, although I am doing software testing, but recently also on the operations of things very interesting, because previously always write test framework code, thanks to automated test code. Discover that you know little about things. My goal is to be a test architect, but just write code and never reach that goal. The test architect needs to have a deep understanding of each computer field. So after learning MySQL tuning for a while, now start looking at Marco Linux videos. Learn the knowledge of operation and maintenance. Here is a very surprising place is that operations need to be a lot of things, but also very deep. Why is it not so common for domestic ops to be tested? That's a problem. Starting today, I'll keep a record of what I've learned. I just record something that I think is important.

  1. Approximate concept

    Our computer has 5 components: controller, arithmetic, memory, input device, output device. Where the controller and the operator make up our cup. Memory is our main memory, which is RAM. Input devices and output devices are devices like our keyboard mouse and monitor.

  2. Verbose concept

    Operator: an operator is the device that our cups use to calculate. We know that binary algorithms are used in our computers. The pin connected to the CPU transmits the electrical signal, the power-on value is 1, and the circuit is turned off at 0. Passing data to an operator in such a way. In the case of accumulators, we have multiple accumulators in our cups and make up our arithmetic. Each accumulator has two lines that pass through Addend and Summand, along with lines that will be calculated out of the data. This makes up our accumulator. And when we do the arithmetic, such as the decimal 9+9. Such an operation requires rounding. So we need to pass the data in addition to the results will also need to store "carry", so our register has appeared. A register is used to store such data. The register is also the fastest storage device, which can be at the same speed as the CPU.

    Controller: With an operator or not enough, we need to know where the data comes from and where to go. And where the instruction set of the manipulation operation is taken. So we have the controller. The controller is responsible for extracting the instruction and data for the operation from memory.

    Main memory: That is, where we store the data. Let's talk about the process of system boot self-detection. A computer program is a collection of instruction sets plus data, and we are able to run programs because the controller transmits the data and instruction sets in main memory to an operator. But when we turned it on, there was nothing in our memory. So how do we run the boot self-test? In addition to the main memory (RAM) there is a ROM and another hardware storage device, this storage device has a boot self-detection instruction set, the boot time it will use the hardware principle (what principle I do not know) to put the instruction set in main memory. These instruction sets are to detect your mouse, keyboard. So the controller will know how to boot from the test.

    Input devices and output devices: These two devices are well understood, our mouse keyboard is the input device, the display is the output device. Both the NIC and the hard drive are both input and output devices.

  3. Interrupt

    Just said the role of 5 large parts, wherein we know that the memory of the data and instruction set is read to the operator by the controller. The memory and the controller have a front-end bus connected, then our input is how to tell the CPU I now have an operation? The answer is to interrupt. We have an interrupt controller connected to the CPU while interrupting the controller with each input necklace. Whenever we click the mouse, there will be an interrupt, the CPU receives the interrupt signal will stop the work on the hand to handle the interrupt operation. Because the interrupt signal has a high priority, the CPU stops working on the hand, so it is called an interrupt. It is conceivable that interrupts are an operation that consumes CPU resources very much. This is why in the server if the network traffic is too large, the CPU consumption will be very high, because the network card is also a input, will also produce interrupt signal.

  4. CPU caching and Local laws

    We know that CPU time is much faster than memory. For example, if the CPU is able to make 10 requests to memory in a second, memory can only return 11 requests. What about this time? The CPU resources are not wasted. So this time we have the CPU's first-level cache and the level two cache. Buffering in the CPU and memory. The CPU cache is much faster than the memory block but slower than the CPU. But this has greatly alleviated the problem of too slow memory. If we want the CPU cache to work, we need our local rules. Local laws have time local laws and local laws of space:

    Time local law: Recently read data may also be read in the later time.

    Spatial local law: data that is adjacent to it when reading a data is also likely to be read.

    With these two laws, our cache will "pre-read" The In-memory data into the cache for CPU use. This will increase the speed.

  5. CPU Type

    ARM: Power saving, performance

    X86:inter

    X64:inter

    Alpha

    Itanium

    Power:ibm

    M68000 also called m68k.

    Powerpc:inter, Apple and IBM are designed to be slightly less powerful than power


There are many others that are not in the one by one column count. Here's just a record of what I think is important.

This article is from the Linux learning blog, so be sure to keep this source http://884482.blog.51cto.com/874482/1690543

Linux Learning Basics 01--Hardware Basics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.