Computer-based concepts
February 1946 The United States, the world's first computer eniac birth, it seems that from the beginning of the year the world has gradually become different. With a half-century of time, computer technology has flourished to promote human access to the information society.
Computer Operation Interface:
① Graphical User interface
② Command Line interface
At the same time as the ENIAC computer development, von Neumann and Moore Group cooperated in the development of EDVAC computer, using a storage program, that is, each step in the process of solving the problem with instructions, and in accordance with the order of execution into a program, stored in memory, known as von. Neumann computer. Von Neumann computer has the following characteristics.
(1) The computer consists of five parts: the arithmetic device, the controller, the memory, the input device and the output equipment.
(2) The method of storing the program, the program and the data are placed in the same memory, and the binary code is represented.
(3) The instruction is composed of the operation code and the address code.
(4) The instruction is stored in the order of execution in the memory, with the instruction counter (PC) named the address of the storage unit where the instruction is to be executed.
(5) The computer is the core of the arithmetic, the arithmetic arithmetic and the logical operation are two kinds of arithmetic, the controller coordinates the operation between the operation arithmetic and other equipments, the memory is dominated by random memory ram, and the data transmission between input and memory is through the arithmetic device.
According to the development of the physical devices used in electronic computers, the development of electronic computers is generally divided into five stages, which is traditionally called the Five Dynasties.
The first generation: Electron tube computer computer era
Second generation: Transistor computer era
The third generation: IC Computer computer era
Fourth generation: LSI computer era
Fifth generation: VLSI computer era
The computer hardware is the computer realizes the various functions foundation, the software is realizes the function the method, is composed by the instruction and the data, transforms the frequency into the information type to let the logical hardware understand and the operation. such as the Remote Control Infrared control function and the touch screen for logical conversion into binary machine language form can make the computer understand.
Computer language has machine language, microcode (assembly language) and high-level language three categories, machine language as the most basic language of the computer, it is the most popular but weak, is directly implemented by the binary system, the computer just appeared that people are using machine language to operate the computer, But because machine language is written in binary code, this is too much pressure for programmers and less efficient. Based on this background, assembly language was born. assembly language uses symbols instead of binary code, so the assembly language is also called symbolic language, the use of assembly language programming, hardware can not directly identify, to use assembler to convert assembly language into machine language so that hardware can be recognized. For assembly language, this process is what we call the assembler process, which is achieved using the assembler. assembly language and chip coupling degree is very high, but on one chip compiled assembly language can not be transplanted to other chips, transplant is very poor, so there is a high-level language. There are many kinds of high-level languages, C language, Java,php,python,perl and so on each language has its pertinence. C and Java are closer to the bottom of the system-level language, Php,python,perl and so on are application-level languages. Although high-level languages are targeted but closer to human natural languages, the efficiency of translating into machine languages is low, resulting in many intermediate codes that require more overhead when running.
High-level languages can be divided into:
① system level, application level.
② can be divided into process-oriented: writing code according to strict logical structure. Object-oriented: Relatively free, more focused on the process of data processing, rather than data structures.
③ can be divided into strong language (compiler Language): C language, C++,java. No known variables can be used, the source code must be compiled, not compiled can not be used. Weak language (explanatory language): Php,python,shell, do not declare variables can also be used, not compiled, through the interpreter can also be used.
Operating system Basic Concepts
The operating system (Operating System,os) is the first layer of software that is configured on the computer hardware, the hardware system, and the first expansion of the hardware system. Its primary role is to manage these devices, improve their utilization and system throughput, and provide users and applications with a simple interface that is easy for users to use.
The computers we use today are digital devices that are capable of digital information processing and computing. Digital devices that can only understand binary code. So any program that wants to run on a computer must be encoded in binary form to be accepted by the underlying hardware, but the underlying hardware is too simple and ugly, so for programmers to develop, the vendors will allocate assembler interfaces for these ugly hardware, but the assembler interfaces are very low. In order to be able to make good use of these assembler interfaces, a program that can complete the assembly function is required--the driver. At first, because different hardware requires different assembler, in order to be able to use the computer's underlying hardware, it will write a corresponding driver for each of the underlying hardware assembly interfaces. But with the continuous development of computers, later people think that using a hardware to write a corresponding driver is too complex, someone specifically developed these computer hardware, encapsulated into a whole, and shared, so that programmers in the development of the program does not need to write these code, directly call. So programmers in the development of the program, directly call the driver can access the hardware, compiled into a binary stream can be directly processed by the CPU.
The operating system is also known as the hardware virtual abstraction layer. is to abstract the hardware virtualization. (such as the D-disk icon, etc.) do not use hardware directly, but instead, a virtual way to use the hardware. Allocate resources to hardware, monitor, and prevent unreasonable allocation of resources. Resource allocation is unreasonable, waste of resources will cause the system not to run. The operating system here is the kernel (kernal). Kernal This monitoring program is responsible for driving the underlying hardware and virtualizing the various resources of the underlying hardware. such as space reuse, time reuse.
Operation Interface (shell), the use of the interface of the program display in the interface easy to manage, and vice versa is not easy to manage. Some applications are required to interact with the operating interface, generating icons on the interface, and some directly accessing the kernel through the operating system, rather than directly interacting with the interface (such as Trojans).
The operating system kernel can be a good link, that is, the interface between the operating system and the kernel kernal. The kernel can be a good shield against the underlying ugly hardware to put the virtualized hardware resources on the computer interface for user-friendly use. The process of finding the operating system interface and using the interface of the operating system is called system call, which uses this interface to pass the information we need and the operations that need to be done through the interface to the kernel of the operating system. That is, the system call. Calling the system interface is not a program but a process. The program is static and is dead, the process is dynamic and is alive. Through the operation of the interface shell, the system calls to the operating system kernel, compiled by the kernel, the high-level language translated into assembly language and then translated into the computer can understand the machine languages, so that the hardware calls.
A complete operating system consists of a kernel and a variety of applications, the kernel by shielding the ugly interface of the underlying hardware, virtual hardware interface to facilitate user use. These abstractions come out of the interface that we call system calls. The code that is used when programmers are programming requires an understanding of how to write code beforehand, otherwise the code you write does not match the interface of the operating system to run debugging on this operating system. So programmers must know in advance what interface the operating system has, but the operating system has hundreds of interfaces, which is a great pressure for programmers, so some people will be some common to the operating system interface packaged into a library. The library contains a number of methods that programmers can program based on the Libraries interface and can be programmed based on the kernel interface. In the Linux domain, the call to the library interface is more free and convenient. These libraries are also known as APIs (application program Interface).
If the programmer is programming with a Windows operating system interface and wants to run the debug program in the Linux operating system, it is necessary to determine whether the Windows operating interface at the time of writing the program is consistent with the API library of the operating system that is now running. that is, the POSIX (Portable Operating System) portable operating system. Any program code that complies with the POSIX specification can be used on different operating systems.
programming interface compatibility does not mean that the binary interface is compatible, that is, the interface of the operating system is compatible when programmers write code, but does not mean that the language of the written program can be translated into binary machine language for the hardware to operate. The binary interface here is compatible with the ABI (Application binary Interface). Translate the program's source code into binary codes. The source code can not compile depends on the API can not be compatible, the source code can not be executed after compilation depends on the ABI compatibility.
Access Interface programs can be divided into two major categories :
① Graphical user interface (GUI)
② Command Line interface (CLI)
Our common Windows system has a desktop, which is a graphical user interface, beginners to use a computer GUI will be easier to get started, but anyone who has used the CLI know that the use of the CLI is much more efficient than using the GUI. The CLI's entry threshold is higher, which also results in many people not liking it. But as soon as you get started, you'll find that the command-line interface is very simple. It is almost transparent and can be quickly found and solved in any problem.
From the first computer that was born in 1945 to the mid-50 computer, all belonged to the first generation of computers. This is not the OS, and all the operations on the computer are done manually by the user. The programmer will pre-perforated paper tape, loaded into the paper tape input machine, and then start them to the tape on the program and data into the computer, and then start the computer to run. In order to solve the contradiction between man-machine contradiction and speed mismatch between I/O devices, offline I/O technology appeared in the late 1950s. The technology is to install the user program and data in advance tape into the paper tape input machine, under the control of a peripheral machine, the data on the tape into the tapes, when the CPU needs these programs and data from the tape high-speed transfer into the memory. In order to fully improve the utilization of computer resources, the first batch of jobs to be imported into the tape, and in the system with monitoring procedures, under its control, so that the batch of jobs can be processed one after another. Although the system handles the job in batches, it always keeps only one job in memory, so it is called a single-channel batch processing. However, the resources in a single-channel batch system are not fully utilized because there is only one program in memory so the CPU is waiting after the I/O request is made. In order to further improve the resource utilization and the system throughput, the multi-channel process design technique was introduced in the mid 1960s, and the multi-path batch processing system was formed. In this system, the jobs submitted by user I are first stored in the outer village, and queued in a queue. The job scheduler then selects a number of jobs from the queue to the memory by a certain algorithm, allowing them to share the CPU and the various resources in the system, because there are several programs in memory at the same time, so that when you run program A, the time to suspend execution of the I/O operation is executed by another program B Enables the multi-channel program to be executed alternately so that the CPU is busy.
Summary of computer and operating system fundamentals