Read the preface to "proficient in regular expressions"-the nature of hardware and software

Source: Internet
Author: User

everything in the hardware architecture will be attributed to caching. This idea is cited in the preface of a book "proficient in regular expressions". The real author is Sun scientist Bill Joy, his idea is very reasonable. In the past, almost all machines completed all their own tasks. Even if there were several cooperative machines, they were not far away, in addition, the coupling degree is high, so they are essentially a machine, but the emergence of computers has changed all of this. Computer Systems are almost all independent systems, with low coupling, since then, a machine has been divided into several machines. However, this is only a revolution in the machine itself. for human use, what people need is not what machines do, we are more concerned with products produced by machines, such as data. Of course, people still want to build a huge machine to complete all of this at once, it is only because the cost of this huge machine is too high that we can only adopt distributed strategies such as computer network systems to divide and conquer the problem. The direct result of the distributed strategy is to alienate all stages of product processing, and the product will not suddenly become finished, but will go through the status of many semi-finished products. How can we minimize the number of semi-finished products, or how to speed up the time required to transition from a half-finished product to another half-finished product has become an important issue of Integrating Distributed machines. In fact, this is not a problem that occurs in computer distributed systems, this problem occurred early in the batch manufacturing of automobiles. Previously, cars were all customized. It can be said that they were completed by one machine, and the batch production machine was a distributed machine. As a result, a pipeline operating system was generated, and another production system was created after the completion of the process, instead, processes are separated. This is a pipeline job that improves the efficiency of each part of the machine. In fact, the process is distributed again, and the above problems are even more serious, in such a subtle pipeline step, the efficiency of switching from one semi-finished product to another semi-finished product must be considered.

How can we solve these problems? The solution is to use the cache system. In essence, we try our best to combine all the machines into one machine. Although it is impossible, we try our best to combine the semi-finished products so that they are no longer so far away, the machine in the next step, or a processing stage, can obtain the half products in the previous stage as quickly as possible. This is the essence of caching. The same is true for computer caching. For example, if a process on a machine with an Ethernet card needs to send a network packet, you must first obtain the MAC address of the Peer machine, however, this machine does not directly send ARP requests, but first searches for the ARP cache locally, so as to ignore the existence of remote collaborators and try to complete all tasks on its own. The priority is that the remote end is essential and is responsible for local data input. During local use, you must first check the local cache. If this parameter does not exist, you need to go to the remote end. The distributed hardware architecture always serves as the final input source. caching is a best-effort integration measure, not an absolute integration, it only brings a lot of benefits to meet the psychological needs of people who want to integrate. If absolute integration is achieved, the remote end will not be needed, distributed architecture is meaningless.

Since caching is the root of hardware, what about software? The foundation of the software lies in the structured and relational model (especially computer software). Currently, the computer hardware system only provides memory and processor, and there is a hard disk in the extended sense. Therefore, the memory is a flat addressing space, how to construct various types of software in this flat data addressing space requires the use of some structures to split the physically flat space into logically meaningful structures, the processor then identifies these structures. Of course, the processor does not know these structures. The reason why the processor knows how to process these structures is that these structures are related. This is the meaning of the relational model, for example, most of contemporary processors have built-in structures such as byte, word, Int, and double,ProgramMembers construct their own more complex structures. What is the program? The program is the interaction of these structures. As mentioned in the preface of "proficient in regular expressions", no matter how amazing the upper-layer software is, in the final analysis, we still process byte sequences, the processor identifies the data structure while processing the byte sequence and generates the logic that the software should have.

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.