Brief introduction of computer operation mechanism

Source: Internet
Author: User

As we all know, for modern computers with von Neumann architectures, the main components are: CPU, memory, and I/O. As an electronic component, the CPU and memory identification binary in the 1 and 0 are implemented by the voltage, so that the voltage between the frequency of change or the ability of these components to recognize these changes in frequency directly affects the ability of the computer to process data.

Cpu

like the human brain, CPUs play a vital role in the operation of the entire computer, including computational functions and control functions. However, just like having an appliance to eat rice, when the CPU is calculated, there must be a similar container, when the first data of the bit (voltage) stream disappears to be able to cache it and the next data to do the operation, the container placed in the CPU is called a register, The component that implements the arithmetic function is called an arithmetic device. Of course, for the internal components of the computer, in order to achieve the processing of the data must go through the CPU, so the CPU has to be connected to the various parts of the channel, in order to allow the smallest possible lines deployed in a limited space, we use a set of lines throughout the computer, all the parts are connected, this group of lines called: Bus. For such a bus structure, there must be a coordinated transmission and transmission of the conflict detection and avoidance mechanism, as if we in the larger traffic flow of the main road to have traffic lights to command the transport, inside the computer, the command traffic components called controllers, other components have a control unit to accept the controller command.

Memory

inside the computer, the CPU has direct access to only the memory, so the CPU needs to be able to accurately find the data that needs to be processed in memory, so the memory is addressable. A memory is divided into n cells, each cell contains 8bits and has an address, the controller is connected to the memory controller via address bus, if a memory controller outputs 32 wires (32 bits), then the addressing capacity is 4G.

Operating System

for each hardware, its operating specifications are not the same, for example: different manufacturers of the CPU for the machine code recognition method is different, may be the same 0 and 1 combination of a representation plus, a representation minus. Therefore, it is very difficult for the early programmers to realize the logic of an application to understand how to identify the machine code of all the hardware on the development platform. At the same time the manufacturer thousands, the program developed on a particular hardware combination platform can not be ported to other hardware platforms, to solve this contradiction must develop a middle layer, down can drive all the hardware devices, up to provide a unified standard interface, The process of driving the underlying hardware through this unified interface is called system call, the middle-tier popular salutation: The operating system, which is called the Linux kernel in Linux.

The operating system provides a platform for application and underlying hardware interaction, which can drive all of the underlying hardware, and most importantly, the ability to manage CPUs in a time-sharing manner, allowing applications to coordinate their work. Although both are middle-tier, Linux and Windows provide a different standard for the unified interface, so an application can have WINDOWS32/64 and LINUX32/64 versions depending on the operating system.

API and Abi

As mentioned above, even if we can drive the hardware of different manufacturers, our operating system (kernel) interface is still very low, such as word needs to use the printing function, Excel also need to use the same function, Then it is necessary to unify all the printing functions of the printing interfaces of all vendors in a common specification, which is called the library. The library provides an upward interface called the API, and the programmer calls the library through the API. POSIX is the current generic API execution specification, mandated by IEEE, compatible with Windows and Linux,syscall and Libcall belong to the API scope.

The application runs directly on the hardware, but relies on the environment provided by the operating system and is subject to the management of the operating system, which is called the ABI. The executable program on Windows supports the Exe,msi format, while Linux supports the ELF format, and each application has an execution entry indicating the supported binary format.

in short, the source program developed on Windows, which can be compiled on Linux, requires the same API on both sides, and on Windows it is possible to build on Windows to run on Linux, on both sides of the ABI.


This article is from "Snail Little Fly" blog, reproduced please contact the author!

Brief introduction of computer operation mechanism

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.