Introduction to the principle of computer composition

Source: Internet
Author: User
principles of computer composition
This subject tells you what a computer is.
First, we can break down the computer into the most primitive parts--transistors. Transistor is a kind of semiconductor material, its most important function is half-guide: Can change the electric current, realize the switch of the circuit. For example, the computer's most basic and non-operational, can be made of transistors composed of electronic components. The difference in potential differences between transistors can reflect "binary data", that is, 0 and 1. Coupled with the capacitance and resistance, this binary data can be temporarily saved.
Combining these characteristics, Daniel found that the use of transistors as a precise mathematical calculation, can greatly improve the efficiency of the operation. For example, I have 2 capacitors, which are fully charged and without electricity, and release the electrical signals to them at the same time, and the capacitance will put the electrons out, passing through a particular logic circuit, such as with the door, and get 0 results. It is actually a similar principle to calculate the. I first design an addition circuit, the combination of a number of capacitors into the "digital" flow through the circuit, the results into the target capacitance, the results are obtained. Large-scale complex operations and so on.
The earliest computers were really complex circuit structures implemented with many junction transistors, and the desired output was obtained by controlling the input current. Later, it was found that this kind of computation can be abstracted into a variety of instructions in some form, without the design of complex circuits for each computation, as long as the invocation of the instruction can be achieved by any combination of computing, so the birth of the CPU. Only the CPU, each time you have to configure the input signal, it is too painful to do a paper tape input to the computer. Later found the paper tape is still very troublesome, so invented the input terminal and the corresponding storage device. Later found that a lot of data to temporarily save, for continuous computing use, so invented the memory. Then the development of PC has undergone countless changes, so that the computer step by step to the point of today, which is what you see now.
The course is very tortuous, perhaps the organization can organize them all into a long history, but the individual is certainly powerless.


Operating System
To sum up, the computer development to a certain extent, what things rely on artificial also is too tired.
For example, by inputting the device organization instructions to the CPU to calculate, you want to be able to find a fast input device (such as the keyboard), where you can see the results of input (such as screen), and then in a very convenient way to submit to the CPU (such as keys or instructions), so that the CPU to calculate, and then show the results (
Ideal is good, but such a complex process, manual management is not still very troublesome. Unless I construct a device that manages all of these devices, the motherboard is born.

Now the motherboard solves a lot of our problems, but I find that my needs are far from enough.
I wish I had written a program that could run on any machine.
I wish I could work while listening to music-that is, you can run multiple programs at the same time.
I want people to write silly x things that don't affect my job--multitasking control.
I hope that the various resources within the computer can be well organized, faster access.
I want my user interface to look better, use more conveniently, and be more powerful.
I am a small white user, do not understand anything, don't talk to me about these have no, I just like to operate in two can achieve what I want.
If these requirements are all done in the motherboard BIOS, it will be a disaster. Unless the BIOS is greatly tuned and altered, a large chunk of the operating system is partitioned, and complex architectural changes are completed.
Computer development To this extent, has long been a lot of institutions and manufacturers involved in the attempt to profit. They certainly do not ask the Computer Standards Committee and motherboard manufacturers to do so-called motherboard reform, but to write their own program-the operating system, to solve all these problems.

And the operating system came out, on the one hand took over the motherboard for the management of system resources, adding their own middle-tier-driver, on the other hand, the full use of human-computer interface--gui interface, has become an indispensable component of computers.
The operating system boots through the BIOS, starting as an application. We know that the essence of the program is to run a variety of instructions on the CPU, such as the operating system needs to put the modules on the hard disk into memory, is actually running a series of complex CPU instructions, The CPU instruction sends the instruction to the hard disk via the motherboard bus (which is actually the circuit of the delivery instruction), the hard drive then rotates the head through the chipset, reads the data into the cache, sends a signal to the CPU after completion (i.e. interrupts), the CPU receives this signal, The address of the signal in the Register is addressed (that is, we say the interrupt vector table), run the instruction in the address, found that the instruction is to send a copy of the instructions to the motherboard chipset, the motherboard will be under the guidance of the CPU constantly send signals, tell the hard disk cache discharge, and then the received electrical signals to the designated memory location, so Until a sequence of instructions for the CPU is completed.
Operating system plainly, that is, through a variety of CPU instructions, to achieve their own functions.
Of course, these instructions are not written in all, but through the programming language to complete the more easily identifiable logic, and then through the compiler to translate these logic into CPU instructions, which involves the compiler principle of things.

Since the operating system access to hardware through the CPU instructions to complete, then why do we feel that the operation is in charge of the hardware it. This involves one of the most essential features of the operating system: the control of the system resources.
All the programs we run are actually the operating systems that help us run them. Operating system behind a lot of work, such as the allocation of virtual address space, CPU time-sharing scheduling, hardware interrupt signal response and so on. This access to hardware resources is also scheduled through the operating system. For example, the operating system will improve the utilization of the magnetic head and reduce the time of the head steering by combining the hard disk reading and writing in a short time. Again, such as the access to memory address is controlled by the operating system, a program of memory address specific to where the memory bar, or the hard disk virtual memory, look at the operating system mood.

At this point, the operating system and hardware interaction is also introduced almost, more detailed things to refer to the operating system related books, such as "in-depth understanding of computer systems", "Linux kernel design and implementation", "UNIX environment Advanced Programming" and the like.


Data Structure
The function of data structure is to improve the utilization of hardware.
For example, the operating system needs to find the user application "office" in the location of the hard disk, blindly search the hard drive is certainly inefficient, this time a B + tree as an index, search office This word quickly, and then can quickly locate the office of the application file information, Then find the corresponding disk location in the file information.

Data structure of things to find this "Introduction to the algorithm", "Data structure and algorithm analysis" and so on.

Computer network
The computer network is divided into 3 blocks:
1. Hardware
Network cards, network cables, switches, which are used to process data.
2. Agreement
How data is communicated in the network. How to identify. How to ensure the correctness of the data.
I won't say more about these 2 pieces.

3. Operating system
This is the question of how to combine the computer network with the operating system.
For the operating system, the NIC is also a hardware resource. But the network is not only a kind of hardware, but a media portal. For example, operating system management hard disk, of course, not simply remember how big the hard disk, and then everything to the hard disk chip to do, more need to organize hard disk sector, partition, record file and sector/offset relationship and so on.
The operating system is also the same for the network, to record its own identity (IP) in the network, access to other people (port), as well as the other party's information (remote Ip/port). Operations such as connection, disconnection, and data validation are also controlled by the protocol.
Pass their own messages to each other, similar to accessing the hard disk in the memory of the data to the network card cache, and then send a message to the network card to transmit data card, and whether to send the success of these guarantees are no longer by the hardware interrupt signal feedback, but through the network protocol to complete. Receive the other side of the message, but also received a network card interrupt, and then move the data from the network card cache into memory, and then give the other party feedback through the protocol.
Related Article

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.