Operating system notes-the operating environment of the 001 operating system

Preface

The main line of the author's learning is video, and the auxiliary line is books. Sections that are not marked are supplementary content, which can be used as extended materials or in-depth understanding of materials.

The CPU recognizes privileged instructions and unprivileged instructions-an identification that depends on the state of the processor

  • The processor state of most systems is divided into management state (operating system management program) and target state (user program)
  • The program status word PSW is a register dedicated to processor status

Main memory-a job must store its programs and data in storage before it can run

  • The operating system itself needs to be stored in main memory
  • The operating system needs to regulate user operations in and out of main memory

Buffer technology-the CPU processing data speed matches the device transmission data speed ratio, and the buffer is used to link the speed contradiction between them

  • Buffer is the main memory area used by external devices to temporarily store these data during data transmission.
  • In order to improve equipment utilization, multiple buffers are usually used
  • All buffers are chain pointers linked to different buffer queues
  • When a buffer is needed, a request is made to the operating system, and the operating system allocates a corresponding free buffer for its use

Interrupt technology

asynchronous. When an asynchronous event occurs, it interrupts the processor's execution of the current program and shifts to processing the asynchronous event (that is, the interrupt handler that executes the event). Until the asynchronous event has been processed, it will return to the interruption point of the original program to continue execution.
A mechanism that can detect interrupts is added to the control unit of the processor, which is called an interrupt scanning mechanism. Usually scan the interrupt register at the last moment of the execution cycle of each instruction to inquire whether there is an interrupt signal coming. If not, continue to execute the next instruction. If so, the interrupt hardware sends the content of the interrupt trigger into the corresponding bit of the program status word psw according to the specified code, which is called the interrupt code.
Interrupts have interrupt priority levels, which are used to coordinate multiple interrupt requests. Interrupts at the same level can be coordinated with a fixed priority number or a round robin method.

Clock, clock queue

  • For the system to find jobs that fall into an infinite loop (programming error), so as to prevent the waste of machine time
  • In the time-sharing system, the interval clock is used to realize the rotation of the user's work according to the time slice
  • In a real-time system, the correct time signal is output at the required time interval and transmitted to a real-time control device
  • Timely wake up external events that require delayed execution
  • Record the user's use time and the time interval between the occurrence of an external event
  • ……

Firmware-Microprogramming

Many functions originally belonging to software can be transformed into hardware, that is, solidification, with the same technology of the Palace Museum's microprogramming. Therefore, these hardware with software functions are called firmware.
Micro-instructions/micro-operations: the basic operation of computer control circuits. The
so-called micro-programming refers to the operation of computer controllers by programming micro-instructions (called micro-programs or micro-codes) to implement
functions frequently called by the operating system (such as scheduling programs). ) Make it into a micro program-firmware to achieve, it is much faster than using software to achieve

Guess you like

Origin blog.csdn.net/MaoziYa/article/details/105287939