One: What is an operating system
(1) Linux, Windows, Android, Ucos is the operating system
(2) The operating system is essentially a program, consisting of a number of source files that need to be compiled
Connect to operating System programs (Vmlinz, Zimage)
(3) The main function of the operating system is to manage the computer hardware, to provide the application with a
Operating environment.
II: Core functions of the operating system
(1) Memory management. If there is no operating system, memory needs to be managed by the program itself
Of Pedagogical gardening, such as in the Uboot to use memory where is their own casual, not registered Also
There is no limit. At this time, if the program itself accidentally put the same piece of memory reuse will be out
Current program logic error. After the system is large (memory) memory management is very troublesome;
Operating system, the operating system is responsible for the control of all memory, all applications need to
To use memory to apply and register to the operating system, the memory management of the operating system
Module to allocate memory for you to use, so the benefit is to ensure that memory usage does not conflict.
(2) Process scheduling. The operating system supports multiple applications running simultaneously (so you can
While chatting QQ while watching a movie • • ), which is macroscopic on the parallel. Actually on a single core CPU
Microscopic is not parallel, macro-parallel is the operating system provided by the time-sharing machine
System. The process scheduling module of the operating system is responsible for switching between the various processes.
(3) Hardware equipment management. To control any hardware without an operating system, write your own
Operating system itself will control each hardware, the application will not
Consider the specifics of the hardware. The Hardware Device Management module of the operating system is the driving mode
Block.
(4) file system. A file system is a way to manage storage devices. Storage device is
Consists of a number of sectors, each of which has 512/1024/2048/4096 bytes, a storage set
To read and write in sector units. If there is no file system, the program will read and write itself.
sector, you have to remember which file is in which sector. With the file system, we don't have to.
Focus on the sector, people only pay attention to the directory and file name in the file system, without having to control this
Which sector of the physical disk the file is on.
Three: Extended functionality of the operating system
(1) Protocol stack
(2) useful application packages. The application itself is not part of the operating system kernel
The application is intended for human use and is designed for a certain function. For example, the ping program is used to test
Network is connected, the Ifconfig program is used to configure the network card.
Linux kernel porting (ii)--operating system