Python regular class 2 - Computer Basics supplement

In this article authors are all original, For reprint, please indicate the source: https://www.cnblogs.com/xuexianqi/p/12401598.html

A: CPU Detailed

Classification and instruction set 1.CPU

  CPU divided into two kinds, 32 (the X86) and 64 (the X86-64)

  CPU has a downward compatibility, the same as USB3.0 compatible with USB2.0, both 64-bit CPU can run programs 64, 32 also can run programs.

2. kernel mode and user mode

On behalf of two kinds of CPU status

  ① kernel mode: the operating system is running, the computer hardware may operate
  ② user mode: the application program is running, the computer hardware can not operate

Conversion kernel mode and user mode

  Run the application necessarily involves the operation of computer hardware, it must have a user mode to switch to
  kernel mode can be achieved, so converting kernel mode and user mode frequently occurs when the computer work

3. Common CPU

Common desktop CPU has "intel (Intel)" and "AMD"

Intel:

  Intel is a US to develop CPU processor based company, is the world's largest personal computer parts CPU manufacturer, which was established in 1968, it has a 50 year history of product innovation and market leadership.

AMD:

  AMD US semiconductor companies for the computer, communications and consumer electronics industry designs and produces innovative microprocessors (CPU, GPU, APU, motherboard chipset, TV card chips, etc.), as well as providing flash memory and low-power processor solutions The company was founded in 1969. AMD is committed to technology users - from businesses, government agencies and individual consumers - to provide standards-based, customer-focused solutions are.

  AMD US semiconductor companies for the computer, communications and consumer electronics industry designs and produces innovative microprocessors (CPU, GPU, APU, motherboard chipset, TV card chips, etc.), as well as providing flash memory and low-power processor solutions The company was founded in 1969. AMD is committed to technology users - from businesses, government agencies and individual consumers - to provide standards-based, customer-focused solutions are.

II: Memory

RAM

  A random access memory (English: Random Access Memory, abbreviation: RAM), i.e. memory, also known often said main memory, a CPU and an internal memory direct exchange of data.

  Advantages: read-write, read and write speed, the fastest DDR4 standard memory read and write speeds of up to 50000MB / s

  Cons: Once the power failure, data will be lost

ROM

  Read only memory ROM is an abbreviation for read-only memory. A read only memory (ROM) which is a fixed data stored during normal operation in which data can only be read, not written, can retain data even when power is turned off, is stored in the ROM in order to or change the data, must have certain conditions.

  Advantages: even if the power can also save data

  Disadvantages: can only be read, not written to, read and write speed is slow

CMOS

  Is a readable and writable RAM chips on a computer motherboard. On the computer motherboard BIOS used to save data after setting the parameters of computer hardware, the chip is only used to store data.

  Advantages: readable and writable data can be stored, low power consumption

  Disadvantages: slow read and write speed, power data will be lost

hard disk

  Computer hard drives are the most important computer storage devices are divided into "mechanical hard" and "SSD" two kinds.

Mechanical hard drive (HDD: Hard Drive Disk)

  Track: circle data, corresponding to a string of binary (1bit representing a binary bit)

  Unit conversion:

    8bit bits (bits) = 1Bytes bytes
    1024 Bytes = 1KB
    1024KB 1MB =
    1024MB = 1GB
    1024GB = 1TB
    1024TB = 1PB

  Sector:
    a sector is 512Bytes by
    standing hard interpretation, the minimum unit is a one-time read and write data into sectors

  IO delay:

    With a 7200rpm hard disk as an example:

      7200rpm is 7200 rev / min

      120 rpm / sec

      1 rotation takes 8ms

  Average seek time:

    Mechanical arm to track where the time it takes data

    Process is limited by the physical level, the current mechanical drive can be achieved 5ms

  Average latency:

    Half turn takes 4ms, limited by the speed of the hard disk

  IO delay = average seek time + average delay time

  A core rule optimizer operating efficiency:

    Fetch data from memory, do not take the hard drive from

  = IO device control device apparatus itself +

  Common mechanical hard drive interface: SATA

  Pros: storage capacity, cheap, long service life.

  Disadvantages: slow read and write, read and write the fastest rate of about 300M / s; noise; shock easily damaged; large power consumption.

Solid State Drive (SSD: Solid State Disk)

  SSDs are popular solid state electronic storage hard disk array chip made of.

  SSD by the control unit and a storage unit (FLASH chips, DRAM chips) composition.

  Common SSD Interface: SATA, M.2, PCI-E

  Advantages: fast read and write, read and write the fastest rate of about 5000M / s; lightweight, low power consumption, seismic drop resistance.

  Disadvantages: The maximum capacity of less than mechanical hard drives; high price; endurance limit because of a short life.

Three: the operating system startup process-related

BIOS Description:

  BIOS: Basic Input Output System, Basic Input Output System

  BIOS on the motherboard is burned in a program ROM (motherboard here that the motherboard is pure, does not include a CPU, memory, hard disk, and hardware), the configuration information of the BIOS is stored in CMOS, CMOS off once electrical, configuration information will be cleared.

  While BIOS is a low-level system, but you can also set a password before the operating system boot execution.

Specific operating system boot process:

Computer 1. Press the power button, the energization

2.BIOS began to run, hardware detection: CPU, memory, hard disk ...

3.BIOS reads the configuration parameters CMOS storage area, chose to start hardware

4. The information is read from the boot sector of a hardware device (MBR and UEFI boot into partitions according to different formats)

The partition information reading module bootloader boot loader, the operating system boot

6. Operation asked BIOS, to obtain configuration information. The system monitoring device driver is normal, and then transferred to the kernel

Four: Start the application process

With "Windows System":

1. Double-click the ".exe" at the end of shortcuts, to find the absolute path to the file

2. exe program operating system to find the location in the hard disk according to the file path, which is a control code is loaded into memory from the hard disk

3. The code for the application is read into memory before the CPU reads from the memory control execution, application startup completion

Guess you like

Origin www.cnblogs.com/xuexianqi/p/12401598.html