Linux Operations Fundamentals (Hardware and operating systems)

Source: Internet
Author: User
Tags arithmetic

Use of VMware workstation: virtual machine virtual machines
On a host, the Software + hardware simulates the hardware device, and then installs the system on the virtual device, equivalent to the operation on the physical machine!
Components of modern computer equipment:
Arithmetic, controller, memory, input device, output device
Arithmetic device
Used to calculate, binary arithmetic operations and logical operations (subtraction, shift, modulus calculation), i.e. adder
Controller
Control the coordination of the entire calculation of the components (both the operator and the controller are combined for the CPU of the central processing Unit) and the Controller bus bus connection
Memory
Memeory: Address the storage device, a unit is a byte, a byte is 8 bits, in memory each storage unit is addressed, the operator will be removed from the in-memory addresses to operate! Volatile data!

Read ahead: Prefetch process

/ o
Complete parts that interact with external parts, which is the worst-performing thing! Disk, NIC, keyboard, mouse
Motherboard
Put these parts together!
Display device
The cheapest display device
# # #为什么32的操作系统, use only 4G of memory:
32-bit operating system, address bus only 32 bits, then he can use the address storage unit is 2^32, that is, 4G of memory! So you can know that 64 bits of memory can be used for 2^64, that is, 4G 4G of space!
Cpu:
The arithmetic, the controller (there are many circuits inside the CPU, the transistor composition) is mainly used to do arithmetic and shift operation. The CPU has a lot of pins, each pin has a specific function, such as a certain pin to do the addition, one to do the shift calculation, a certain or operation and so on. In order for the CPU to complete the operation we expect, any so-called computing chip, there must be a basic loading (boot) process!
CPU Instructions
Multiple instructions together called the instruction set, different manufacturers of the CPU's instruction set function, the general CPU can run the binary instructions! Of course, the command is divided into privileged instructions and ordinary instructions, the operating system has permission to invoke privileged instructions, the program can only invoke ordinary instructions.
Programming languages
The closer the language is to the lower level of the hardware, the more advanced it is to understand, the high-level language the programmer uses! Not a developed program must be able to make the machine understand: machine language----assembly language, high-level languages, then the high-level language first to convert to the chip can support the assembly language, and then into the process of invoking CPU instructions! For example, C language, the first thing to do after development is to compile, and then the assembly process. The so-called program: Let's find a way to call the CPU instruction set to complete the process of specifying work!
Machine structure
Different machine structures (x86,arm), but for all our users are general-purpose architecture software, this software is the operating system. No matter how complex the bottom layer is, we just need to write the program to the interface of the operating system! So the operating system is a generic software that abstracts the various computational capabilities provided by the underlying into a calculator, abstracting the memory into a whole (or simply partitioning, such as 32-bit operating systems and 64-bit operating systems)!
Os:operation System software program
He is a software program, is in general purpose, the underlying different functions of the hardware abstraction into a unified interface (such as hardware driver, process management, memory management, network management, security management, etc.) programmers will not face the hardware write program, we are operating system-oriented abstract interface write program (OS is also a virtual machine)
System Call
After the operating system is running: If the program wants to invoke privileges only, the kernel (operating system) can only send requests to invoke privileged instructions, this process is called system call.
The purpose of the operating system
Encapsulates the functionality of the underlying hardware as a system call implementation. In this way, programmers do not need to face the hardware programming, direct system-oriented programming, the use of hardware directly using the system called SYS call implementation.
Programming Hierarchy:
Hardware specifications: Hardware specifiacation system call: Library calls: The database call our operating system is also a very low-level thing, it abstracted out of the hardware function is also many, program development, we too many different system calls will also increase the difficulty of development, To solve this problem, the operating system will again abstract these operating system levels again, this time called libraries, called Library call, in short: to integrate the underlying functionality from the programmer to use the most recent is called a library, programmer writing Program is much easier
System level:
Application ↓ Library ↓ operating system (kernel) ↓ hardware
Two ways to run a program
1, the boot automatically start running 2, the user through the interactive interface login or connect the system up, to manually run the program users can be interactive interface to the system and its program operation, configuration management system independent of the user's interactive interface, interface has no, do not affect the system and its program operation, So the interactive interface is not required, but some programs are built on the interactive interface.
User interface
UI:GUI:Graphic user Interface GUI cli:command lines Interface command line interface #abi:application binary Interface application binary interface so Li Why are Nux and Windows programs not interoperable? Because we're using a different binary calling interface! That is, the ABI used (Application Binary Interface) is not the same. Because our program must compile, and then compiled into binary to execute, this time the ABI uses a different interface, it will not be able to execute, if the interface is the same, then can be common to each other! [The Library of our operating system faces different objects] #API: Application Programming Interface application programming Interface Api:application programming Interface application programming interface (WIN and Linux run program format is not the same, the programming interface can be as compatible, in Windows Write programs in a compatible format can be run in Linux, once compiled into binary, it can only be run on the corresponding operating system, On what objects to compile, you can only run on those systems. )
CPU Architecture Type
# #IntelX86X86_64安腾CPU # #ARMARM (very wonderful, only design, not production, there are so-called Samsung, Qualcomm such company production) # #摩托罗拉M6800 (m68k) Motorola's Cpupower (IBM, the world's first multi-core CPU, The first 8 cores, the single core can be the strongest, power consumption) PowerPC (Motorola, Apple, IBM co-designed CPU), Lite Power#sunultrasparc (Sun Company) #HPalpha (HP Company)
Common operating systems
# #Windows # #Linux # #UnixSystem (Bell Lab) AIX (IBM) Solaris (SUN) HP-UX (HP) BSD (Berkeley System Distribution) (BSRG) FreeBSD (a noble operating system capable of running on a PC) Netbsdopenbsd#mit:richard Stallmangnu:gnu is isn't unix;gpl:general public License
Linux distributions
The full name of Linux is called Gnu/linux, which is just our abbreviation for Linux. Whether GNU or Linux, the kernel is the source code, is the C language development, if the software to run, it must be compiled into binary to run, cross-platform operation is a serious problem, then the long-popular software compiled after the binary can be compatible with all platforms, that is, packaging, including Redhat, Debian,sls,suse These companies, they are not owned by Linux themselves, they just compile the source code on the common platform into binary compatible with most of the platforms, these companies referred to as publishers (release)
Linux distributions:
Slackware:suseopensusedebian:ubuntumintredhat:rhel:redhat Enterprise Linux releases a new version of CentOS every 18 months: RHEL-compatible format fedora: Release a new version every 6 months Archlinuxgentoolfs:linux from scratch
Open Source Agreement
Gnu:gplv2, GPLv3, LGPL (Lesser) apache:apachebsd:bsda:1000, gpl,b:20000, 20
What is the relationship between the question 1:centos and Linux? What is the relationship between CentOS and Rhel?
CentOS is a Linux distribution, and CentOS has changed the distribution of the logo on the basis of Rhel.
Question 2: What are the specifics of the various open source agreements? 650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/A4/32/wKioL1mmW6LBLqUeAACkAxShMvs947.jpg-wh_500x0-wm_ 3-wmp_4-s_2489266228.jpg "title=" open source agreement. jpg "alt=" wkiol1mmw6lblqueaackaxshmvs947.jpg-wh_50 "/>
The main content of the GPL, LGPL, APACHE, BSDGPL:GPL protocol is to use the GPL ("use" refers to the class library reference, the modified code or the derivative code) as long as it is used in a software, The SOFTWARE product must also be licensed under the GPL, both open source and free. This is known as "contagious". LGPL:LGPL is a GPL-open source protocol designed primarily for use in class libraries. And the GPL requires that any software that uses/modifies/derives from the GPL library must be different from the GPL agreement. lgpl  allows commercial software to use the LGPL class library through the Class Library Reference (link) without the need for code for open source commercial software. This allows open source code with the LGPL protocol to be referenced and published and sold as a class library by commercial software. Apache:apachelicence is the protocol used by the famous non-profit open source organization Apache. The agreement is similar to BSD, encouraging code sharing and respecting the authorship of the original author, as well as allowing the code to be modified, republished (as open source or commercial software) to meet the conditions also and BSD-like:     need to give code to the user a copy of Apache  Licence     If you modify the code, you need to modify the file to be described in the document.      in the extended code (modified and in the code derived from the source code) need to have the original code of the Agreement, trademarks, patent statements and other original author rules need to include the instructions.      if a re-published product contains a notice file, you need to have apache licence in the notice file. You can add your own permission to the notice, but you may not be able to represent changes to apache licence. The Bsd:bsd Open Source agreement is an agreement that gives users a great deal of freedom. Basically users can "do whatever", can use freely, modify the source code, you can also use the modified code as open source or proprietary software re-release. But the premise of "Do what you Want" when you publish code that uses the BSD protocol, or if you develop your own product two times based on the BSD protocol code, you need to meet three conditions:     if the re-released product contains source code, The BSD protocol in the original code must be in the source code.      If you re-publish only binary class libraries/software, you need to include the BSD protocol in your original code in the class library/software documentation and copyright notice.      can not use the source code of the author/organization name and the original product name to do marketing. Mit:mit is a license agreement that is as wide as BSD, and the author only wants to retain the copyright, without any other restrictions. That is, you must include a statement of the original license in your distribution, whether you are publishing it in binary or source code.


This article from "Dominic_ Liu Dehan" blog, reproduced please contact the author!

Linux Operations Fundamentals (Hardware and operating systems)

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.