linuxday1--Computer Fundamentals

Source: Internet
Author: User
Tags posix

System Knowledge
First, the computer system

Computer system consists of two parts: hardware (Hardware) system and Software (software) system.

Computer (computer): Commonly known as a computer, it is a modern intelligent electronic device that can accept and store information and handle the mass data automatically and at high speed according to the procedures stored in it.

  Computer storage unit;

1k=1024=2^10

1m=1024k=2^20

1g=1024m

1t=1024g

The following storage units can be viewed in the Windows Disk Properties Quota bar:

1P 1E 1Z 1Y 1 b 1N 1D

* In the daily work need to pay attention to the CP command speed limit    

Second, the computer hardware components

von Neumann architecture: 1946 mathematician von Neumann proposed that

Arithmetic, controller, memory, input device, output device

Main memory (loss of RAM Power)-memory-processing data (determines speed of operation)

Secondary memory-HDD-Number of storage

Input device-keyboard, touch screen, etc.

Output devices-screen, sound

Integration of the operator and controller into the CPU

* Computer processing data is based on 2 binary

Moore's Law

Proposed by Gordon Moore, one of the founders of Intel (Inter), in 1965

That is, when the price is constant, the number of components that can be accommodated on an integrated circuit is increased by one times every 18-24 months, and the performance increases by one.

Divided by scale

    • Supercomputer: www.top500.com
    • Mainframe computers: With high computational speed, IBM
    • Small computers: small size, simple structure
    • Microcomputer: Office automation and popularization of information processing

  Server (serve)-Client

  The server can be divided by application function:

Web server (Static page), database server (mysql), file server, middleware Application Server (tomcat), log server (elk), Monitoring Server (Zabbix), program version control server (GIT), virtual Server (KVM), mail server, ERP Server "Windows under DC (domain Controller) AD (Active Directory) Active Directories" ...

Docker

K8s

LVS, Haproxy Scheduler: bootloader role-Mobilize load

KeepAlive high availability, monitoring, takeover scheduler

Varnish front-End cache cache provides performance assurance

menmcached, Redis Database Cache

MIGLEFD Distributed File System (becomes a server by multiple machine groups) NTFS fat

Fastdfs

DNS name Resolution

Ansible puppet operation and maintenance automation

* Avoid a single point of failure: a point of failure global failure

  Server classification by Form factor

  

Tower Server (size not standard) currently less used

Rack-Mount Servers

Rack height of about 2m (42U), Width 19 inches (48.26cm) height in units of u,1u=1.75 inches = 44.45 mm, usually 1U, 2U (mainstream), 3U, 4U (mainstream), 5U, 7U

Blade Type Server

  Server classification

Non-x86 server: Reduced instruction Set (instruction is not many and the same length) good stability, strong performance, in the financial, telecommunications and other large enterprises of the core system.

X86 Server: Complex instruction set (multiple instructions and different lengths) inexpensive, compatible, less stable, and unsafe

Ali go to the IoE: I-IBM minicomputer o-oracle Database E-EMC Storage

Server hardware composition

Server Hardware--cpu

The CPU (Center processing Unit), or CPU, is the most important part of the whole computer system, which consists of a controller and an operator.

Server CPU Company: Intel (Xeon Xeon) AMD (Althlon MP) IBM (Power)

Main frequency: The clock frequency of the CPU (CPU clock speed), is the CPU operation of the frequency of the abbreviation; Unit Hz. In general, the higher the frequency, the faster the CPU, because the internal structure is different, not all the same clock frequency CPU performance is the same.

Frequency = FSB (CPU and external motherboard chipset Exchange data, instruction operating clock frequency) x octave (CPU FSB vs. FSB vs. frequency)

Address bus width: Determines the physical address space accessible, 32-bit (2^32 for 4G memory), 64-bit address bus width

 Server Hardware--motherboard

Motherboard (mainboard), System board Systemboard or master motherboard, motherboard is generally rectangular circuit board, the above installed computer main circuit system, generally have BIOS chip, I/O control chip ....

  Server Hardware--memory

   

Memory is between the CPU and the external storage, is the CPU to the external storage program and data in the high-speed operation of the program instructions, data and intermediate results of the temporary site, its physical essence is a set of data input and output and data storage functions of the high-speed integrated circuit.

Memory is the storage space that the CPU can directly address, made of semiconductor devices. Memory is characterized by fast access speed

All programs in the computer run in memory, so the performance of the memory affects the computer very much

External memory: HDD, U disk, floppy disk, CD
The difference between memory and external memory:
Data loss after memory outage
External memory data can be saved after power failure

