5 operating system architecture and operating mechanism

Copyright Notice: Copyright: @@ individual all https://blog.csdn.net/y20_20/article/details/91397498

OS operating mechanism and architecture

table of Contents

First, the operating system of the operating mechanism
Second, the operating system kernel
Third, the operating system architecture

First, the operating system running mechanism

1, the instruction: recognized by the computer and executed, the program code C is a multiple instructions translated into

2, two instruction types:

  • Privileged instruction: with high privileges, such as deleting instructions, etc.
  • Non-privileged instruction: general rights, such as addition, subtraction and other instructions

3, two states: the CPU determines when to execute non-privileged instructions when to execute a privileged instruction, with status word register (PSW) of the identifier identifies the state 0 and 1 identified

  • Kernel mode (supervisor mode): privileged and nonprivileged instructions can execute instructions (except Trap instruction executed in user mode only)
  • User mode (mesh mode): execute non-privileged instructions

4, two procedures:

  • Kernel: manager system, run in kernel mode
  • Application: running in user mode

Second, the operating system kernel

1, the operating system kernel: the operating system closest to the hardware level
2 kernel include:
closest to the hardware:

  • Clock Management: providing computer timing function
  • Interrupt processing
  • Primitive: a special program, such as device drivers, execute primitives having atomic

Laying on top of the nearest hardware

  • Of system resources management: equipment management, process management, memory management

Third, the operating system architecture

1. Architecture: Not all of the core operating system division are the same, and some will be closest to the hardware and laying on top of the division into the kernel, while others only divided the content of hardware closest to the core
2 , operating system structure classification system:
(1) large kernel

  • The clock management, interrupt handling, primitive and equipment management, process management, memory management are divided into the kernel (the operating system's main features are as system kernel, running in kernel mode)
  • Advantages: High performance
  • Cons: kernel code huge, chaotic structure, it is not easy to maintain

(2) microkernel

  • Only the clock management, interrupt handling, primitive divided into the kernel (only the most basic functions reserved to the kernel, running in kernel mode)
  • Advantages: clear structure, easy maintenance
  • Disadvantages: user mode and kernel mode switching frequency, low performance

Large kernel and microkernel analogy memories: the company's management and employees, both in the large core system management and ordinary employees; microkernel system, management is responsible for the core business, the general staff in charge of basic services, need to keep the exchange

Guess you like

Origin blog.csdn.net/y20_20/article/details/91397498