Programming basics,

Source: Internet
Author: User

Programming basics,

Language is the medium for communication between things.

Programmers express their thinking logic in a way that computers can understand. The result is a pile of files.

A complete computer system consists of three parts:

Applications

Computer Operating System: A control program that coordinates, manages, and controls computer hardware and software.

Computer hardware

Computer hardware can be divided into CPU (Controller and memory), memory (also known as primary storage, I/O devices, memory and external storage devices), input devices, and output devices.

The CPU sends a data read request to the memory. The execution of the software is performed by the CPU, and all the software must be converted to the CPU Instruction Set for execution. CPU instruction sets are divided into a simplified instruction set (RISC) and a complex instruction set (CISC ).

CPU has backward compatibility, that is, 64-bit CPU can take 32-bit software, but 32-bit CPU cannot take 64-bit software.

Registers, high-speed cache, memory, disks, and tapes have their own functions as the execution speed increases from fast to slow, the cost increases from high to low, and the capacity increases from small to large.

Operating system startup process:

Power on-> Bios-> self-check (detection hardware)-> CMOS-> Find boot hard disk-> Read boot hard disk (read the first sector 512 bytes, the first 446 bytes is Boot information, the last 64 are the partition information, and the last two are the hidden bit mark)-> load bootloader (system boot)-> Read the operating system kernel (take over the bios task and control the computer) -> request the bios to check whether the driver is installed (system level)

Disk has two important concepts:

Average seek time: the average time for the mechanical arm to find the corresponding track on the disk is 5 ms (limited by the hardware level)

Average delay time: the start time of the mechanical arm to find the corresponding data on the track is 4 ms (related to the speed)

The operating system is divided into two parts:

Two CPU statuses:

Application startup process:

Application-> submit the file startup path to the operating system-> Read the hard disk data into the memory by path-> the operating system calls the program code just read in the CPU to execute the memory

There are three types of programming languages:

Advantage: High execution efficiency

Disadvantages: slow development and difficult learning

Advantage: High execution efficiency, lower than machine language

Disadvantage: the development speed is faster than the machine language, but it is still slow

Category:

Compilation type: one-time translation, which can be executed repeatedly

Advantage: High Efficiency

Disadvantages: difficult to debug the program and low cross-platform performance

Interpreted type: line-by-line translation, while performing Translation

Advantages: convenient program debugging and high cross-platform performance

Disadvantage: Low Efficiency

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.