The basic concepts of operating system #

The basic concept of the operating system

System calls

Why provide a system call, because you want the system to operating system resources handed over to a unified and coordinated management.

For programming language is concerned, the operating system provides a system call is encapsulated into a one of the library functions, the details of the lower layer shield for programmers.

User mode and kernel mode

For some operations (computer instructions executed), he is dangerous. So not all applications can perform, then it can easily cause damage.

So it will divide instruction called privileged instructions and non-privileged instructions. Predetermined and can only privileged instructions can be executed only in kernel mode inside. Such dangerous operation and will isolate the normal operation.

Cpu while using a status flag in a register to represent the user mode or the kernel mode the current cpu.

So we can easily understand that the computer is actually running non-stop between user mode and kernel mode switching. After all, like, between the operating system resources, interprocess communication such things should be done in kernel mode.

Large kernel and microkernel

As we all know, the operating system provides the underlying architecture provides the foundation for other applications. The kernel is the core operating system foundation.

Kernel function in accordance with the degree of integration can be divided into a large kernel and microkernel.

The kernel must provide the functions clock management, interrupt management, as well as primitive (atomic level operations).

For large kernels, the difference contrast microkernel is that he is not only to provide these basic functions, and also provides management of system resources: equipment management, process management, memory management.

Since the kernel is always working in the core states, the advantage of microkernel so much is because the kernel than the integrated resource management system in the kernel, the kernel is always working in kernel mode. Therefore, the frequency can be substantially reduced cpu between user mode and kernel mode switching. You can improve system performance.

Then shortcomings are obvious, confusing, difficult to manage.

Guess you like

Origin www.cnblogs.com/freesfu/p/11617383.html