Capacity: The storage capacity of the memory, in which units are typically "MB" or "GB"
Memory Bandwidth:
Memory bandwidth refers to the memory and North Bridge chip data transmission rate single-channel memory controller is generally 64-bit, 8 bits equivalent to 1 bytes, converted into bytes is 64/8=8, multiplied by the memory frequency, if the DDR memory will be multiplied by 2
Calculation formula:
Memory Bandwidth = memory bus frequency x data bus number of bits/8
Example: DDR Memory bandwidth Calculation
DDR2 667, the operating frequency is 333MHz, the bandwidth is
333x2x64/8=5400mb/s=5.4gb/s

  Server hardware--hard disk

  Mechanical hard disk structure:

Storage media (media)--platters

The substrate is made of metal or glass to achieve high density and stable quality, the substrate requires a smooth surface, no defects

Read-write head (read write head)--head

The head is the key part of the hard disk reading data, its main function is to convert the magnetic information stored on the hard disk disc into an electrical signal outward transmission

Motors (Spindle & Voice Coil Motor)

The motor is equipped with a multi-piece disc, to 7200,10000,15000 rpm and other fixed speed rotation, in order to maintain its balance is not jitter, so its quality requirements rigorous, do not produce high-temperature mania

  HDD Interface type:

IDE interface: Hard drive Interface specification with ATA Technical specification
SCSI interface: High-speed data transfer technology for small machines
SATA interface: Serial ATA, improves transfer rate, supports hot-swappable
SAS interface: Serial attached SCSI, SATA compatible
Current mainstream HDD interface for SATA and SAS interfaces

    Server Performance Short Board:

If the CPU has the ability to process 1000 service requests per second, the load capacity of various buses can reach 500, but the network card can only accept 200 requests, and the hard disk can only afford 150, then the server has to handle only 150 requests/second, 85% of the processor computing power wasted

SSD HDD:

SSD (solid state disk) refers to the use of NAND flash composed of SSD. Its special is that there is no mechanical structure, in the way of block writing and erasing to read and write function, so in the efficiency of reading and writing, very dependent on the read and write technology design SSD read and write access speed, stable performance, high vibration, low heat, resistance to low temperature, low power consumption, no noise. Because there is no mechanical part, so the use of long time also has a small probability of failure. Disadvantage: High price, small capacity, no cost-effective advantage in front of ordinary hard disk

Server hardware-hot-swappable technology

Known as hot Swap, allows the replacement of a faulty hot-swappable device in a non-powered off state

Common Hot-swappable devices: Hard drives, power supplies, PCI devices, fans and other hot-swappable hard disk technology together with RAID technology, you can enable the server to recover the data on the failed hard drive without shutting down the computer, and it does not affect the network user's use of the data

  Storage Fundamentals-Storage networks

Storage network:
DAS-----Directly attached storage (direct attached Storage)
NAS-----Network-attached storage (attached Storage)
SAN-----Storage Area Network (Storage zone Networks)

Third, the operating system

os:operating System, software program for general purpose

Hardware Drivers
Process Management
Memory management
Network management
Security management
File Management

  OS classification:
Server Os:rhel, Centos,windowsserver,aix
Desktop Os:windows 10,windows 7,mac Os,fedora
Mobile device Os:andriod,ios,yunos

Development interface Standard
Abi:application Binary Interface
The ABI describes the underlying interface between the application and the OS, allowing the compiled target code to run without modification in a system that uses a compatible ABI
Api:application Programming Interface
The API defines the interface between the source code and the library, so the same source can be compiled in any system that supports this API
Posix:portable Operating System Interface
A series of API standards defined by the IEEE on the operating system
POSIX-compatible programs can be compiled and executed on other POSIX operating systems
Run Program format:
Windows:exe,. dll (dynamic link library),. lib
Linux:elf,. So (Shared object),. A

Library function and System call

  User and kernel space

   Users space: User spaces

The running space of the user program. For security, they are isolated, even if the user's program crashes, the kernel will not be affected to perform simple operations, can not directly invoke system resources, must pass the system interface (systems call) to send instructions to the kernel

   Kernel spaces: Kernel space
is the running space of the Linux kernel
Arbitrary commands can be executed to invoke all resources of the system
   Example:
Str= "www.magedu.com"//User space
x = x + 100//User space
File.write (str)//switch to kernel space
y = x + 200//switch back to user space
The first and second rows are simple assignment operations, which are performed in user space. The third line needs to write to the file, it is necessary to switch to kernel space, because the user cannot directly write the file, must be arranged through the kernel. Row four is the assignment operation, switch back to user space

Programming languages
Low-level language
Machine language: 0 and 1
Assembly language: Corresponds to machine one by one, unique hardware-related code, driver development
Intermediate Language: C
System-level applications, drivers
Advanced Language: Java,objective-c,c#,python,php,go
Application-level program development

linuxday1--Computer Fundamentals

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.