1. Computer Organization
2. Development Interface Standard
-
ABI--(Application Binary Interface)
ABI describes the low-level interface between the application and the OS, allows compiled object code compatible ABI system can be run without change.
-
API--(Application Programming Interface)
API defines an interface between a source code and libraries (AIEEE API standard series defined on the operating system) so the same source code can be compiled on any system that supports this API.
3.Linux run file format
-
ELF: executable file format (like under Windows .exe file format).
-
.so (shared object): The basic format of dynamic libraries.
-
.a: basic static library format
4. Stock function (Library function) and a system call (system call)
Library calls |
System calls |
In all ANSI C compiler version in, C library functions are the same | System calls each operating system are different |
It calls the library in a program (or function) | It calls the kernel services |
Associated with the user program | An operating system entry points |
Performed in a user address space | Executed in the kernel address space |
It belongs to the running time - time users | It belongs to the running time - system time |
Belong procedure calls, call overhead is small | Required between user space and kernel context switching overhead is large. |
There are about 300 in the C library functions in libc | In UNIX, there are about 90 system calls |
A typical C library calls: system fprintf mall oc | A typical system calls: chedir fork write brk |
5.Linux philosophy
1. Everything is a file (including hardware);
2. Small, single-purpose program;
3. linker together to accomplish complex tasks;
4. Avoid confusing user interface;
The configuration data is stored in the text;
Mirror Download
http://mirrors.aliyun.com;
http://mirrors.sohu.com
http://mirrors.163.com